Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtpengine: multipart content dropped when used read_sdp_pv #3854

Closed
sergey-safarov opened this issue May 15, 2024 · 1 comment
Closed

rtpengine: multipart content dropped when used read_sdp_pv #3854

sergey-safarov opened this issue May 15, 2024 · 1 comment

Comments

@sergey-safarov
Copy link
Member

Description

When configured read_sdp_pv param for rtpengine module, then multipart content dropped in the body.
And the message cannot be parsed because

Content-Type: multipart/mixed;boundary=level3-boundary

But the message body does not have a separator.

Troubleshooting

Reproduction

To reproduce need to start Kamailio with config file

loadmodule "pv.so"
loadmodule "ctl.so"
loadmodule "corex.so"

loadmodule "sdpops.so"
loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223")
modparam("rtpengine", "read_sdp_pv", "$var(sdp_for_rtpengine)")

listen=udp:x.x.x.x:5060

request_route {
        $var(sdp_for_rtpengine) = $sdp(body);
        rtpengine_manage("ICE=force");
        forward();
}

And then send call using sipp script

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  <send retrans="500">
    <![CDATA[

      INVITE sip:[service]@example.com:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Type: multipart/mixed;boundary=level3-boundary
      Content-Length: [len]

      --level3-boundary
      Content-Type: application/sdp

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000
      --level3-boundary
      Content-Type: application/isup;version=ansi
      Content-Disposition: session;handling=optional

      \x01\x18\x08\x10\x0a\x03\x06\x0d\x03\x80\x90\xa2\x07\x03\x10\x87\x36\x08\x14\x89
      \x0a\x07\x03\x13\x27\x97\x45\x28\x49\xc0\x08\xc0\x03\x10\x65\x41\x17\x88\x67\x3d
      \x01\x11\xc4\x03\x01\x01\x00\xea\x01\x01\xc7\x01\x20\x01\x0d\x0a
      --level3-boundary--

    ]]>
  </send>

If the read_sdp_pv param will be commented in the Kamailio config file, then the resulting message will be properly formatted and have the other multipart media.

@sergey-safarov
Copy link
Member Author

@rfuchs could you look at this?

@rfuchs rfuchs closed this as completed in 48317d3 Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant