Remove attribute

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
caronte506
Posts: 5
Joined: Tue Jan 03, 2012 12:33 pm

Remove attribute

Post by caronte506 »

1. Brekeke Product Name and version: Brekeke SIP Server , Version 2.4.8.6 Standard

2. Java version: 1.6.0_01

3. OS type and the version: Linux 2.6.18-4-686

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

6. Your problem:

I am trying to send calls to a gateway/softwitch but they are rejected with SIP/2.0 400 Bad Request.
Error-Info: <sip:X@A.B.C.D>;cause="[line 034] SIP syntax error"

Looks like it is a bug on the software, they suggest to remove the "a=rtcp:3550" attribute"

Any idea of how?

Thanks
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

> they suggest to remove the "a=rtcp:3550" attribute"

Let you explain why it is the bug.
caronte506
Posts: 5
Joined: Tue Jan 03, 2012 12:33 pm

Post by caronte506 »

What they let me know is that they are not parsing this a=rtcp:3550 attribute correctly.

They think it is due a bug on the running software of their equipment.

That bug was fixed in the next software version (In my case I have to stay with the current version).

This is the CQ posted in the next software release:

The issue was that the grammar for "a=rtcp:.." also picked up "a=rtcp-xr:.."causing parser error. The code has been modified to fix this issue such that the grammar for "a=rtcp:.." does not pick up:"a=rtcp-rx:..". As a result, ignoring the unknown SDP attribute.

This is why they asked me to ask brekeke to remove that attribute.
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

It is still lack of information...

What kind of SIP device are you using?
Do you know who added "a=rtcp" attribute?

Generally, "a=rtcp" attribute is added by UAC.
caronte506
Posts: 5
Joined: Tue Jan 03, 2012 12:33 pm

Post by caronte506 »

Looks like the problems was on the sip client.

I am using Sonus Gateway/Softwitch <--> Brekeke SIP Server <--> SIP client

I was using the client 3CX Phone, after switching to X-Lite 4 the problem is gone.

Thanks for your help.
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

if you create a session plugin, the following routine can remove "a=rtcp" attribute before the server forwards INVITE packets.

Code: Select all

Sdp  sdpContent = (Sdp)( Content.getContent( sippacket.content, Sdp.CONTENT_TYPE ) ) ;
  if ( sdpContent != null ) {

    // Media descriptions
    if ( sdpContent.tblDescMedia != null ) {

      SdpDescription  descMedia ;
      int  n ;
      int  m = sdpContent.tblDescMedia.size() ;  // number of medias

      // loop with each media
      for ( n = 0; n < m; ++n ) {
        // get media description
        descMedia = (SdpDescription)( sdpContent.tblDescMedia.get( n ) ) ;
        descMedia.removeValue( "a=rtcp" ) ;
      }

    }
  }
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

Hi ,

We are using a legacy platform not currently supported by vendor. Our platform is having a problem with the following SDP it receives from UAC. "a=sendrecv" is present as session attribute not as media attribute.

v=0
o=user1 53655765 2353687637 IN IP4 192.168.2.178
s=-
c=IN IP4 192.168.2.178
a=sendrecv
t=0 0
m=audio 24940 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

I tried your plugin but it removes the attributes defined in the media section only. How can I change the code to remove the session attribute. I want to remove "a=sendrecv" from the above SDP.
Ericcc
Posts: 24
Joined: Mon Apr 21, 2014 9:46 am
Location: NY, USA

Post by Ericcc »

You can get the object of Session description from the method sdpContent.takeSessionDesc().

So the code will be like this.

Code: Select all

Sdp  sdpContent = (Sdp)(Content.getContent(sippacket.content,Sdp.CONTENT_TYPE)) ;
if ( sdpContent != null ) {

    SdpDescription  sd = sdpContent.takeSessionDesc() ;
    if ( sd != null ) {
        sd.removeValue("a=sendrecv") ; 
    }

}
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

Appreciate your valuable response.
You guys rock...!!!
Post Reply