[Freeswitch-users] xml lib curl - transfer isn't working

can_man at gmx.de can_man at gmx.de
Thu Dec 25 16:01:50 PST 2008


Hello,

thank you for your answers. I am a step further now, it seems that just the "condition" tags as described in the wiki aren't enough. After sending the following xml I think I get stuck at the point Micheal mentioned:

> The $$ substitutions are only done in the static XML files.  Al

FS complains that: Context default not found


XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="dialplan" description="RE Dial Plan For FreeSwitch">
<context name="public">
<extension name="test10000">
<condition field="destination_number" expression="^(10000)$">
<action application="set" data="domain_name=192.168.178.22"/>
<action application="transfer" data="9999 XML default"/>
</condition>
</extension>
</context>
</section>
</document>

I also tried: <action application="set" data="domain_name=$${domain}"/>

Any idea what else I could use to make sure the default context is found?


The debug looks like this:

freeswitch at voip> 2008-12-26 00:52:09 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/external/anonymous at sipgate.de [0acbfb9c-d2df-11dd-9b87-537be0ec7712]
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_NEW
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:375 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State NEW
2008-12-26 00:52:09 [DEBUG] sofia.c:2529 sofia_handle_sip_i_state() Channel sofia/external/anonymous at sipgate.de entering state [received]
2008-12-26 00:52:09 [DEBUG] sofia.c:2533 sofia_handle_sip_i_state() Remote SDP:
v=0
o=root 29259 29259 IN IP4 217.10.67.141
s=session
c=IN IP4 217.10.77.24
t=0 0
m=audio 42748 RTP/AVP 8 0 3 18 112 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=direction:active
a=nortpproxy:yes

