Re: [Freeswitch-users] Freeswitch not putting external IP in SDP and From Header when dialing out SIPURI by external profile
Hai brian, I given my router ip in ext-sip-ip and ext-rtp-ip. Ext-rtp-ip = router-ip Issue is fs not putting profile->extrtpip because its fail in nat checking. Regards Andrew On Sunday, February 9, 2014, Brian West <brian@freeswitch.org> wrote:
What values do you have in ext-sip-ip and ext-rtp-ip? -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Feb 9, 2014, at 9:09 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hi all,
------------------FREESWITCH--------------(bridge=sofia/external/sip:outbound-opensip.com:5060 )-----------OPENSIP----------------------
I am facing NAT problem when i am dialing SIP URI via sip profile. When
i am dialing the SIP uri with Gateway trunk NAT is working properly.
Dialing SIP URI
<action application="bridge" data="sofia/external/sip:
outbound-opensip.com:5060"
In external profile setting I made the setting for ext-rtp-ip and
ext-sip-ip. In freeswitch cli "sofia status profile external" i am able to see the external rtp and sip ip correctly.
But when freeswitch sending INVITE external IPs are not set in SDP and
FROM Header, instead it is using local IP. When i tried to debug the problem in switch_core_media.c freeswitch failed to check the NAT settings.
switch_core_media.c
SWITCH_DECLARE(switch_status_t)
switch_core_media_choose_port(switch_core_session_t *session, switch_media_type_t type, int force)
/* Check if NAT is detected */ if (!zstr(smh->mparams->remote_ip) &&
switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {
/* Yes, map the port through switch_nat */ /* Code */ } else { /* No NAT traversal required, use the profile's rtp ip */ use_ip = smh->mparams->rtpip; }
Here remote IP is NULL always when i am dialing URI with external
profile. When I tried to make call by "sofia/gateway/trunk/sip: outbound-opensip.com:5060" i can see the remote ip as "oubound-opensip.com" and its able to external IP in SDP.
Can any body tell how to solve this problem ? Is there any configuration
to set relam in dialplan ?
I am using freeswitch version 1.5.6.
Hopping the earliest response.
Regards
Andrew
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Try this: ext-rtp-ip=autonat:x.x.x.x ext-sip-ip=autonat:x.x.x.x set local-network-acl=localnet.auto restart the profile. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Feb 9, 2014, at 11:52 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hai brian,
I given my router ip in ext-sip-ip and ext-rtp-ip.
Ext-rtp-ip = router-ip
Issue is fs not putting profile->extrtpip because its fail in nat checking.
Regards
Andrew
Hai Brian , I tried in Profile by ext-rtp-ip=autonat:x.x.x.x. But this method also didnt work. Can you tell me is there any configuration for setting the outbound IP(realm address) in dialplan ? The issue is freeswitch not able to find the Remote IP for checking the NAT. Since NAT checking failed freeswitch putting the profile rtp ip instead of profile extern ip. * Check if NAT is detected */
if (!zstr(smh->mparams->remote_
ip) && switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {
/* Yes, map the port through switch_nat */ /* Code */ } else {
/* No NAT traversal required, use the profile's rtp ip */
use_ip = smh->mparams->rtpip
} Regards Andrew On Sun, Feb 9, 2014 at 11:22 PM, Andrew Paul <andrew.paul85@gmail.com>wrote:
Hai brian,
I given my router ip in ext-sip-ip and ext-rtp-ip.
Ext-rtp-ip = router-ip
Issue is fs not putting profile->extrtpip because its fail in nat checking.
Regards
Andrew
On Sunday, February 9, 2014, Brian West <brian@freeswitch.org> wrote:
What values do you have in ext-sip-ip and ext-rtp-ip? -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Feb 9, 2014, at 9:09 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hi all,
------------------FREESWITCH--------------(bridge=sofia/external/sip:outbound-opensip.com:5060 )-----------OPENSIP----------------------
I am facing NAT problem when i am dialing SIP URI via sip profile. When
i am dialing the SIP uri with Gateway trunk NAT is working properly.
Dialing SIP URI
<action application="bridge" data="sofia/external/sip:
outbound-opensip.com:5060"
In external profile setting I made the setting for ext-rtp-ip and
ext-sip-ip. In freeswitch cli "sofia status profile external" i am able to see the external rtp and sip ip correctly.
But when freeswitch sending INVITE external IPs are not set in SDP and
FROM Header, instead it is using local IP. When i tried to debug the problem in switch_core_media.c freeswitch failed to check the NAT settings.
switch_core_media.c
SWITCH_DECLARE(switch_status_t)
switch_core_media_choose_port(switch_core_session_t *session, switch_media_type_t type, int force)
/* Check if NAT is detected */ if (!zstr(smh->mparams->remote_ip) &&
switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {
/* Yes, map the port through switch_nat */ /* Code */ } else { /* No NAT traversal required, use the profile's rtp ip */ use_ip = smh->mparams->rtpip; }
Here remote IP is NULL always when i am dialing URI with external
profile. When I tried to make call by "sofia/gateway/trunk/sip: outbound-opensip.com:5060" i can see the remote ip as "oubound-opensip.com" and its able to external IP in SDP.
Can any body tell how to solve this problem ? Is there any
configuration to set relam in dialplan ?
I am using freeswitch version 1.5.6.
Hopping the earliest response.
Regards
Andrew
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Bug reports belong at http://jira.freeswitch.org, Please file one with all the details, I can’t seem to get the same behavior you’re getting. For auto-nat to work you need to set local-network-acl, Have you done so. Either way please file a JIRA -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Feb 9, 2014, at 9:00 PM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hai Brian ,
I tried in Profile by ext-rtp-ip=autonat:x.x.x.x. But this method also didnt work.
Can you tell me is there any configuration for setting the outbound IP(realm address) in dialplan ?
The issue is freeswitch not able to find the Remote IP for checking the NAT. Since NAT checking failed freeswitch putting the profile rtp ip instead of profile extern ip.
* Check if NAT is detected */
if (!zstr(smh->mparams->remote_
ip) && switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {
/* Yes, map the port through switch_nat */ /* Code */ } else {
/* No NAT traversal required, use the profile's rtp ip */ use_ip = smh->mparams->rtpip } Regards
Andrew
Hi Brian, I tried auonat and local-network-acl. Its looks like a bug in freeswitch. Whenever i am dialing "sofia/external/sip:domain.com" freeswitch not able to set the domain to tech_pvt->mparams.remote_ip . Whenever we are making a outgoing call it will be processed in mod_sofia.c function "sofia_outgoing_channel" if (zstr(tech_pvt->mparams.remote_ip)) { switch_split_user_domain(switch_core_session_strdup(nsession, tech_pvt->dest), NULL, &tech_pvt->mparams.remote_ip); } Since my dial string dont have username "switch_split_user_domain" function make my remote_ip always NULL. So NAT checking in SIP and SDP got failed. Best Regards Andrew Paul On Tue, Feb 11, 2014 at 7:21 PM, Brian West <brian@freeswitch.org> wrote:
Bug reports belong at http://jira.freeswitch.org, Please file one with all the details, I can't seem to get the same behavior you're getting. For auto-nat to work you need to set local-network-acl, Have you done so.
Either way please file a JIRA
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Feb 9, 2014, at 9:00 PM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hai Brian ,
I tried in Profile by ext-rtp-ip=autonat:x.x.x.x. But this method also didnt work.
Can you tell me is there any configuration for setting the outbound IP(realm address) in dialplan ?
The issue is freeswitch not able to find the Remote IP for checking the NAT. Since NAT checking failed freeswitch putting the profile rtp ip instead of profile extern ip.
* Check if NAT is detected */
if (!zstr(smh->mparams->remote_
ip) && switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {
/* Yes, map the port through switch_nat */ /* Code */ } else {
/* No NAT traversal required, use the profile's rtp ip */ use_ip = smh->mparams->rtpip } Regards
Andrew
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I’ve had hints of this behavior but no real way to replicate it, If you can get all the details on the JIRA. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Feb 11, 2014, at 11:17 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hi Brian,
I tried auonat and local-network-acl.
Its looks like a bug in freeswitch. Whenever i am dialing "sofia/external/sip:domain.com" freeswitch not able to set the domain to tech_pvt->mparams.remote_ip . Whenever we are making a outgoing call it will be processed in mod_sofia.c function "sofia_outgoing_channel"
if (zstr(tech_pvt->mparams.remote_ip)) { switch_split_user_domain(switch_core_session_strdup(nsession, tech_pvt->dest), NULL, &tech_pvt->mparams.remote_ip); }
Since my dial string dont have username "switch_split_user_domain" function make my remote_ip always NULL. So NAT checking in SIP and SDP got failed.
Best Regards
Andrew Paul
Hai, I tested with the latest git master and issue got resolved Regards Paul On Tue, Feb 11, 2014 at 11:47 PM, Brian West <brian@freeswitch.org> wrote:
I've had hints of this behavior but no real way to replicate it, If you can get all the details on the JIRA. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Feb 11, 2014, at 11:17 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hi Brian,
I tried auonat and local-network-acl.
Its looks like a bug in freeswitch. Whenever i am dialing "sofia/external/sip:domain.com" freeswitch not able to set the domain to tech_pvt->mparams.remote_ip . Whenever we are making a outgoing call it will be processed in mod_sofia.c function "sofia_outgoing_channel"
if (zstr(tech_pvt->mparams.remote_ip)) {
switch_split_user_domain(switch_core_session_strdup(nsession, tech_pvt->dest), NULL, &tech_pvt->mparams.remote_ip);
}
Since my dial string dont have username "switch_split_user_domain" function make my remote_ip always NULL. So NAT checking in SIP and SDP got failed.
Best Regards
Andrew Paul
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
YES YES, I was involved in this resolution testing, I had been hunting for that little bug for a little while. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Feb 13, 2014, at 4:39 AM, Andrew Paul <andrew.paul85@gmail.com> wrote:
Hai,
I tested with the latest git master and issue got resolved
Regards
Paul
On Tue, Feb 11, 2014 at 11:47 PM, Brian West <brian@freeswitch.org> wrote: I’ve had hints of this behavior but no real way to replicate it, If you can get all the details on the JIRA. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
participants (2)
-
Andrew Paul
-
Brian West