Problems with CURL_XML and bridging ?
Hi, I'm trying to get a basic CURL XML going that will dynamically manage DDI numbers as part of a database-driven follow me function. My database generates the following output : <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="CURL Dialplan Result"> <context name="public"> <extension name="curl_dialplan"><condition field="destination_number" expression="^(87654321)$"> <action application="set" data="domain_name=my.domain.name"/> <!-- <action application="bridge" data="sofia/gateway/mygate/12345678"/> --> <action application="transfer" data="1000 XML default"/> </condition> </extension> </context> </section> </document> When the action is "transfer", everything works great. However when "transfer" is the commented one and bridge is active nothing works. I have tried adding <action application="set" data="hangup_after_bridge=true"/> when bridging, but that has no effect either. Here's what it looks like when trying to bridge : 2012-01-14 15:19:24.136494 [INFO] mod_dialplan_xml.c:481 Processing 12345678 <12345678>->87654321 in context public Dialplan: sofia/internal/12345678@192.168.1.134 parsing [public->curl_dialplan] continue=false Dialplan: sofia/internal/12345678@192.168.1.134 Regex (PASS) [curl_dialplan] destination_number(87654321) =~ /^(87654321)$/ break=on-false Dialplan: sofia/internal/12345678@192.168.1.134 Action set(domain_name=my.domain.name) Dialplan: sofia/internal/12345678@192.168.1.134 Action bridge(sofia/gateway/mygate/12345678) 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:154 (sofia/internal/12345678@192.168.1.134) State Change CS_ROUTING -> CS_EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/internal/12345678@192.168.1.134 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/internal/12345678@192.168.1.134) State ROUTING going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/12345678@192.168.1.134) Running State Change CS_EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:417 (sofia/internal/12345678@192.168.1.134) State EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:241 sofia/internal/12345678@192.168.1.134 SOFIA EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:192 sofia/internal/12345678@192.168.1.134 Standard EXECUTE EXECUTE sofia/internal/12345678@192.168.1.134 set(domain_name=my.domain.name) 2012-01-14 15:19:24.176505 [DEBUG] mod_dptools.c:1281 sofia/internal/12345678@192.168.1.134 SET [domain_name]=[my.domain.name] EXECUTE sofia/internal/12345678@192.168.1.134 bridge(sofia/gateway/mygate/12345678) 2012-01-14 15:19:24.176505 [DEBUG] switch_ivr_originate.c:1884 Parsing global variables 2012-01-14 15:19:24.176505 [NOTICE] switch_channel.c:930 New Channel sofia/external/12345678 [2408b0f2-3ec3-11e1-afaf-89a010d7e66c] 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:4674 (sofia/external/12345678) State Change CS_NEW -> CS_INIT 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_INIT 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:401 (sofia/external/12345678) State INIT 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:85 sofia/external/12345678 SOFIA INIT 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:125 (sofia/external/12345678) State Change CS_INIT -> CS_ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:401 (sofia/external/12345678) State INIT going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_channel.c:1890 (sofia/external/12345678) Callstate Change DOWN -> RINGING 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/external/12345678) State ROUTING 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:148 sofia/external/12345678 SOFIA ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_ivr_originate.c:66 (sofia/external/12345678) State Change CS_ROUTING -> CS_CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/external/12345678) State ROUTING going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:429 (sofia/external/12345678) State CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:429 (sofia/external/12345678) State CONSUME_MEDIA going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [calling][0] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [terminated][503] 2012-01-14 15:19:24.316487 [DEBUG] switch_channel.c:2852 (sofia/external/12345678) Callstate Change RINGING -> HANGUP 2012-01-14 15:19:24.316487 [NOTICE] sofia.c:6258 Hangup sofia/external/12345678 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
The logs show you are getting a "NORMAL_TEMPORARY_FAILURE" from the endpoint. Have you tried a real number..? -Avi On Sat, Jan 14, 2012 at 8:51 PM, Bob Smith <gb10hkzo-freeswitch@yahoo.co.uk>wrote:
Hi,
I'm trying to get a basic CURL XML going that will dynamically manage DDI numbers as part of a database-driven follow me function.
My database generates the following output :
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="CURL Dialplan Result"> <context name="public"> <extension name="curl_dialplan"><condition field="destination_number" expression="^(87654321)$"> <action application="set" data="domain_name=my.domain.name"/> <!-- <action application="bridge" data="sofia/gateway/mygate/12345678"/> --> <action application="transfer" data="1000 XML default"/> </condition> </extension> </context> </section> </document>
When the action is "transfer", everything works great. However when "transfer" is the commented one and bridge is active nothing works.
I have tried adding <action application="set" data="hangup_after_bridge=true"/> when bridging, but that has no effect either.
Here's what it looks like when trying to bridge :
2012-01-14 15:19:24.136494 [INFO] mod_dialplan_xml.c:481 Processing 12345678 <12345678>->87654321 in context public Dialplan: sofia/internal/12345678@192.168.1.134 parsing [public->curl_dialplan] continue=false Dialplan: sofia/internal/12345678@192.168.1.134 Regex (PASS) [curl_dialplan] destination_number(87654321) =~ /^(87654321)$/ break=on-false Dialplan: sofia/internal/12345678@192.168.1.134 Action set(domain_name= my.domain.name) Dialplan: sofia/internal/12345678@192.168.1.134 Action bridge(sofia/gateway/mygate/12345678) 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:154 (sofia/internal/12345678@192.168.1.134) State Change CS_ROUTING -> CS_EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/internal/12345678@192.168.1.134 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/internal/12345678@192.168.1.134) State ROUTING going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/12345678@192.168.1.134) Running State Change CS_EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:417 (sofia/internal/12345678@192.168.1.134) State EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:241 sofia/internal/ 12345678@192.168.1.134 SOFIA EXECUTE 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:192 sofia/internal/12345678@192.168.1.134 Standard EXECUTE EXECUTE sofia/internal/12345678@192.168.1.134 set(domain_name= my.domain.name) 2012-01-14 15:19:24.176505 [DEBUG] mod_dptools.c:1281 sofia/internal/ 12345678@192.168.1.134 SET [domain_name]=[my.domain.name] EXECUTE sofia/internal/12345678@192.168.1.134bridge(sofia/gateway/mygate/12345678) 2012-01-14 15:19:24.176505 [DEBUG] switch_ivr_originate.c:1884 Parsing global variables 2012-01-14 15:19:24.176505 [NOTICE] switch_channel.c:930 New Channel sofia/external/12345678 [2408b0f2-3ec3-11e1-afaf-89a010d7e66c] 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:4674 (sofia/external/12345678) State Change CS_NEW -> CS_INIT 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_INIT 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:401 (sofia/external/12345678) State INIT 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:85 sofia/external/12345678 SOFIA INIT 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:125 (sofia/external/12345678) State Change CS_INIT -> CS_ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:401 (sofia/external/12345678) State INIT going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_channel.c:1890 (sofia/external/12345678) Callstate Change DOWN -> RINGING 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/external/12345678) State ROUTING 2012-01-14 15:19:24.176505 [DEBUG] mod_sofia.c:148 sofia/external/12345678 SOFIA ROUTING 2012-01-14 15:19:24.176505 [DEBUG] switch_ivr_originate.c:66 (sofia/external/12345678) State Change CS_ROUTING -> CS_CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:410 (sofia/external/12345678) State ROUTING going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:362 (sofia/external/12345678) Running State Change CS_CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:429 (sofia/external/12345678) State CONSUME_MEDIA 2012-01-14 15:19:24.176505 [DEBUG] switch_core_state_machine.c:429 (sofia/external/12345678) State CONSUME_MEDIA going to sleep 2012-01-14 15:19:24.176505 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.176505 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [calling][0] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] switch_core_session.c:875 Send signal sofia/external/12345678 [BREAK] 2012-01-14 15:19:24.316487 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [terminated][503] 2012-01-14 15:19:24.316487 [DEBUG] switch_channel.c:2852 (sofia/external/12345678) Callstate Change RINGING -> HANGUP 2012-01-14 15:19:24.316487 [NOTICE] sofia.c:6258 Hangup sofia/external/12345678 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
_________________________________________________________________________ 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
On 14/01/12 18:51, Bob Smith wrote:
2012-01-14 15:19:24.176505 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [calling][0] 2012-01-14 15:19:24.316487 [DEBUG] sofia.c:5494 Channel sofia/external/12345678 entering state [terminated][503] 2012-01-14 15:19:24.316487 [DEBUG] switch_channel.c:2852 (sofia/external/12345678) Callstate Change RINGING -> HANGUP 2012-01-14 15:19:24.316487 [NOTICE] sofia.c:6258 Hangup sofia/external/12345678 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Looks like you are getting a 503 somewhere... try doing a SIP trace for a call, but you might be getting rejected by the far end or something (so an issue with your gateway configuration or bridge command, not with xml_curl specifically). Regards,
Has it occurred to you that I might be obfuscating my numbers when posting in public to protect the innocent ? ;-)
Have you tried a real number..?
Bridging works just fine thank you. Have been using the same PSTN destination number via the same gateway for testing stuff all last week.
but you might be getting rejected by the far end or something
So doing the bridge to the same number with static XML worked, but when bridging to the exact same endpoint with xml_curl you're getting a 503? Either way, it seems to be an actual endpoint response. A sip trace as Paul suggested might show something.. (BTW, I have been noticing several carriers sending a 503 instead of a busy..) -Avi On Sat, Jan 14, 2012 at 9:23 PM, Bob Smith <gb10hkzo-freeswitch@yahoo.co.uk>wrote:
Has it occurred to you that I might be obfuscating my numbers when posting in public to protect the innocent ? ;-)
Have you tried a real number..?
Bridging works just fine thank you. Have been using the same PSTN destination number via the same gateway for testing stuff all last week.
but you might be getting rejected by the far end or something
_________________________________________________________________________ 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
participants (3)
-
Avi Marcus
-
Bob Smith
-
Paul Cupis