[SR-Users] How to eliminate Content-Length:0 from sl_send_reply

Pranathi Venkatayogi pvenkatayogi at cyracom.com
Tue Apr 25 14:21:32 CEST 2017


Hi,
  How do I eliminate Content-Length:0 from sip reply when using sl_send_reply?
  I wanted to generate 200 ok, with SDP payload. I appended headers like below. The packet seems ok except there is extra "Content-Length:0", which is causing problems. Any workarounds?

   The packet being generated is: Note the extra content-length: 0 at the end.
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.12:59404;rport=59404;branch=z9hG4bKPjb7d0391f8f7f479b812f6e5feadfa3c5;received=10.11.200.46
From: "cust1" <sip:cust1 at devtranslation.sms-test.cyracom.com>;tag=afcffa277e2a43dc88fafc612f538864
To: <sip:spanish at devtranslation.sms-test.cyracom.com>;tag=37b119f34ca40c158c5b7306e1aa8d72.b73a
Call-ID: 7f73e5d03e15425395fac930eae423bd
CSeq: 31419 INVITE
Content-Type: application/sdp
Content-Length: 350

v=0
o=- 3688213899 3688213900 IN IP4 10.99.52.17
s=Blink 1.4.2 (Windows)
t=0 0
m=message 2855 TCP/MSRP *
c=IN IP4 10.99.52.17
a=path:msrps://10.99.52.17:2855/116701522521345;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
Content-Length: 0

Code in config is:
        append_to_reply("Content-Type: application/sdp\r\n");
        append_to_reply("Content-Length:   350\r\n");
        append_to_reply("\r\n");
        append_to_reply("v=0\r\n");
        append_to_reply("o=- 3688213899 3688213900 IN IP4 MY_IP_ADDR\r\n");
        append_to_reply("s=Blink 1.4.2 (Windows)\r\n");
        append_to_reply("t=0 0\r\n");
        append_to_reply("m=message 2855 TCP/MSRP *\r\n");
        append_to_reply("c=IN IP4 MY_IP_ADDR\r\n");
        append_to_reply("a=path:msrps://MY_IP_ADDR:2855/$var(ssessid);tcp\r\n");
        append_to_reply("a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml\r\n");
        append_to_reply("a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml\r\n");
        append_to_reply("a=setup:active\r\n");

        sl_send_reply("200", "OK");

Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>

Join us:   [cid:image001.gif at 01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720>  [cid:image002.gif at 01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom>  [cid:image003.gif at 01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom>  [cid:image004.gif at 01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>

[cid:image005.png at 01D1C9C9.C4E8B6D0]

DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image011.png
Type: image/png
Size: 405 bytes
Desc: image011.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image012.png
Type: image/png
Size: 458 bytes
Desc: image012.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image013.png
Type: image/png
Size: 607 bytes
Desc: image013.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image014.png
Type: image/png
Size: 516 bytes
Desc: image014.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image015.png
Type: image/png
Size: 9139 bytes
Desc: image015.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170425/d7b775c8/attachment-0004.png>


More information about the sr-users mailing list