[Osip] the concept of eXosip_listen_addr and eXosip_masquerade_contact functions

Aymeric Moizard jack at atosc.org
Wed Aug 5 10:21:01 CEST 2009



On Tue, 4 Aug 2009, Gemi Tsai ½²°ê®õ wrote:

> Hi all and Aymeric,
>
> My PC has three NICs, and IP addresses are "0.0.0.0"(non-connected),
> "192.168.107.138" and "192.168.58.138".
>
> My sip-server's IP address is "192.168.58.1", so I select
> "192.168.58.138" to use.
>
> I set IP address "192.168.58.138" by eXosip_listen_addr function, but
> when eXosip sent the SIP message, it didn't use this IP address in
> Contact and Via header fields.
> (It used the first NIC's IP address "0.0.0.0") Please see the attached
> packet capture file.
>
> I must use the eXosip_masquerade_contact function to set
> "192.168.58.138" to modify Contact and Via header fields.
>
> So when I have multi-NICs in the device, in addition to use
> eXosip_listen_addr, I need to use eXosip_masquerade_contact?

Hi

I think this is the solution: that's something I'm doing for all
my applications:

put "192.168.58.1" in ipv4_for_gateway and use the following API:
eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY, ipv4_for_gateway);

Tks,
Aymeric MOIZARD / ANTISIP
amsip - http://www.antisip.com
osip2 - http://www.osip.org
eXosip2 - http://savannah.nongnu.org/projects/exosip/


> Any response would be appreciated!
>
> Gemi
>


More information about the Osip mailing list