Re: [Sofia-sip-devel] Controlling Source IP Address
El 03/09/14 15:45, Luca Olivetti ha escrit: > El 03/09/14 06:13, Luca Olivetti ha escrit: >> El 06/03/13 15:36, Francesco Lamonica ha escrit: >> >> Sorry to revive an old thread (and for the top-posting!), but I'm having >> the same issue and I saw no replies on the list. >> >> I'm using nua and I tried this right after the call to nua_create >> >> >> if (g_conf.local_ip) { >> url_t * local_url; >> local_url = url_make(svd->nua, "sip:*.*"); >> local_url->url_host = g_conf.local_ip; >> nua_set_params(svd->nua, >>NUTAG_URL (local_url), >>TAG_NULL () ); >> } >> >> >> but it doesn't seem to be working. > > I also tried to add > TAG_IF (g_conf.local_ip, SIPTAG_VIA_STR(g_conf.local_ip)), > TAG_IF (g_conf.local_ip, SOATAG_ADDRESS(g_conf.local_ip)), > > in the call to nua_create, again with no apparent result (not > surprisingly since it was a random attempt). It turns out that, contrary to what the documentation says (http://sofia-sip.sourceforge.net/refdocs/nua/nua__tag_8h.html#a3cfaf741baba4cd2e325385375dac22b), NUTAG_URL doesn't work to "set stack's own address" if used with nua_set_params, but only with nua_create: char *local_ip=NULL; if (g_conf.local_ip) { asprintf(&local_ip, "sip:%s", g_conf.local_ip); SU_DEBUG_5(("using NUTAG_URL %s\n",local_ip)); } svd->nua = nua_create (svd->root, svd_nua_callback, svd, SIPTAG_USER_AGENT_STR ("svd VoIP agent"), SOATAG_AF (SOA_AF_IP4_IP6), TPTAG_TOS (tos), NUTAG_ALLOW ("INFO"), NUTAG_AUTOALERT (1), NUTAG_ENABLEMESSAGE (1), NUTAG_ENABLEINVITE (1), NUTAG_DETECT_NETWORK_UPDATES (NUA_NW_DETECT_TRY_FULL), TAG_IF (local_ip, NUTAG_URL(local_ip)), TAG_NULL () ); But even if this works, I'd still prefer a solution that allows me to specify the local interface for each registration instead of globally. Any hint? Bye -- Luca -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Controlling Source IP Address
El 03/09/14 06:13, Luca Olivetti ha escrit: > El 06/03/13 15:36, Francesco Lamonica ha escrit: > > Sorry to revive an old thread (and for the top-posting!), but I'm having > the same issue and I saw no replies on the list. > > I'm using nua and I tried this right after the call to nua_create > > > if (g_conf.local_ip) { > url_t * local_url; > local_url = url_make(svd->nua, "sip:*.*"); > local_url->url_host = g_conf.local_ip; > nua_set_params(svd->nua, >NUTAG_URL (local_url), >TAG_NULL () ); > } > > > but it doesn't seem to be working. I also tried to add TAG_IF (g_conf.local_ip, SIPTAG_VIA_STR(g_conf.local_ip)), TAG_IF (g_conf.local_ip, SOATAG_ADDRESS(g_conf.local_ip)), in the call to nua_create, again with no apparent result (not surprisingly since it was a random attempt). > I'm also managing multiple registrations, so I'd prefer something that's > specific to each registration instead of a global setting if possible. > I suppose it's just a matter of adding the "correct" tags to > nua_register/nua_invite, the problem is to know which tags are the > correct ones here. > > Bye > > >> Hi Jerry, did you solve the problem? i might have the same issue with >> the VPN >> >> >> On Wed, May 23, 2012 at 8:41 PM, Jerry Richards >> mailto:jerry.richa...@teotech.com>> wrote: >> >> I have a Freeswitch issue, where I have softphones connected to two >> separate subnets (one on eth0 and the other on eth1). When I send >> an IM (i.e. SIP MESSAGE) from the eth1 phone to the eth0 phone, a >> wireshark trace shows the source IP address of the eth1 server >> address, rather than the eth0 server address. The eth1 address >> makes no sense on the eth0 subnet, so the softphone does not reply. >> >> __ __ >> >> Is there a sofia tag to control the source IP in this case? The >> message is going out the right interface; the issue is just that the >> source IP address is wrong. -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Controlling Source IP Address
El 06/03/13 15:36, Francesco Lamonica ha escrit: Sorry to revive an old thread (and for the top-posting!), but I'm having the same issue and I saw no replies on the list. I'm using nua and I tried this right after the call to nua_create if (g_conf.local_ip) { url_t * local_url; local_url = url_make(svd->nua, "sip:*.*"); local_url->url_host = g_conf.local_ip; nua_set_params(svd->nua, NUTAG_URL (local_url), TAG_NULL () ); } but it doesn't seem to be working. I'm also managing multiple registrations, so I'd prefer something that's specific to each registration instead of a global setting if possible. I suppose it's just a matter of adding the "correct" tags to nua_register/nua_invite, the problem is to know which tags are the correct ones here. Bye > Hi Jerry, did you solve the problem? i might have the same issue with > the VPN > > > On Wed, May 23, 2012 at 8:41 PM, Jerry Richards > mailto:jerry.richa...@teotech.com>> wrote: > > I have a Freeswitch issue, where I have softphones connected to two > separate subnets (one on eth0 and the other on eth1). When I send > an IM (i.e. SIP MESSAGE) from the eth1 phone to the eth0 phone, a > wireshark trace shows the source IP address of the eth1 server > address, rather than the eth0 server address. The eth1 address > makes no sense on the eth0 subnet, so the softphone does not reply. > > __ __ > > Is there a sofia tag to control the source IP in this case? The > message is going out the right interface; the issue is just that the > source IP address is wrong. -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Controlling Source IP Address
Hi Jerry, did you solve the problem? i might have the same issue with the VPN On Wed, May 23, 2012 at 8:41 PM, Jerry Richards wrote: > I have a Freeswitch issue, where I have softphones connected to two > separate subnets (one on eth0 and the other on eth1). When I send an IM > (i.e. SIP MESSAGE) from the eth1 phone to the eth0 phone, a wireshark trace > shows the source IP address of the eth1 server address, rather than the > eth0 server address. The eth1 address makes no sense on the eth0 subnet, > so the softphone does not reply. > > ** ** > > Is there a sofia tag to control the source IP in this case? The message > is going out the right interface; the issue is just that the source IP > address is wrong. > > ** ** > > Thanks, > > Jerry > > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > ___ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel > > -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
[Sofia-sip-devel] Controlling Source IP Address
I have a Freeswitch issue, where I have softphones connected to two separate subnets (one on eth0 and the other on eth1). When I send an IM (i.e. SIP MESSAGE) from the eth1 phone to the eth0 phone, a wireshark trace shows the source IP address of the eth1 server address, rather than the eth0 server address. The eth1 address makes no sense on the eth0 subnet, so the softphone does not reply. Is there a sofia tag to control the source IP in this case? The message is going out the right interface; the issue is just that the source IP address is wrong. Thanks, Jerry -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel