You might need to upgrade to 3.3.1 to use sdpops module:
http://kamailio.org/docs/modules/stable/modules/sdpops.html
On 08/13/2012 09:52 AM, phillman25 wrote:
Dear List
I am trying to remove specific lines from the following original SDP body:
Content-Type: application/sdp
Content-Length: 406
v=0
o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxx
s=session
c=IN IP4 xxx.xxx.xxx.xxx
b=CT:384
t=0 0
m=audio 11904 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
m=video 11602 RTP/AVP 34 99
a=rtpmap:34 H263/90000
a=rtpmap:99 H264/90000
a=sendrecv
I need to remove the following lines from the above SDP body as my
International carrier does not support Video capabilities:
m=video 15042 RTP/AVP 34 99
a=rtpmap:34 H263/90000
a=rtpmap:99 H264/90000
I used the following code in Kamailio config:
if(has_body("application/sdp") && search_body("m=video")){
subst_body('#m=video ([0-9]+) RTP/AVP (.*)$# #');
subst_body('#a=rtpmap:34 (.*)$# #');
subst_body('#a=rtpmap:99 (.*)$# #');
subst_body('#a=sendrecv(.*)$# #');
}
Content-Type: application/sdp
Content-Length: 325
P-hint: outbound
v=0
o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxx
s=session
c=IN IP4 xxx.xxx.xxx.xxx
b=CT:384
t=0 0
m=audio 11904 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
As you can see the m=video body has been removed, however, calls are
still failing. Is there something i have missed?
I am using Kamailio v3.2.2
Thanking you in advance!
Phillip
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users