2008-12-26 00:52:09 [DEBUG] sofia_glue.c:2409 sofia_glue_negotiate_sdp() Audio Codec Compare [PCMA:8:8000]/[PCMU:0:8000]
2008-12-26 00:52:09 [DEBUG] sofia_glue.c:2409 sofia_glue_negotiate_sdp() Audio Codec Compare [PCMA:8:8000]/[PCMA:8:8000]
2008-12-26 00:52:09 [DEBUG] sofia_glue.c:1601 sofia_glue_tech_set_codec() Set Codec sofia/external/anonymous at sipgate.de PCMA/8000 20 ms 160 samples
2008-12-26 00:52:09 [DEBUG] sofia_glue.c:2373 sofia_glue_negotiate_sdp() Set 2833 dtmf payload to 101
2008-12-26 00:52:09 [DEBUG] sofia.c:2685 sofia_handle_sip_i_state() (sofia/external/anonymous at sipgate.de) State Change CS_NEW -> CS_INIT
2008-12-26 00:52:09 [DEBUG] switch_core_session.c:806 switch_core_session_signal_state_change() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_INIT
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:432 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State INIT
2008-12-26 00:52:09 [DEBUG] mod_sofia.c:83 sofia_on_init() sofia/external/anonymous at sipgate.de SOFIA INIT
2008-12-26 00:52:09 [DEBUG] mod_sofia.c:111 sofia_on_init() (sofia/external/anonymous at sipgate.de) State Change CS_INIT -> CS_ROUTING
2008-12-26 00:52:09 [DEBUG] switch_core_session.c:806 switch_core_session_signal_state_change() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:432 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State INIT going to sleep
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_ROUTING
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:435 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State ROUTING
2008-12-26 00:52:09 [DEBUG] mod_sofia.c:130 sofia_on_routing() sofia/external/anonymous at sipgate.de SOFIA ROUTING
2008-12-26 00:52:09 [DEBUG] switch_core_state_machine.c:64 switch_core_standard_on_routing() sofia/external/anonymous at sipgate.de Standard ROUTING
2008-12-26 00:52:09 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing anonymous->10000 in context public
2008-12-26 00:52:11 [CONSOLE] mod_xml_curl.c:236 xml_url_fetch() XML response is in /tmp/0accb9ba-d2df-11dd-9b87-537be0ec7712.tmp.xml
2008-12-26 00:52:11 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [test10000] destination_number(10000) =~ /^(10000)$/
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:100 switch_core_standard_on_routing() (sofia/external/anonymous at sipgate.de) State Change CS_ROUTING -> CS_EXECUTE
2008-12-26 00:52:11 [DEBUG] switch_core_session.c:806 switch_core_session_signal_state_change() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:435 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State ROUTING going to sleep
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_EXECUTE
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:442 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State EXECUTE
2008-12-26 00:52:11 [DEBUG] mod_sofia.c:173 sofia_on_execute() sofia/external/anonymous at sipgate.de SOFIA EXECUTE
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:137 switch_core_standard_on_execute() sofia/external/anonymous at sipgate.de Standard EXECUTE
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/external/anonymous at sipgate.de Execute set(domain_name=192.168.178.22)
2008-12-26 00:52:11 [DEBUG] mod_dptools.c:681 set_function() sofia/external/anonymous at sipgate.de SET [domain_name]=[192.168.178.22]
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/external/anonymous at sipgate.de Execute transfer(9999 XML default)
2008-12-26 00:52:11 [DEBUG] switch_ivr.c:1245 switch_ivr_session_transfer() (sofia/external/anonymous at sipgate.de) State Change CS_EXECUTE -> CS_ROUTING
2008-12-26 00:52:11 [DEBUG] switch_core_session.c:806 switch_core_session_signal_state_change() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:11 [DEBUG] switch_ivr.c:1249 switch_ivr_session_transfer() sofia/external/anonymous at sipgate.de receive message [SWITCH_MESSAGE_INDICATE_TRANSFER]
2008-12-26 00:52:11 [DEBUG] switch_core_session.c:510 switch_core_session_perform_receive_message() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:11 [NOTICE] switch_ivr.c:1251 switch_ivr_session_transfer() Transfer sofia/external/anonymous at sipgate.de to XML[9999 at default]
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:442 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State EXECUTE going to sleep
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_ROUTING
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:435 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State ROUTING
2008-12-26 00:52:11 [DEBUG] mod_sofia.c:130 sofia_on_routing() sofia/external/anonymous at sipgate.de SOFIA ROUTING
2008-12-26 00:52:11 [DEBUG] switch_core_state_machine.c:64 switch_core_standard_on_routing() sofia/external/anonymous at sipgate.de Standard ROUTING
2008-12-26 00:52:11 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing anonymous->9999 in context default
2008-12-26 00:52:13 [CONSOLE] mod_xml_curl.c:236 xml_url_fetch() XML response is in /tmp/0c0cade4-d2df-11dd-9b87-537be0ec7712.tmp.xml
2008-12-26 00:52:13 [WARNING] mod_dialplan_xml.c:263 dialplan_hunt() Context default not found
2008-12-26 00:52:13 [INFO] switch_core_state_machine.c:122 switch_core_standard_on_routing() No Route, Aborting
2008-12-26 00:52:13 [NOTICE] switch_core_state_machine.c:123 switch_core_standard_on_routing() Hangup sofia/external/anonymous at sipgate.de [CS_ROUTING] [NO_ROUTE_DESTINATION]
2008-12-26 00:52:13 [DEBUG] switch_channel.c:1494 switch_channel_perform_hangup() Send signal sofia/external/anonymous at sipgate.de [KILL]
2008-12-26 00:52:13 [DEBUG] switch_core_session.c:806 switch_core_session_signal_state_change() Send signal sofia/external/anonymous at sipgate.de [BREAK]
2008-12-26 00:52:13 [DEBUG] switch_core_state_machine.c:435 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State ROUTING going to sleep
2008-12-26 00:52:13 [DEBUG] switch_core_state_machine.c:369 switch_core_session_run() (sofia/external/anonymous at sipgate.de) Running State Change CS_HANGUP
2008-12-26 00:52:13 [DEBUG] switch_core_state_machine.c:400 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State HANGUP
2008-12-26 00:52:13 [DEBUG] mod_sofia.c:287 sofia_on_hangup() Channel sofia/external/anonymous at sipgate.de hanging up, cause: NO_ROUTE_DESTINATION
2008-12-26 00:52:13 [DEBUG] mod_sofia.c:361 sofia_on_hangup() Responding to INVITE with: 404
2008-12-26 00:52:13 [DEBUG] switch_core_state_machine.c:46 switch_core_standard_on_hangup() sofia/external/anonymous at sipgate.de Standard HANGUP, cause: NO_ROUTE_DESTINATION
2008-12-26 00:52:13 [DEBUG] switch_core_state_machine.c:400 switch_core_session_run() (sofia/external/anonymous at sipgate.de) State HANGUP going to sleep
2008-12-26 00:52:13 [DEBUG] switch_core_session.c:938 switch_core_session_thread() Session 22 (sofia/external/anonymous at sipgate.de) Locked, Waiting on external entities
2008-12-26 00:52:13 [NOTICE] switch_core_session.c:956 switch_core_session_thread() Session 22 (sofia/external/anonymous at sipgate.de) Ended
2008-12-26 00:52:13 [NOTICE] switch_core_session.c:958 switch_core_session_thread() Close Channel sofia/external/anonymous at sipgate.de [CS_HANGUP]


Thank you.

Phil

> On Dec 25, 2008, at 3:38 PM, can_man at gmx.de wrote:
> 
> > Hello,
> >
> > I am trying to replace some static settings with dynamic ones which  
> > are provided by a webserver. I can bridge calls that way, however I  
> > just can't get the following transfer to work.
> >
> >
> > The 9999 extension in default looks like this:
> >
> >    <extension name="hold_music">
> >      <condition field="destination_number" expression="^9999$"/>
> >      <condition field="${sip_has_crypto}"  
> > expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
> >        <action application="answer"/>
> >        <action application="execute_extension" data="is_secure XML  
> > features"/>
> >        <action application="playback" data="$${hold_music}"/>
> >        <anti-action application="answer"/>
> >        <anti-action application="playback" data="$${hold_music}"/>
> >      </condition>
> >    </extension>
> >
> >



-- 
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a



More information about the Freeswitch-users mailing list