<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=GB2312" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.18106">
<STYLE>@font-face {
        font-family: ËÎÌå;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @ËÎÌå;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.7601.18106">
<STYLE>@font-face {
        font-family: ËÎÌå;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @ËÎÌå;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV><FONT color=#000080>
<DIV>Hi, Freeswitch Team</DIV>
<DIV>&nbsp;</DIV>
<DIV>There is problem for to modify the outbound sip header.</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#ff0000>As the freeswitch wiki says, it can modify/add custom 
sip header via below method:</FONT></DIV>
<DIV><FONT color=#ff0000></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT 
color=#ff0000>&lt;action&nbsp;application="set"&nbsp;data="sip_h_X-Charge=1"/&gt;</FONT></DIV></DIV>
<DIV><FONT 
color=#ff0000>&lt;action&nbsp;application="set"&nbsp;data="sip_rh_X-Reason=Destination&nbsp;Number&nbsp;Not&nbsp;in&nbsp;Footprint"/&gt;</FONT></DIV>
<DIV><FONT 
color=#ff0000>&lt;action&nbsp;application="set"&nbsp;data="sip_bye_h_X-Accounting=Some&nbsp;Accounting&nbsp;Data"/&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>Other custom headers prefixed with "sip_bye_h" and "sip_ph"... not found in 
the related messages(BYE, 183).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Could you kindly give comments about this case?</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT 
color=#00ccff>&lt;context&nbsp;name="from-pstn-to-sip"&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;extension&nbsp;name="to-sip"&gt;</FONT></DIV>
<DIV><FONT color=#00ccff></FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&nbsp;handle&nbsp;the&nbsp;case&nbsp;where&nbsp;there&nbsp;might&nbsp;not&nbsp;be&nbsp;destination&nbsp;number&nbsp;at&nbsp;all&nbsp;--&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition&nbsp;field="destination_number"&nbsp;expression="^(.{1,})$"&nbsp;break="never"&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="set"&nbsp;data="destnumber=$1"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;anti-action&nbsp;application="set"&nbsp;data="destnumber=unknown"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/condition&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&nbsp;Dial&nbsp;to&nbsp;the&nbsp;gateway&nbsp;user&nbsp;(it&nbsp;may&nbsp;ring&nbsp;multiple&nbsp;registrations,&nbsp;first&nbsp;answer&nbsp;wins)&nbsp;--&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition&nbsp;field="destination_number"&nbsp;expression="^(.*)$"&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="set"&nbsp;data="hangup_after_bridge=yes"&nbsp;/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="set"&nbsp;data="tone_detect_hits=1"&nbsp;/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="export"&nbsp;data="fax_enable_t38_request=true"&nbsp;/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="export"&nbsp;data="fax_enable_t38=true"&nbsp;/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="tone_detect"&nbsp;data="faxdisable&nbsp;1100&nbsp;r&nbsp;+5000&nbsp;disable_ec&nbsp;1"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="export"&nbsp;data="execute_on_answer=tone_detect&nbsp;fax_disable_ec&nbsp;2100&nbsp;r&nbsp;+5000&nbsp;t38_gateway&nbsp;'self&nbsp;nocng'"&nbsp;/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="set"&nbsp;data="sip_contact_user_replacement=${destnumber}"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="set"&nbsp;data="hangup_after_bridge=yes"/&gt;</FONT></DIV>
<DIV><FONT color=#00ccff></FONT>&nbsp;</DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;!--&nbsp;Uncomment&nbsp;this&nbsp;line&nbsp;to&nbsp;switch&nbsp;to&nbsp;SIP&nbsp;INFO&nbsp;when&nbsp;remote&nbsp;SDP&nbsp;does&nbsp;not&nbsp;support&nbsp;RFC-2833&nbsp;--&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;action&nbsp;application="export"&nbsp;data="sip_info_when_no_2833=false"&nbsp;/&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>
<DIV><FONT 
color=#ff0000><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;action&nbsp;application="set"&nbsp;data="sip_h_X-Charge=1"/&gt;</STRONG></FONT></DIV></DIV>
<DIV><FONT 
color=#ff0000><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;action&nbsp;application="set"&nbsp;data="sip_rh_X-Reason=Destination&nbsp;Number&nbsp;Not&nbsp;in&nbsp;Footprint"/&gt;</STRONG></FONT></DIV>
<DIV><FONT 
color=#ff0000><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;action&nbsp;application="set"&nbsp;data="sip_bye_h_X-Accounting=Some&nbsp;Accounting&nbsp;Data"/&gt;</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV>&nbsp;<FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;!--&nbsp;Uncomment&nbsp;the&nbsp;line&nbsp;below&nbsp;to&nbsp;call&nbsp;directly&nbsp;to&nbsp;a&nbsp;SIP&nbsp;endpoint&nbsp;--&gt; 
</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;!-- 
&lt;action&nbsp;application="bridge"&nbsp;data="sofia/internal/${destnumber}@${sip_remote_ip}:${sip_remote_port}"/&gt;&nbsp;--&gt;</FONT></DIV>
<DIV><FONT color=#00ccff></FONT>&nbsp;</DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&nbsp;&lt;action&nbsp;application="bridge"&nbsp;data="${sofia_contact($${gwuser}@$${domain})}"/&gt;&nbsp;--&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="bridge"&nbsp;data="sofia/external/sip:${destination_number}@172.20.2.17:5062"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action&nbsp;application="hangup"&nbsp;data="${originate_disposition}"/&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/condition&gt;</FONT></DIV>
<DIV><FONT 
color=#00ccff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/extension&gt;</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Windy</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></FONT></DIV></BODY></HTML>