View previous topic :: View next topic |
Author |
Message |
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 10:58 am Post subject: [Freeswitch-users] sip trunking question |
|
|
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.
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Mar 16, 2009 11:09 am Post subject: [Freeswitch-users] sip trunking question |
|
|
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Quote: | 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 |
|
Back to top |
|
|
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 12:31 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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 (msc@freeswitch.org)> wrote:
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Mar 16, 2009 12:42 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Quote: | 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 |
|
Back to top |
|
|
mrene_lists at avgs.ca Guest
|
Posted: Mon Mar 16, 2009 12:50 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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:
Quote: | 2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Quote: | 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
|
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Mon Mar 16, 2009 1:03 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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:
Quote: | 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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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.
|
|
|
Back to top |
|
|
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 1:03 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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. |
|
Back to top |
|
|
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 1:04 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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 (brian@freeswitch.org)>
Quote: | 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:
Quote: | 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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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 ([email]sofia/internal/1000@pbx-sip-3.usa.internal.net[/email]) 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 (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
|
|
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Mon Mar 16, 2009 1:07 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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:
Quote: | 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"/>
|
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Mar 16, 2009 1:07 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
2009/3/16 Steven Ward <steve.d.ward@gmail.com>:
Quote: | 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
Quote: | 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
|
_______________________________________________
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 |
|
Back to top |
|
|
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 1:27 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
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 (brian@freeswitch.org)>
Quote: | 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:
Quote: | 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 (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
|
|
|
Back to top |
|
|
steve.d.ward at gmail.com Guest
|
Posted: Mon Mar 16, 2009 3:59 pm Post subject: [Freeswitch-users] sip trunking question |
|
|
Thanks.
I created the gateway file in conf/directory/default/
On Mon, Mar 16, 2009 at 1:24 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
|
|
Back to top |
|
|
|