I'm trying to set up a sip trunk between a FS and * box, and right now I'm having trouble getting things set up so I make a call from a sip phone registered with my FS box to a sip phone registered w/ my Asterisk box. I have a gateway defined as in directory/default/example.com.xml and in my dialplan I'm trying to do a bridge w/ something like "sofia/gateway/${default_gateway}/12345." When I try to make the call I see from the console: ... New Channel sofia/external/12345 ... ... STUN Failed! stun.freeswitch.org:3478 [Remote Address Error!] ... Hangup sofia/external/12345 [CS_INIT] [DESTINATION_OUT_OF_ORDER] The Originate fails. I tried sticking to what the instructions laid out for this in the Connecting FS and Asterisk wiki page, so I'd appreciate some help in figuring out what's going on. Thanks.
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
I'm trying to set up a sip trunk between a FS and * box, and right now I'm having trouble getting things set up so I make a call from a sip phone registered with my FS box to a sip phone registered w/ my Asterisk box.
I have a gateway defined as in directory/default/example.com.xml and in my dialplan I'm trying to do a bridge w/ something like "sofia/gateway/${default_gateway}/12345."
When I try to make the call I see from the console:
... New Channel sofia/external/12345 ... ... STUN Failed! stun.freeswitch.org:3478 [Remote Address Error!] ... Hangup sofia/external/12345 [CS_INIT] [DESTINATION_OUT_OF_ORDER]
What is your network setup? The gateway you created is using the external profile and trying to do a STUN lookup. Is that what you are trying to do? Just confirming. -MC
Yes, the obvious is the case. :) I don't want to do a STUN lookup - the two machines are on the same LAN. What's the best way to get the gateway to not do a STUN lookup? Do I need to disable STUN for the external profile or make this gateway use a different profile? Thanks. SW On Mon, Mar 16, 2009 at 11:59 AM, Michael Collins <msc@freeswitch.org>wrote:
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
I'm trying to set up a sip trunk between a FS and * box, and right now I'm having trouble getting things set up so I make a call from a sip phone registered with my FS box to a sip phone registered w/ my Asterisk box.
I have a gateway defined as in directory/default/example.com.xml and in my dialplan I'm trying to do a bridge w/ something like "sofia/gateway/${default_gateway}/12345."
When I try to make the call I see from the console:
... New Channel sofia/external/12345 ... ... STUN Failed! stun.freeswitch.org:3478 [Remote Address Error!] ... Hangup sofia/external/12345 [CS_INIT] [DESTINATION_OUT_OF_ORDER]
What is your network setup? The gateway you created is using the external profile and trying to do a STUN lookup. Is that what you are trying to do? Just confirming.
-MC
_______________________________________________ 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
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Yes, the obvious is the case. :) I don't want to do a STUN lookup - the two machines are on the same LAN.
What's the best way to get the gateway to not do a STUN lookup? Do I need to disable STUN for the external profile or make this gateway use a different profile?
In which directory do you create your gateway file? If you created it in sip_profiles/external/ then try moving it over to sip_profiles/internal/ and see what happens... -MC P.S. - You could also disable STUN on your external profile, but since your two boxes are on the same LAN I would suggestion that the "proper" way to handle this situation is to have your gateway use the internal profile.
The reason its using stun is because your external-sip-ip and external- rtp-ip params are starting with stun: As Michael says, the external profile is meant to do nat-traversal, if you dont need it, use the internal one. Math On 16-Mar-09, at 1:24 PM, Michael Collins wrote:
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Yes, the obvious is the case. :) I don't want to do a STUN lookup - the two machines are on the same LAN.
What's the best way to get the gateway to not do a STUN lookup? Do I need to disable STUN for the external profile or make this gateway use a different profile?
In which directory do you create your gateway file? If you created it in sip_profiles/external/ then try moving it over to sip_profiles/internal/ and see what happens...
-MC
P.S. - You could also disable STUN on your external profile, but since your two boxes are on the same LAN I would suggestion that the "proper" way to handle this situation is to have your gateway use the internal profile.
_______________________________________________ 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 simply moved the file defining the gateway to conf/sip_profiles/internal Well, when calling from extension 1000 to 70904, what I see on the console (debug mode) is: 2009-03-16 13:35:39 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/1000@pbx-sip-3.usa.internal.net Execute bridge(sofia/gateway/${default_gateway}/70904) 2009-03-16 13:35:39 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/1000@pbx-sip-3.usa.internal.netExpanded String bridge(sofia/gateway/ pbx-sip-4.usa.internal.net/70904) 2009-03-16 13:35:39 [ERR] mod_sofia.c:2379 sofia_outgoing_channel() Invalid Gateway 2009-03-16 13:35:39 [NOTICE] mod_sofia.c:2591 sofia_outgoing_channel() Close Channel N/A [CS_NEW] 2009-03-16 13:35:39 [ERR] switch_ivr_originate.c:1425 switch_ivr_originate() Cannot create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [DEBUG] switch_ivr_originate.c:2014 switch_ivr_originate() Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [INFO] mod_dptools.c:1998 audio_bridge_function() Originate Failed. Cause: INVALID_NUMBER_FORMAT What else am I missing and not doing right? Thanks again for your help.
I would almost bet your xml is wrong when you moved it.. care to share that little bit of info? /b On Mar 16, 2009, at 12:39 PM, Steven Ward wrote:
I simply moved the file defining the gateway to conf/sip_profiles/ internal
Well, when calling from extension 1000 to 70904, what I see on the console (debug mode) is:
2009-03-16 13:35:39 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/1000@pbx-sip-3.usa.internal.net Execute bridge(sofia/gateway/${default_gateway}/70904) 2009-03-16 13:35:39 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/1000@pbx-sip-3.usa.internal.net Expanded String bridge(sofia/gateway/pbx-sip-4.usa.internal.net/ 70904) 2009-03-16 13:35:39 [ERR] mod_sofia.c:2379 sofia_outgoing_channel() Invalid Gateway 2009-03-16 13:35:39 [NOTICE] mod_sofia.c:2591 sofia_outgoing_channel() Close Channel N/A [CS_NEW] 2009-03-16 13:35:39 [ERR] switch_ivr_originate.c:1425 switch_ivr_originate() Cannot create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [DEBUG] switch_ivr_originate.c:2014 switch_ivr_originate() Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [INFO] mod_dptools.c:1998 audio_bridge_function() Originate Failed. Cause: INVALID_NUMBER_FORMAT
What else am I missing and not doing right? Thanks again for your help.
Sure thing. Here it is: <include> <user id="$${default_provider}"> <gateway name="$${default_provider}"> <param name="username" value="$${default_provider_username}"/> <param name="password" value="$${default_provider_password}"/> <param name="from-user" value="$${default_provider_username}"/> <param name="from-domain" value="$${default_provider_from_domain}"/> <param name="expire-seconds" value="600"/> <param name="register" value="$${default_provider_register}"/> <param name="retry-seconds" value="30"/> <param name="extension" value="$${default_provider_contact}"/> <param name="contact-params" value="domain_name=$${domain}"/> <param name="context" value="default"/> </gateway> </user> </include> In vars.conf I supplied the variables' values: <X-PRE-PROCESS cmd="set" data="default_provider=pbx-sip-4.usa.internal.net "/> <X-PRE-PROCESS cmd="set" data="default_provider_username=pbx-sip-4"/> <X-PRE-PROCESS cmd="set" data="default_provider_password=9997"/> <X-PRE-PROCESS cmd="set" data="default_provider_from_domain= pbx-sip-4.usa.internal.net"/> <!-- true or false --> <X-PRE-PROCESS cmd="set" data="default_provider_register=false"/> <X-PRE-PROCESS cmd="set" data="default_provider_contact=1000"/> 2009/3/16 Brian West <brian@freeswitch.org>
I would almost bet your xml is wrong when you moved it.. care to share that little bit of info? /b
On Mar 16, 2009, at 12:39 PM, Steven Ward wrote:
I simply moved the file defining the gateway to conf/sip_profiles/internal
Well, when calling from extension 1000 to 70904, what I see on the console (debug mode) is:
2009-03-16 13:35:39 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/1000@pbx-sip-3.usa.internal.net Execute bridge(sofia/gateway/${default_gateway}/70904) 2009-03-16 13:35:39 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/1000@pbx-sip-3.usa.internal.net Expanded String bridge(sofia/gateway/pbx-sip-4.usa.internal.net/70904) 2009-03-16 13:35:39 [ERR] mod_sofia.c:2379 sofia_outgoing_channel() Invalid Gateway 2009-03-16 13:35:39 [NOTICE] mod_sofia.c:2591 sofia_outgoing_channel() Close Channel N/A [CS_NEW] 2009-03-16 13:35:39 [ERR] switch_ivr_originate.c:1425 switch_ivr_originate() Cannot create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [DEBUG] switch_ivr_originate.c:2014 switch_ivr_originate() Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [INFO] mod_dptools.c:1998 audio_bridge_function() Originate Failed. Cause: INVALID_NUMBER_FORMAT
What else am I missing and not doing right? Thanks again for your help.
_______________________________________________ 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
First off since its not in the user directory anymore you'll have to unwrap the gateway from inside the user tags ;) /b On Mar 16, 2009, at 12:51 PM, Steven Ward wrote:
Sure thing. Here it is:
<include> <user id="$${default_provider}"> <gateway name="$${default_provider}"> <param name="username" value="$${default_provider_username}"/> <param name="password" value="$${default_provider_password}"/> <param name="from-user" value="$$ {default_provider_username}"/> <param name="from-domain" value="$$ {default_provider_from_domain}"/> <param name="expire-seconds" value="600"/> <param name="register" value="$${default_provider_register}"/> <param name="retry-seconds" value="30"/> <param name="extension" value="$${default_provider_contact}"/> <param name="contact-params" value="domain_name=$${domain}"/> <param name="context" value="default"/> </gateway> </user> </include>
In vars.conf I supplied the variables' values: <X-PRE-PROCESS cmd="set" data="default_provider=pbx- sip-4.usa.internal.net"/> <X-PRE-PROCESS cmd="set" data="default_provider_username=pbx- sip-4"/> <X-PRE-PROCESS cmd="set" data="default_provider_password=9997"/> <X-PRE-PROCESS cmd="set" data="default_provider_from_domain=pbx- sip-4.usa.internal.net"/> <!-- true or false --> <X-PRE-PROCESS cmd="set" data="default_provider_register=false"/> <X-PRE-PROCESS cmd="set" data="default_provider_contact=1000"/>
Heh heh. Guess it pays not to rush. :) Got it working now - without registering. But another thing - what if I want to set my two boxes up for registering? I see that I can set my register parameter to true, but how do I control the register string that's sent to the other box? 2009/3/16 Brian West <brian@freeswitch.org>
First off since its not in the user directory anymore you'll have to unwrap the gateway from inside the user tags ;) /b
On Mar 16, 2009, at 12:51 PM, Steven Ward wrote:
Sure thing. Here it is:
<include> <user id="$${default_provider}"> <gateway name="$${default_provider}"> <param name="username" value="$${default_provider_username}"/> <param name="password" value="$${default_provider_password}"/> <param name="from-user" value="$${default_provider_username}"/> <param name="from-domain" value="$${default_provider_from_domain}"/> <param name="expire-seconds" value="600"/> <param name="register" value="$${default_provider_register}"/> <param name="retry-seconds" value="30"/> <param name="extension" value="$${default_provider_contact}"/> <param name="contact-params" value="domain_name=$${domain}"/> <param name="context" value="default"/> </gateway> </user> </include>
In vars.conf I supplied the variables' values: <X-PRE-PROCESS cmd="set" data="default_provider= pbx-sip-4.usa.internal.net"/> <X-PRE-PROCESS cmd="set" data="default_provider_username=pbx-sip-4"/> <X-PRE-PROCESS cmd="set" data="default_provider_password=9997"/> <X-PRE-PROCESS cmd="set" data="default_provider_from_domain= pbx-sip-4.usa.internal.net"/> <!-- true or false --> <X-PRE-PROCESS cmd="set" data="default_provider_register=false"/> <X-PRE-PROCESS cmd="set" data="default_provider_contact=1000"/>
_______________________________________________ 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
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
I simply moved the file defining the gateway to conf/sip_profiles/internal
Well, when calling from extension 1000 to 70904, what I see on the console (debug mode) is:
2009-03-16 13:35:39 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/1000@pbx-sip-3.usa.internal.net Execute bridge(sofia/gateway/${default_gateway}/70904) 2009-03-16 13:35:39 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/1000@pbx-sip-3.usa.internal.net Expanded String bridge(sofia/gateway/pbx-sip-4.usa.internal.net/70904) 2009-03-16 13:35:39 [ERR] mod_sofia.c:2379 sofia_outgoing_channel() Invalid Gateway
^^^^^^^^^^^^^^^^ There's your key. Invalid gateway means just that: you're dialing a gw that doesn't exist. What is your gateway name in the file? Is it really "pbx-sip-4.usa.internal.net" ? does that resolve to an internal IP address? -MC
2009-03-16 13:35:39 [NOTICE] mod_sofia.c:2591 sofia_outgoing_channel() Close Channel N/A [CS_NEW] 2009-03-16 13:35:39 [ERR] switch_ivr_originate.c:1425 switch_ivr_originate() Cannot create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [DEBUG] switch_ivr_originate.c:2014 switch_ivr_originate() Originate Resulted in Error Cause: 28 [INVALID_NUMBER_FORMAT] 2009-03-16 13:35:39 [INFO] mod_dptools.c:1998 audio_bridge_function() Originate Failed. Cause: INVALID_NUMBER_FORMAT
What else am I missing and not doing right? Thanks again for your help.
_______________________________________________ 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
Thanks. I created the gateway file in conf/directory/default/ On Mon, Mar 16, 2009 at 1:24 PM, Michael Collins <msc@freeswitch.org> wrote:
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Yes, the obvious is the case. :) I don't want to do a STUN lookup - the two machines are on the same LAN.
What's the best way to get the gateway to not do a STUN lookup? Do I need to disable STUN for the external profile or make this gateway use a different profile?
In which directory do you create your gateway file? If you created it in sip_profiles/external/ then try moving it over to sip_profiles/internal/ and see what happens...
-MC
P.S. - You could also disable STUN on your external profile, but since your two boxes are on the same LAN I would suggestion that the "proper" way to handle this situation is to have your gateway use the internal profile.
_______________________________________________ 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
participants (4)
-
Brian West
-
Mathieu Rene
-
Michael Collins
-
Steven Ward