[Kamailio-Users] Multipart SDP problem...

Edson - Lists 4lists at gmail.com
Fri Jun 12 03:50:41 CEST 2009


Hi, Juha....

Thanks for the tip....

I implemented the suggested logic on the ONREPLY_ROUTE. It is 
recognizing the multi part SDP, but when "filter_body" is called, it 
returns the following ERROR on the log:

ERROR:textops:filter_body_f: Boundary not found after content

The processed message (a 183 Session Progress with SDP) is bellow. I 
looked at the documentation, but didn't realize what to do...

Edson.


==RELEVANT CODE==================================================
  if (has_body("multipart/mixed")) {
    xlog("L_INFO","            Multipart SDP founded");
    xlog("L_INFO","$rb");
    if (filter_body("application/sdp")) {
      remove_hf("Content-Type");
      append_hf("Content-Type: application/sdp\r\n");
      xlog("L_INFO","            executing 'force_rtp_proxy'");
      force_rtp_proxy();
    } else {
        xlog("L_INFO", "           Multipart SDP, but Body part 
application/sdp not found\n");
    }
  } else {
      xlog("L_INFO","            executing 'force_rtp_proxy'");
      force_rtp_proxy();
  }

==LOG SHOWs=========================================================
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]: ON-REPLY[1] incoming 
reply <100> for <INVITE> <8999>/<pstn-number>
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]: ON-REPLY[1] incoming 
reply <183> for <INVITE> <8999>/<pstn-number>
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]: 
Multipart SDP founded
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]: --uniqueBoundary 
Content-Type: application/sdp    v=0  o=CiscoSystemsSIP-GW-UserAgent 
6554 7546 IN IP4 200.xxx.xx.yy  s=SIP Call  c=IN IP4 200.xxx.xx.yy  t=0 
0  m=audio 18250 RTP/AVP 0  c=IN IP4 200.xxx.xx.yy  a=rtpmap:0 PCMU/8000 
  --uniqueBoundary  Content-Type: application/gtd  Content-Disposition: 
signal;handling=optional    CPG,  PRN,isdn*,,QSIG*,    --uniqueBoundary--
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]: 
ERROR:textops:filter_body_f: Boundary not found after content
Jun 11 22:31:39 Kamailio-151 /sbin/kamailio[11690]:            Multipart 
SDP, but Body part application/sdp not found

==MESSAGE=========================================================
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP 200.xxx.xx.xx;branch=z9hG4bKe54e.5ef97746.0,SIP/2.0/UDP 
192.168.1.139:25862;received=189.WW.WWW.WW;branch=z9hG4bK-d8754z-460ee22e063d0246-1---d8754z-;rport=25862.
From: "Edson - Kamailio"<sip:8999 at kamailio.X.Y.Z>;tag=7d791c57.
To: "PSTN"<sip:pstn-number at kamailio.X.Y.Z>;tag=E1444EE0-12C9.
Date: Fri, 12 Jun 2009 01:31:39 gmt.
Call-ID: M2UzMjVmYjM1Mjg2N2IwMWYyYWIxOGM1NjJmMTg1YWE..
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 2 INVITE.
Allow-Events: telephone-event.
Contact: <sip:pstn-number at 200.xxx.xx.yy:5060>.
Record-Route: <sip:200.xxx.xx.xx;lr=on;nat=yes>.
MIME-Version: 1.0.
Content-Type: multipart/mixed;boundary=uniqueBoundary.
Content-Length: 378.
.
--uniqueBoundary.
Content-Type: application/sdp.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 6554 7546 IN IP4 200.xxx.xx.yy.
s=SIP Call.
c=IN IP4 200.xxx.xx.yy.
t=0 0.
m=audio 18250 RTP/AVP 0.
c=IN IP4 200.xxx.xx.yy.
a=rtpmap:0 PCMU/8000.
--uniqueBoundary.
Content-Type: application/gtd.
Content-Disposition: signal;handling=optional.
.
CPG,.
PRN,isdn*,,QSIG*,.
.
--uniqueBoundary--.


Juha Heinanen escreveu:
> Edson - Lists writes:
> 
>  > Maybe, then, someone could point me to how to disable multipart SDP on 
>  > Cisco AS5300 GWs.... I already dig it on Cisco and Google sites, but so 
>  > far nothing founded...
> 
> instead of disabling multipart in cisco, may be you could use this
> textops function hack that i wrote for the purpose:
> 
> 1.3.16.  filter_body(content_type)
> 
>    Filters multipart body by leaving out all other body parts
>    except the first body part of given type.
> 
>    Meaning of the parameters is as follows:
>      * content_type - Content type to be left in the body.
> 
>    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
>    FAILURE_ROUTE, BRANCH_ROUTE.
> 
>    Example 1.16. filter_body usage
> ...
> if (has_body("multipart/mixed")) {
>     if (filter_body("application/sdp") {
>         remove_hf("Content-Type");
>         append_hf("Content-Type: application/sdp\r\n");
>     } else {
>         xlog("Body part application/sdp not found\n");
>     }
> }
> ...
> 
> -- juha
> 




More information about the sr-users mailing list