[Freeswitch-users] Using Meta-app with curl together

Doug Blacksone dougblackstone at gmail.com
Wed Nov 12 23:16:36 PST 2008


Hello,

I just thought that I might be able to better explain my problem with an
example.  I am not sure if this is a solvable problem, and if not, then the
meta-app function will not work at all.

Both a-leg and b-leg can execute record, stop_record, and attr meta_app.
Even though I have included the feature context in the dialplan generated by
my curl script, when *1 or *2 is pressed, Freeswitch would still go to
webserver to get the dialplan for the features context.  The problem is that
in the xml request submitted by Freeswitch, there is nothing that mentions
the name of the context it is looking for.

Here is the dialplan:
<document type="freeswitch/xml">
<section name="dialplan" description="voicemail dialplan">
<context name="public">
<extension name="test9">
<condition field="destination_number" expression="^(.*)$">
 <action application="export" data="hold_music=silence" />
 <action application="set" data="call_timeout=120" />
 <action application="set" data="hangup_after_bridge=true" />
 <action application="set" data="continue_on_fail=true" />
 <action application="set" data="ringback=$${us-ring}" />
<action application="bind_meta_app" data="1 ab s  execute_extension::record
XML features"/>
<action application="bind_meta_app" data="2 ab s
execute_extension::stoprecord XML features"/>
<action application="bind_meta_app" data="3 ab s
execute_extension::att_xfer XML features"/>
 <action application="bridge" data="sofia/gateway/openser/1000" />
<action application="execute_extension" data="rule XML public"/>
</condition>
</extension>
</context>
    <context name="features">
<extension name="features">
<condition field="destination_number" expression="^att_xfer"
break="on-true">
<action application="read" data="1 20 'tone_stream://%(10000,0,350,440)'
digits 30000 #"/>
<action application="att_xfer" data="sofia/default/${digits}"/>
<action application="set" data="action=att-xfer" />
     <action application="execute_extension" data="att${digits} XML
public"/>
</condition>
<condition field="destination_number" expression="^record" break="on-true">
 <action application="set" data="action=recording" />
<action application="execute_extension" data="rule XML public"/>
</condition>
<condition field="destination_number" expression="stoprecord"
break="on-true">
             <action application="gentones" data="%(500,0,800)" />
  <action application="stop_record_session" data="null"/>
 <action application="set" data="record_file=" />
</condition>
</extension>
    </context>
</section>
</document>

Here is the xml doc Freeswitch sent out when *1 is pressed and it is shown
that Freeswitch does not state the context that it is looking for:

name = Caller-Source value = mod_sofia
name = key_name value =
name = Answer-State value = answered
name = variable_sip_h_P-hint value = inbound->inbound
name = Channel-State value = CS_EXCHANGE_MEDIA
name = Unique-ID value = 5ca4a3b8-21d0-4d4a-89ac-93c6c921b0ed
name = Channel-Read-Codec-Rate value = 8000
name = Caller-Destination-Number value = 1000
name = Caller-Channel-Transfer-Time value = 0
name = variable_local_media_ip value = 192.168.1.101
name = key_value value =
name = Caller-Channel-Progress-Media-Time value = 0
name = Caller-Channel-Answered-Time value = 1226588459893881
name = Channel-Name value = sofia/external/1000
name = Other-Leg-Source value = mod_sofia
name = variable_originator value = 57515855-62d3-445d-b174-7ccbca8f608f
name = variable_max_forwards value = 68
name = Caller-Unique-ID value = 5ca4a3b8-21d0-4d4a-89ac-93c6c921b0ed
name = Caller-Channel-Name value = sofia/external/1000
name = Channel-Read-Codec-Name value = PCMU
name = Other-Leg-Dialplan value = XML
name = hostname value = localhost.localdomain
name = variable_switch_m_sdp value = v=0
o=- 1480481 1480481 IN IP4 192.168.1.100
s=-
c=IN IP4 192.168.1.100
t=0 0
m=audio 16390 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30

name = variable_remote_media_port value = 13442
name = variable_sip_gateway_name value = openser
name = tag_name value =
name = variable_originator_codec value = PCMU at 8000h@30i
name = variable_current_application value = execute_extension
name = Caller-Caller-ID-Number value = 1001
name = variable_write_codec value = PCMU
name = Other-Leg-Privacy-Hide-Name value = false
name = Channel-State-Number value = 5
name = variable_local_media_port value = 13442
name = variable_switch_r_sdp value = v=0
o=- 9 2 IN IP4 192.168.1.102
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.1.102
t=0 0
m=audio 13442 RTP/AVP 0 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

name = variable_hold_music value = silence
name = Caller-Caller-ID-Name value = 1001
name = variable_remote_media_ip value = 192.168.1.102
name = variable_sip_call_id value = b68774cf-2c36-122c-778f-0022190e9476
name = Caller-Dialplan value = XML
name = Other-Leg-Unique-ID value = 57515855-62d3-445d-b174-7ccbca8f608f
name = variable_read_rate value = 8000
name = variable_read_codec value = PCMU
name = Caller-Channel-Hangup-Time value = 0
name = Caller-Profile-Index value = 1
name = variable_endpoint_disposition value = ANSWER
name = Other-Leg-Username value = 1001
name = Caller-Username value = 1001
name = Other-Leg-Privacy-Hide-Number value = false
name = variable_bridge_channel value = sofia/internal/1001 at 192.168.1.101
name = variable_sip_user_agent value = X-Lite release 1011s stamp 41150
name = Caller-Network-Addr value = 192.168.1.101
name = Other-Leg-Screen-Bit value = true
name = Other-Leg-Caller-ID-Name value = 1001
name = Channel-Write-Codec-Name value = PCMU
name = Other-Leg-Network-Addr value = 192.168.1.101
name = variable_signal_bond value = 57515855-62d3-445d-b174-7ccbca8f608f
name = Other-Leg-Caller-ID-Number value = 1001
name = Other-Leg-Context value = public
name = Call-Direction value = outbound
name = Caller-Screen-Bit value = true
name = Caller-Privacy-Hide-Number value = false
name = section value = dialplan
name = Caller-Channel-Created-Time value = 1226588455328603
name = variable_sofia_profile_name value = external
name = Caller-Channel-Progress-Time value = 1226588455767736
name = variable_bridge_uuid value = 57515855-62d3-445d-b174-7ccbca8f608f
name = Caller-Privacy-Hide-Name value = false
name = Other-Leg-Channel-Name value = sofia/internal/1001 at 192.168.1.101
name = Caller-Context value = public
name = Channel-Write-Codec-Rate value = 8000
name = Other-Leg-Destination-Number value = 001000
name = variable_channel_name value = sofia/external/1000
name = variable_bridge_to value = 57515855-62d3-445d-b174-7ccbca8f608f
name = variable_write_rate value = 8000
name = Caller-Profile-Created-Time value = 1226588455328603
name = variable_sip_destination_url value = sip:1000 at 192.168.1.101:5060
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081113/fa4a84ad/attachment-0002.html 


More information about the FreeSWITCH-users mailing list