Answer the question
In order to leave comments, you need to log in
How does a sip softphone find out the ip address of the device on which it is installed?
Hello.
For routing sip-telephony, a registration/location server is used, on which the client (softphone, for example) needs to periodically register its owl ip-address in order to be available for incoming calls.
Question:
1) How does the softphone find out the ip of the device on which it is installed? Those. is it something like "ipconfig / ifconfig" and sending information to the server or does the softphone itself not perform requests to determine ip at all, and the server takes it from the incoming registration packet?
2) If there are several interfaces on the device with different ip (all static), then will the registration server / def. locations to know both of them, in case the traffic will go only through one of the interfaces, and on the other it will be prohibited by the firewall?
Answer the question
In order to leave comments, you need to log in
> or the softphone itself does not perform requests to determine ip at
all. The softphone must know its IP. Apart from the IP address in the IP packet header, it is also found in the Contact header and in SDP. As for the IP packet, everything is simple here - the packet comes with the source ip that hangs on the outgoing interface towards the registration server, unless another address is hardcoded. The address in Contact is more complicated here. The manual says - "The user agent should not send new registration messages (requests containing new messages in the Contact header) until it receives a final response from the registration server to the previous request ...". Also: "A Register request may include a Contact header containing zero or more contact addresses.".
What are the options here:
1) The SIP client sends several REGISTER packets with different addresses to Contact until registration is completed.
2) The SIP client sends one REGISTER packet with several addresses in the Contact header.
Apparently it depends on the implementation of the client.
If there is a NAT with SIP ALG functionality on the path between the client and the server, then the Contact header will be subject to change in accordance with the logic of this very SIP ALG.
To determine the address behind NAT (as well as the type of NAT), the SIP client can use the STUN server (SIP ALG is no longer needed in this case and may even interfere). In this case, the Contact header will be formed without a local address, but immediately with a public IP address and port.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question