[SR-Users] remove_body() leaves header Content-Type: application/sdp ?

Konstantin M. evilzluk at gmail.com
Sat May 18 08:00:59 CEST 2013


Hello,

I'm using a very ugly code to test remove_body():
request_route
{
        remove_body();
        $rd = "192.168.254.85";
        t_relay();
}

Original INVITE (with SDP):
---------------------------------
U 192.168.254.102:5060 -> 192.168.254.104:5060
INVITE sip:123 at 192.168.254.104 SIP/2.0.
Via: SIP/2.0/UDP 192.168.254.102:5060;branch=z9hG4bK50cdeeb8.
Max-Forwards: 70.
From: "10005" <sip:10005 at 192.168.254.102>;tag=as78ddcd16.
To: <sip:123 at 192.168.254.104>.
Contact: <sip:10005 at 192.168.254.102:5060>.
Call-ID: 79a1c78f01914f1814bfcb7d622cf735 at 192.168.254.102:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 1.8.7.1.
Date: Sat, 18 May 2013 05:47:32 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 269.
.
v=0.
o=root 1763381182 1763381182 IN IP4 192.168.254.102.
s=Asterisk PBX 1.8.7.1.
c=IN IP4 192.168.254.102.
t=0 0.
m=audio 16162 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.
---------------------------------

Modified INVITE (after remove_body()):
---------------------------------
U 192.168.254.104:5060 -> 192.168.254.85:5060
INVITE sip:123 at 192.168.254.85 SIP/2.0.
Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bK6c5c.6160e017.0.
Via: SIP/2.0/UDP 192.168.254.102:5060;branch=z9hG4bK50cdeeb8.
Max-Forwards: 70.
From: "10005" <sip:10005 at 192.168.254.102>;tag=as78ddcd16.
To: <sip:123 at 192.168.254.104>.
Contact: <sip:10005 at 192.168.254.102:5060>.
Call-ID: 79a1c78f01914f1814bfcb7d622cf735 at 192.168.254.102:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 1.8.7.1.
Date: Sat, 18 May 2013 05:47:32 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
*Content-Type: application/sdp.*
Content-Length: 0.
.
---------------------------------

So, remove_body() is actualy removes SDP from request but leaves
Content-Type header. Why ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130518/da91e6dc/attachment.html>


More information about the sr-users mailing list