Need to ignore multiple m= in sdp

Hi Folks,

I am running a rather old version of Asterisk (see below), and all I need to do is to somehow ignore the multiple m= coming into from a Cisco 7961G phone. Below is how the SIP OK looks like coming from the Cisco 7961G Phone. If you look at the OK below, you will see that there are multiple m= in the SDP. m=audio and m=video. The problem is that the Cisco phone is sending all 0’s in the m=video portion (don’t know why), and the Asterisk is using that for audio as well, which translates to one way audio.

Is there a quick way to ignore the second m= in the SDP in Asterisk ?



Asterisk 1.4.22-4 RPM

SIP/2.0 200 OK
Via: SIP/2.0/UDP;branch=z9hG4bK5fe0a3e9;rport
From: sip:114@;tag=as1ddfa911
To: sip:103@;transport=udp;tag=001759e96ce045fe7e739029-4cf9f199
Call-ID: 00baf1ad650361113e276d0257859a71@
Date: Mon, 28 Oct 2013 20:03:27 GMT
CSeq: 102 INVITE
Server: Cisco-CP7961G/9.3.1
Contact: sip:103@;transport=udp
Remote-Party-ID: sip:103@;party=called;id-type=subscriber;privacy=off;screen=yes
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Allow-Events: kpml,dialog
Content-Length: 251
Content-Type: application/sdp
Content-Disposition: session;handling=optional

o=Cisco-SIPUA 21707 0 IN IP4
s=SIP Call
t=0 0
m=audio 32636 RTP/AVP 0 101
c=IN IP4
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 0 RTP/AVP 34
c=IN IP4


Backporting the code is likely to be more disruptive than a full upgrade, and you re unlikely to get much help on hacking the source code to ignore the second one, as a better solution already exists, although,if you are a competent coder you should be able to do this for yourself.