Dear List
I am trying to remove specific lines from the following original SDP body:
Content-Type: application/sdpContent-Length: 406
v=0o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxxs=sessionc=IN IP4 xxx.xxx.xxx.xxxb=CT:384t=0 0m=audio 11904 RTP/AVP 0 8 18 101a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:18 G729/8000a=fmtp:18 annexb=noa=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=silenceSupp:off - - - -a=ptime:20a=sendrecvm=video 11602 RTP/AVP 34 99a=rtpmap:34 H263/90000a=rtpmap:99 H264/90000a=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/sdpContent-Length: 325P-hint: outboundv=0o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxxs=sessionc=IN IP4 xxx.xxx.xxx.xxxb=CT:384t=0 0m=audio 11904 RTP/AVP 0 8 18 101a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:18 G729/8000a=fmtp:18 annexb=noa=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=silenceSupp:off - - - -a=ptime:20a=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
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw