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@ $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
participants (1)
-
Jayesh Nambiar