reading headers in 200 response
Hi All,
Is it possible in freeswitch to read headers in 200 OK response. What I am trying to do is route all calls to an opensips server from my freeswitch and when a call answers; opensips sends a header in 200 response, for eg: X-Record: Yes or X-Record. So I was checking if I can read this header in freeswitch and call record_session to record that call inside freeswitch? I was trying something similar, can this work?:
<extension name="call_routing">
<condition field="destination_number" expression="^(\d+)$">
<action application="export" data="execute_on_answer=set_record_status ${sip_h_X-Record}"/>
<action application="set" data="execute_on_answer=execute_extension check_recording"/>
<action application="bridge" data="{sip_invite_domain=${sip_from_host},ignore_display_updates=true}sofia/${context}/$1 <at> $mydomain"/>
</condition>
</extension>
<extension name="check_recording">
<condition field="${record_status}" expression="Yes">
<action application="record_session" data="/usr/local/freeswitch/recordings/extensions/123456.mp3"/>
</condition>
</extension>
Can someone help me in understanding if this is possible with freeswitch.
Thanks,
--- Jayesh
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@... 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 Join Us At ClueCon - Aug 7-9, 2012 FreeSWITCH-users mailing list FreeSWITCH-users@... http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
RSS Feed