<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" 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>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT color=#000080 size=2 face=Verdana>Hi, Steve</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>The data is not very large. Normall it's an ISUP
message and no more than 256 bytes.</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>For the base64 encode, can you give an
example?</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana>Thanks</FONT></DIV>
<DIV><FONT color=#c0c0c0 size=2
face=Verdana> <SPAN>windy</SPAN></FONT></DIV><FONT color=#000080 size=2
face=Verdana>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana> 2013-06-05</FONT></DIV>
<HR color=#b5c4df SIZE=1>
<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG> Steven Ayre </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发送时间:</STRONG> 2013-06-05 11:57:05
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>收件人:</STRONG> FreeSWITCH Users Help
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG> Re: [Freeswitch-users] How
to encapsulate binary code to SIP body </FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>Does it have to be sent as binary? How about
using something like base64 to encode it first?
<DIV><BR></DIV>
<DIV>You also want to be careful sending a large amount of data in this way. If
your packet gets larger than the PMTU then you'll get packet fragmentation which
SIP/UDP doesn't handle well.<BR>
<DIV><BR></DIV>
<DIV>-Steve</DIV>
<DIV><BR></DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On 5 June 2013 03:47, windy <SPAN dir=ltr><<A
href="mailto:xiaofengcanyuexp@163.com"
target=_blank>xiaofengcanyuexp@163.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><U></U>
<DIV style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT color=#000080 face=Verdana>Dear support</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>I now need to encapsulate one binary array to FS SIP
body. To be specific:</FONT></DIV>
<DIV><FONT color=#000080>(1) I encoded some info when getting incoming 183.
</FONT></DIV>
<DIV><FONT color=#000080>(2) The encoded info need to be encapsulated as one
of content in SIP body like</FONT></DIV>
<DIV><FONT color=#000080>
content-type=application/test</FONT></DIV>
<DIV><FONT color=#000080>
content-length=74</FONT></DIV>
<DIV><FONT color=#000080>
--boundarycode</FONT></DIV>
<DIV><FONT color=#000080> 1233444444444
--------------------binary code</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>I'd like to add to the sipbody by using:</FONT></DIV>
<DIV><FONT
color=#000080> nua_Respond(...</FONT></DIV>
<DIV><FONT
color=#000080>
...</FONT></DIV>
<DIV><FONT
color=#000080>
SIPTAG_PAYLOAD_STR(), RAG_END).</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>Well, As you know, SIPTAG_PAYLOAD_STR is for string,
it will truncate the binary array before it encapsulats the binary code to SIP
body.</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>Is there any way to encapsulated my binary array to
the SIP boday with "nua_Respond"?</FONT></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080>Thanks</FONT></DIV><SPAN class=HOEnZb><FONT
color=#888888>
<DIV><FONT
color=#000080>Windy</FONT></DIV></FONT></SPAN></DIV><BR>_________________________________________________________________________<BR>Professional
FreeSWITCH Consulting Services:<BR><A
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</A><BR><A
href="http://www.freeswitchsolutions.com"
target=_blank>http://www.freeswitchsolutions.com</A><BR><BR>FreeSWITCH-powered
IP PBX: The CudaTel Communication Server<BR><A href="http://www.cudatel.com"
target=_blank>http://www.cudatel.com</A><BR><BR>Official FreeSWITCH
Sites<BR><A href="http://www.freeswitch.org"
target=_blank>http://www.freeswitch.org</A><BR><A
href="http://wiki.freeswitch.org"
target=_blank>http://wiki.freeswitch.org</A><BR><A
href="http://www.cluecon.com"
target=_blank>http://www.cluecon.com</A><BR><BR>FreeSWITCH-users mailing
list<BR><A
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</A><BR><A
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A
href="http://www.freeswitch.org"
target=_blank>http://www.freeswitch.org</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></FONT></DIV></BODY></HTML>