Example 16 Change and Add New Lines to the SDP
In this sample of changing and adding lines from the SDP, the goal is to convert non-standard codec H.263a to H.263. The SIP manipulation would be configured like the following:
sip-manipulation name prop2std-codec-name description rule to translate proprietary to standard codec name header-rule name CodecManp header-name Content-Type action manipulate comparison-type case-sensitive match-value msg-type any new-value methods element-rule name H263a-prop2std parameter-name application/sdp type mime action find-replace-all match-val-type any comparison-type case-sensitive match-value a=rtpmap:([0-9]{1,3}) H263a/.*\r\n new-value a=rtpmap:+$1+" H263/90000"+$CRLF+a=fmtp:+$1+" QCIF=4"+$CRLF
The result of manipulating the original SIP INVITE (shown above) with the configured SIP manipulation is:
INVITE sip:service@192.168.1.61:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.60:5060;branch=z9hG4bK-1-0 From: sipp <sip:sipp@192.168.1.60:5060>;tag=1 To: sut <sip:service@192.168.1.61:5060> Call-ID: 1-15554@192.168.1.60 CSeq: 1 INVITE Contact: <sip:sipp@192.168.1.60:5060;user=phone> Max-Forwards: 70 Content-Type: multipart/mixed;boundary=boundary Content-Length: 466 --boundary Content-Type: application/sdp v=0 o=user1 53655765 2353687637 IN IP4 192.168.1.60 s=- c=IN IP4 192.168.1.60 t=0 0 m=audio 12345 RTP/AVP 8 a=rtpmap:18 G729/8000/1 a=fmtp:18 annexb=no a=sendrecv a=maxptime:200 --boundary Content-Type: application/sdp v=0 o=user1 53655765 2353687637 IN IP4 192.168.1.60 s=- c=IN IP4 192.168.1.60 t=0 0 m=video 12345 RTP/AVP 34 a=rtpmap:34 H263/90000 a=fmtp:34 QCIF=4 --boundary-