Author |
Message |
caronte506 Brekeke Junior Member
Joined: 03 Jan 2012 Posts: 5
|
Posted: Tue Jan 03, 2012 12:56 pm Post subject: Remove attribute |
|
|
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/networkpatterns.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 |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Tue Jan 03, 2012 4:15 pm Post subject: |
|
|
> they suggest to remove the "a=rtcp:3550" attribute"
Let you explain why it is the bug. |
|
Back to top |
|
caronte506 Brekeke Junior Member
Joined: 03 Jan 2012 Posts: 5
|
Posted: Wed Jan 04, 2012 8:02 am Post subject: |
|
|
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. |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Wed Jan 04, 2012 10:46 am Post subject: |
|
|
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. |
|
Back to top |
|
caronte506 Brekeke Junior Member
Joined: 03 Jan 2012 Posts: 5
|
Posted: Wed Jan 04, 2012 4:19 pm Post subject: |
|
|
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. |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Wed Jan 04, 2012 6:11 pm Post subject: |
|
|
if you create a session plugin, the following routine can remove "a=rtcp" attribute before the server forwards INVITE packets.
Code: |
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" ) ;
}
}
}
|
|
|
Back to top |
|
skb007 Brekeke Guru
Joined: 05 Oct 2015 Posts: 152
Location: USA
|
Posted: Fri Jul 03, 2020 10:44 pm Post subject: |
|
|
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. |
|
Back to top |
|
Ericcc Brekeke Member
Joined: 21 Apr 2014 Posts: 24
Location: NY, USA
|
Posted: Mon Jul 06, 2020 12:09 pm Post subject: |
|
|
You can get the object of Session description from the method sdpContent.takeSessionDesc().
So the code will be like this.
Code: |
Sdp sdpContent = (Sdp)(Content.getContent(sippacket.content,Sdp.CONTENT_TYPE)) ;
if ( sdpContent != null ) {
SdpDescription sd = sdpContent.takeSessionDesc() ;
if ( sd != null ) {
sd.removeValue("a=sendrecv") ;
}
}
|
|
|
Back to top |
|
skb007 Brekeke Guru
Joined: 05 Oct 2015 Posts: 152
Location: USA
|
Posted: Mon Jul 06, 2020 12:24 pm Post subject: |
|
|
Appreciate your valuable response.
You guys rock...!!! |
|
Back to top |
|
|