[Freeswitch-users] reading headers in 200 response

Jayesh Nambiar jayesh.voip at gmail.com
Thu Jun 21 19:01:14 MSD 2012


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@
$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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120621/9e4df2a0/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list