Hi, I'm having trouble dialing out some phone numbers through a SIP gateway. I configured the gateway on conf/sip_profiles/outbound/gizmo.xml as: <include> <gateway name="gizmo"> <param name="debug" value="1"/> <param name="username" value="1747xxxxxx"/> <param name="from-domain" value="proxy01.sipphone.com"/> <param name="password" value="MYPASSWORD"/> <param name="caller-id-in-from" value="true"/> <param name="proxy" value="proxy01.sipphone.com"/> <param name="expire-seconds" value="3600"/> <param name="register" value="true"/> <param name="retry_seconds" value="3600"/> </gateway> </include> Then I created an extension on conf/dialplan/public.xml like this: <extension name="chile"> <condition field="destination_number" expression="^0056(.*)"> <action application="bridge" data="sofia/gateway/gizmo/0056$1"/> </condition> </extension> The above catches all calls that begin with the 0056 prefix (calls to Chile). So what I do is, register with a softphone using extension 1000, then I dial 0056xxxxx, and I get a recording saying the extension I'm calling is unavailable. The weird thing is that if I don't use 0056, the call is made, but then I get a recording from Gizmo (my test gateway) saying the number is wrong (of course). If instead of an expression, I dial the fixed number 1-800-466-4411 (Google 411), the called is successfully bridged. Also if I dial a Gizmo user number (1747xxxxxx) the call works. What's the problem with 0056? Apparently the call is never "leaving" freeswitch. For an unsuccessful call, I get this on the console: 2008-03-27 12:43:59 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/default/1000@medularis01.dyndns.org:5060 [dbbaff68-0791-4253-a07c-ab2c4130df18] 2008-03-27 12:43:59 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing Nico->005624949458@default 2008-03-27 12:43:59 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/outbound/005624949458 [c0b1791c-eb96-464a-bc30-5d6481ed0c10] 2008-03-27 12:44:02 [NOTICE] sofia.c:1950 sofia_handle_sip_i_state() Hangup sofia/outbound/005624949458 [CS_HOLD] [NORMAL_UNSPECIFIED] 2008-03-27 12:44:02 [INFO] mod_dptools.c:1514 audio_bridge_function() Originate Failed. Cause: NORMAL_UNSPECIFIED 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 16 (sofia/outbound/005624949458) Ended 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/outbound/005624949458 [CS_HANGUP] 2008-03-27 12:44:02 [NOTICE] mod_dptools.c:1541 audio_bridge_function() Hangup sofia/default/1000@mydomain:5060 [CS_EXECUTE] [NORMAL_UNSPECIFIED] 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 15 (sofia/default/1000@mydomain:5060) Ended 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/default/1000@mydomain:5060 [CS_HANGUP] What does NORMAL_UNSPECIFIED mean?! I found this page on the wiki: http://wiki.freeswitch.org/wiki/Hangup_causes but it's only a list of the codes. The page says "The codes are documented in src\switch_channel.c" but there's no documentation there at all, just the code. Any help would be greatly appreciated. Thanks in advance for your time and help. Regards, -- Nicolás Brenner
Nicolas, I had a similar problem months ago. It turns out that you really want to add the gateway information into the "directory" and not the "sip_profiles". Remove the information you have added into the outbound directory and try adding your gateway into the following directory path. /usr/local/freeswitch/conf/directory/default/ For an example config for sipphone have a look in the directory from you compiled freeswitch. ~/projects/freeswitch/conf/directory/default/ <-- inside here you will find a file named: sipphone.com.noload Just edit the information accordingly and copy this into the directory mentioned previously. Stop and restart your FreeSWITCH process. Let's see how that works for you. Regards, Chris Nicolas Brenner wrote:
Hi, I'm having trouble dialing out some phone numbers through a SIP gateway.
I configured the gateway on conf/sip_profiles/outbound/gizmo.xml as:
<include> <gateway name="gizmo"> <param name="debug" value="1"/> <param name="username" value="1747xxxxxx"/> <param name="from-domain" value="proxy01.sipphone.com"/> <param name="password" value="MYPASSWORD"/> <param name="caller-id-in-from" value="true"/> <param name="proxy" value="proxy01.sipphone.com"/> <param name="expire-seconds" value="3600"/> <param name="register" value="true"/> <param name="retry_seconds" value="3600"/> </gateway> </include>
Then I created an extension on conf/dialplan/public.xml like this:
<extension name="chile"> <condition field="destination_number" expression="^0056(.*)"> <action application="bridge" data="sofia/gateway/gizmo/0056$1"/> </condition> </extension>
The above catches all calls that begin with the 0056 prefix (calls to Chile).
So what I do is, register with a softphone using extension 1000, then I dial 0056xxxxx, and I get a recording saying the extension I'm calling is unavailable. The weird thing is that if I don't use 0056, the call is made, but then I get a recording from Gizmo (my test gateway) saying the number is wrong (of course). If instead of an expression, I dial the fixed number 1-800-466-4411 (Google 411), the called is successfully bridged. Also if I dial a Gizmo user number (1747xxxxxx) the call works. What's the problem with 0056? Apparently the call is never "leaving" freeswitch.
For an unsuccessful call, I get this on the console:
2008-03-27 12:43:59 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/default/1000@medularis01.dyndns.org:5060 [dbbaff68-0791-4253-a07c-ab2c4130df18] 2008-03-27 12:43:59 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing Nico->005624949458@default 2008-03-27 12:43:59 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/outbound/005624949458 [c0b1791c-eb96-464a-bc30-5d6481ed0c10] 2008-03-27 12:44:02 [NOTICE] sofia.c:1950 sofia_handle_sip_i_state() Hangup sofia/outbound/005624949458 [CS_HOLD] [NORMAL_UNSPECIFIED] 2008-03-27 12:44:02 [INFO] mod_dptools.c:1514 audio_bridge_function() Originate Failed. Cause: NORMAL_UNSPECIFIED 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 16 (sofia/outbound/005624949458) Ended 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/outbound/005624949458 [CS_HANGUP] 2008-03-27 12:44:02 [NOTICE] mod_dptools.c:1541 audio_bridge_function() Hangup sofia/default/1000@mydomain:5060 [CS_EXECUTE] [NORMAL_UNSPECIFIED] 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 15 (sofia/default/1000@mydomain:5060) Ended 2008-03-27 12:44:02 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/default/1000@mydomain:5060 [CS_HANGUP]
What does NORMAL_UNSPECIFIED mean?! I found this page on the wiki: http://wiki.freeswitch.org/wiki/Hangup_causes but it's only a list of the codes. The page says "The codes are documented in src\switch_channel.c" but there's no documentation there at all, just the code.
Any help would be greatly appreciated. Thanks in advance for your time and help.
Regards,
Left off a final step prior to restarting FreeSWITCH. Finally, make sure to rename the file to have a .xml extension rather than a .noload extension.
Just edit the information accordingly and copy this into the directory mentioned previously. Stop and restart your FreeSWITCH process.
Chris, Thanks for your help. Actually I first configured my Gizmo account like you say, following the instructions from here: http://wiki.freeswitch.org/wiki/Tested_Phone_Providers_Listing But that doesn't seem right to me, because what I want to do is have a 'SIP trunk', not a SIP user, and for what I understand, the directory configuration is for setting up user accounts. That's why I set up the sip_profile instead of the user in the directory. Anyway, I'm going to try out your suggestion and see how it goes. How should I bridge/route the call? I mean, what should I replace <action application="bridge" data="sofia/gateway/gizmo/0056$1"/> for? Thanks! Nicolas
Nicolas, What you have for your bridging should work fine. Here is how I performed a bridge on my system. <action application="bridge" data="sofia/gateway/sip.vonics.net/$1@sip.vonics.net" /> -Chris Nicolas Brenner wrote:
Chris,
Thanks for your help. Actually I first configured my Gizmo account like you say, following the instructions from here: http://wiki.freeswitch.org/wiki/Tested_Phone_Providers_Listing
But that doesn't seem right to me, because what I want to do is have a 'SIP trunk', not a SIP user, and for what I understand, the directory configuration is for setting up user accounts. That's why I set up the sip_profile instead of the user in the directory.
Anyway, I'm going to try out your suggestion and see how it goes. How should I bridge/route the call? I mean, what should I replace <action application="bridge" data="sofia/gateway/gizmo/0056$1"/> for?
Thanks!
Nicolas
_______________________________________________ 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
Chris, thanks, but the same thing happened, here's my console output for different calls: To Google 411: (<action application="bridge" data="sofia/gateway/proxy01.sipphone.com/18004664411"/>) 2008-03-27 13:36:29 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/default/nico@mydomain:5060 [de6a8904-bc79-4298-a7fd-32529f7b58c0] 2008-03-27 13:36:29 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing Nico->005624949458@public 2008-03-27 13:36:29 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/outbound/18004664411 [73af276e-bccf-4486-8079-64f3a44247a7] 2008-03-27 13:36:30 [NOTICE] sofia.c:1903 sofia_handle_sip_i_state() Channel [sofia/outbound/18004664411] has been answered 2008-03-27 13:36:30 [NOTICE] switch_ivr_originate.c:1171 switch_ivr_originate() Channel [sofia/default/nico@medularis01.dyndns.org:5060] has been answered 2008-03-27 13:36:44 [NOTICE] sofia.c:1950 sofia_handle_sip_i_state() Hangup sofia/default/nico@medularis01.dyndns.org:5060 [CS_EXECUTE] [NORMAL_CLEARING] 2008-03-27 13:36:44 [NOTICE] switch_ivr_bridge.c:374 audio_bridge_on_loopback() Hangup sofia/outbound/18004664411 [CS_RESET] [NORMAL_CLEARING] 2008-03-27 13:36:44 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 1 (sofia/default/nico@mydomain:5060) Ended 2008-03-27 13:36:44 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/default/nico@mydomain:5060 [CS_HANGUP] 2008-03-27 13:36:44 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 2 (sofia/outbound/18004664411) Ended 2008-03-27 13:36:44 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/outbound/18004664411 [CS_HANGUP] To any number in Chile: (<action application="bridge" data="sofia/gateway/proxy01.sipphone.com/0056$1"/>) 2008-03-27 13:37:18 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/default/nico@mydomain:5060 [40b1c2c1-607e-4b4d-ba51-a3106ab8bbda] 2008-03-27 13:37:18 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing Nico->005624949458@public 2008-03-27 13:37:18 [NOTICE] switch_channel.c:531 switch_channel_set_name() New Channel sofia/outbound/005624949458 [0c4d8c5c-dcdc-43ab-9d37-a3349d71f180] 2008-03-27 13:37:18 [NOTICE] sofia.c:1950 sofia_handle_sip_i_state() Hangup sofia/outbound/005624949458 [CS_HOLD] [NORMAL_UNSPECIFIED] 2008-03-27 13:37:18 [INFO] mod_dptools.c:1514 audio_bridge_function() Originate Failed. Cause: NORMAL_UNSPECIFIED 2008-03-27 13:37:18 [NOTICE] mod_dptools.c:1541 audio_bridge_function() Hangup sofia/default/nico@mydomain:5060 [CS_EXECUTE] [NORMAL_UNSPECIFIED] 2008-03-27 13:37:18 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 3 (sofia/default/nico@mydomain:5060) Ended 2008-03-27 13:37:18 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/default/nico@mydomain:5060 [CS_HANGUP] 2008-03-27 13:37:18 [NOTICE] switch_core_session.c:748 switch_core_session_thread() Session 4 (sofia/outbound/005624949458) Ended 2008-03-27 13:37:18 [NOTICE] switch_core_session.c:750 switch_core_session_thread() Close Channel sofia/outbound/005624949458 [CS_HANGUP] Any ideas? Nicolas
I made it work! the problem? my sip provider (Gizmo). I changed the configuration to use voipdiscount (no comments), and the problem went away. By the way, I'm looking for good SIP providers. In the coming months I'll need to handle a lot of load, and I'd also like good rates to mobile phones in Chile and Colombia. I'm in the process of starting testing with Net2Phone, any comments or recommendations? Thanks! Brian, thanks a lot for your help on IRC, I really appreciate it! Regards, Nicolas
participants (2)
-
Chris Danielson
-
Nicolas Brenner