[Freeswitch-users] custom sip header not working in dialplan
windy
xiaofengcanyuexp at 163.com
Tue May 21 13:41:43 MSD 2013
Hi, Freeswitch Team
There is problem for to modify the outbound sip header.
As the freeswitch wiki says, it can modify/add custom sip header via below method:
<action application="set" data="sip_h_X-Charge=1"/>
<action application="set" data="sip_rh_X-Reason=Destination Number Not in Footprint"/>
<action application="set" data="sip_bye_h_X-Accounting=Some Accounting Data"/>
Now, I add the red lines in dialplan/default.xml. But only the custom header prefixed with "sip_h_" can be shown in the SIP INVITE message.
Other custom headers prefixed with "sip_bye_h" and "sip_ph"... not found in the related messages(BYE, 183).
Could you kindly give comments about this case?
<context name="from-pstn-to-sip">
<extension name="to-sip">
<!-- handle the case where there might not be destination number at all -->
<condition field="destination_number" expression="^(.{1,})$" break="never">
<action application="set" data="destnumber=$1"/>
<anti-action application="set" data="destnumber=unknown"/>
</condition>
<!-- Dial to the gateway user (it may ring multiple registrations, first answer wins) -->
<condition field="destination_number" expression="^(.*)$">
<action application="set" data="hangup_after_bridge=yes" />
<action application="set" data="tone_detect_hits=1" />
<action application="export" data="fax_enable_t38_request=true" />
<action application="export" data="fax_enable_t38=true" />
<action application="tone_detect" data="faxdisable 1100 r +5000 disable_ec 1"/>
<action application="export" data="execute_on_answer=tone_detect fax_disable_ec 2100 r +5000 t38_gateway 'self nocng'" />
<action application="set" data="sip_contact_user_replacement=${destnumber}"/>
<action application="set" data="hangup_after_bridge=yes"/>
<!-- Uncomment this line to switch to SIP INFO when remote SDP does not support RFC-2833 -->
<action application="export" data="sip_info_when_no_2833=false" />
<action application="set" data="sip_h_X-Charge=1"/>
<action application="set" data="sip_rh_X-Reason=Destination Number Not in Footprint"/>
<action application="set" data="sip_bye_h_X-Accounting=Some Accounting Data"/>
<!-- Uncomment the line below to call directly to a SIP endpoint -->
<!-- <action application="bridge" data="sofia/internal/${destnumber}@${sip_remote_ip}:${sip_remote_port}"/> -->
<!-- <action application="bridge" data="${sofia_contact($${gwuser}@$${domain})}"/> -->
<action application="bridge" data="sofia/external/sip:${destination_number}@172.20.2.17:5062"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
Thanks
Windy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130521/75dcbb44/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list