[Freeswitch-dev] Using Unicode SIP MESSAGE
Ron McLeod
ron.fs at mcleodnet.com
Fri Jul 13 19:32:34 EDT 2007
> -----Original Message-----
> From: freeswitch-dev-bounces at lists.freeswitch.org [mailto:freeswitch-dev-
> bounces at lists.freeswitch.org] On Behalf Of Ron McLeod
> Sent: Sunday, July 08, 2007 11:56 AM
> To: freeswitch-dev at lists.freeswitch.org
> Subject: [Freeswitch-dev] Using Unicode SIP MESSAGE
>
> Has anyone on the list looked at text messaging to SIP UA using Unicode
> rather than ASCII?
>
>
> I have an application that will interface FreeSWITCH to a Chinese PBX
> using
> SIP and will require text messaging support. The PBX currently does not
> support the MESSAGE method so there is some flexibility in the details of
> the interface, but I would like to keep it as interoperable as possible.
> It
> seems like UTF-8 encoding is commonly used with SMTP and HTTP -- I assume
> that would follow for SIP as well.
>
>
> It should be as simple as this:
>
> MESSAGE sip:9997252000 at 192.168.100.133:5060 SIP/2.0
> Via: SIP/2.0/UDP 192.168.100.2:5060;rport;branch=z9hG4bK890156501
> From: "Dispatcher" <sip:9990000000 at 192.168.100.2:5060>;tag=1425782651
> To: <sip:9997252000 at 192.168.100.133:5060>
> Call-ID: 2285408318 at 192.168.100.2:5060
> CSeq: 1000 MESSAGE
> Max-Forwards: 70
> User-Agent: Message Dispatch System
> Content-Type: text/plain; charset=UTF-8
> Content-Length: 9
>
> æ¥æ¬èª
>
>
> Thanks,
> Ron
>
>
I finally got a SIP UA that supports Unicode, so I thought I would post a response in-case anyone else runs in to this in the future.
The message text 测试 (Chinese for "test" – Unicode 6d4b 8bd5) is UTF-8 encoded by the UA and sent as follows:
MESSAGE sip:7502 at sip.siplabs.net SIP/2.0
Via: SIP/2.0/UDP 10.10.0.25:5060;branch=z9hG4bK1024948794;rport
From: "7052" <sip:7502 at sip.siplabs.net>;tag=1533348184
To: <sip:7501 at sip.siplabs.net>
Call-ID: 2106928112 at 10.10.0.25
CSeq: 6006 MESSAGE
Max-Forwards: 10
User-Agent: UTSTARCOM GF210/Device ID-R600
Expires: 60
Content-Type: text/plain; charset=UTF-8
Content-Length: 6
<e6> <b5> <8b> <e8> <af> <95>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20070713/483621a5/attachment.html
More information about the Freeswitch-dev
mailing list