4) expires
The user agent needs to send a validity period for registration to the server during the registration process. If the user agent does not update the validity period again within the validity period, the server will deem that the user proxy does not exist and will reject any user proxy attempting to session with the user.
5) from
Who is the initiator of the SIP message? The From header field in the request sent by the caller to the callee uses the address of the caller.
6)
This field specifies the logic receiver of the request.
Programming Problems:
Int exosip_register_build_initial_register |
( |
Const char * |
From, |
|
|
Const char * |
Proxy, |
|
|
Const char * |
Contact, |
|
|
Int |
Expires, |
|
|
Osip_message_t ** |
Reg |
|
|
) |
|
|
|
Build initial register request.
-
-
Parameters:
-
|
From |
Sip url for caller. |
|
Proxy |
Proxy used for registration. |
|
Contact |
Contact address. (optional) |
|
Expires |
The expires value for registration. |
|
Reg |
The SIP request to build. |
There are two problems:
-
-
1) during the registration process, we can find that the IP address of the registered user is different from that of the from parameter. The from parameter must accept a registered user name,
-
-
However, the registration server does not use the FROM address as the address of the subscriber, but records the communication address as the address of the subscriber:
-
-
For example:
-
-
Strregsrccall = "SIP: fengyuzaitu@192.168.20.167 ";
-
-
Strregdestcall = "SIP: admin@192.168.20.166 ";
-
-
Fengyuzaitu is the user name used for registration.
-
-
192.168.20.166 is the registered server.
-
-
When the above function is called during registration, the value of the from field is <SIP: fengyuzaitu @
-
192.168.20.167>
-
-
The value of the to field is <SIP: fengyuzaitu@192.168.20.167>
-
-
The two values are the same.
-