<!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> </DIV>
<DIV>There is problem for to modify the outbound sip header.</DIV>
<DIV> </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> </DIV>
<DIV>
<DIV><FONT
color=#ff0000><action application="set" data="sip_h_X-Charge=1"/></FONT></DIV></DIV>
<DIV><FONT
color=#ff0000><action application="set" data="sip_rh_X-Reason=Destination Number Not in Footprint"/></FONT></DIV>
<DIV><FONT
color=#ff0000><action application="set" data="sip_bye_h_X-Accounting=Some Accounting Data"/></FONT></DIV>
<DIV> </DIV>
<DIV> </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> </DIV>
<DIV>Could you kindly give comments about this case?</DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT
color=#00ccff><context name="from-pstn-to-sip"></FONT></DIV>
<DIV><FONT
color=#00ccff> <extension name="to-sip"></FONT></DIV>
<DIV><FONT color=#00ccff></FONT></DIV>
<DIV><FONT
color=#00ccff> <!-- handle the case where there might not be destination number at all --></FONT></DIV>
<DIV><FONT
color=#00ccff> <condition field="destination_number" expression="^(.{1,})$" break="never"></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="set" data="destnumber=$1"/></FONT></DIV>
<DIV><FONT
color=#00ccff> <anti-action application="set" data="destnumber=unknown"/></FONT></DIV>
<DIV><FONT
color=#00ccff> </condition></FONT></DIV>
<DIV><FONT
color=#00ccff> </FONT></DIV>
<DIV><FONT
color=#00ccff> <!-- Dial to the gateway user (it may ring multiple registrations, first answer wins) --></FONT></DIV>
<DIV><FONT
color=#00ccff> <condition field="destination_number" expression="^(.*)$"></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="set" data="hangup_after_bridge=yes" /></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="set" data="tone_detect_hits=1" /></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="export" data="fax_enable_t38_request=true" /></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="export" data="fax_enable_t38=true" /></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="tone_detect" data="faxdisable 1100 r +5000 disable_ec 1"/></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="export" data="execute_on_answer=tone_detect fax_disable_ec 2100 r +5000 t38_gateway 'self nocng'" /></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="set" data="sip_contact_user_replacement=${destnumber}"/></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="set" data="hangup_after_bridge=yes"/></FONT></DIV>
<DIV><FONT color=#00ccff></FONT> </DIV>
<DIV><FONT
color=#00ccff>
<!-- Uncomment this line to switch to SIP INFO when remote SDP does not support RFC-2833 --></FONT></DIV>
<DIV><FONT
color=#00ccff>
<action application="export" data="sip_info_when_no_2833=false" /></FONT></DIV>
<DIV> </DIV>
<DIV>
<DIV>
<DIV><FONT
color=#ff0000><STRONG>
<action application="set" data="sip_h_X-Charge=1"/></STRONG></FONT></DIV></DIV>
<DIV><FONT
color=#ff0000><STRONG>
<action application="set" data="sip_rh_X-Reason=Destination Number Not in Footprint"/></STRONG></FONT></DIV>
<DIV><FONT
color=#ff0000><STRONG>
<action application="set" data="sip_bye_h_X-Accounting=Some Accounting Data"/></STRONG></FONT></DIV>
<DIV> </DIV></DIV>
<DIV> <FONT
color=#00ccff>
<!-- Uncomment the line below to call directly to a SIP endpoint -->
</FONT></DIV>
<DIV><FONT
color=#00ccff>
<!--
<action application="bridge" data="sofia/internal/${destnumber}@${sip_remote_ip}:${sip_remote_port}"/> --></FONT></DIV>
<DIV><FONT color=#00ccff></FONT> </DIV>
<DIV><FONT
color=#00ccff> <!-- <action application="bridge" data="${sofia_contact($${gwuser}@$${domain})}"/> --></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="bridge" data="sofia/external/sip:${destination_number}@172.20.2.17:5062"/></FONT></DIV>
<DIV><FONT
color=#00ccff> <action application="hangup" data="${originate_disposition}"/></FONT></DIV>
<DIV><FONT
color=#00ccff> </condition></FONT></DIV>
<DIV><FONT
color=#00ccff> </extension></FONT></DIV></DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV>Windy</DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV></FONT></DIV></BODY></HTML>