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

Problem with Mulipart SDP #129

Open
Earn330 opened this issue Jun 26, 2019 · 7 comments
Open

Problem with Mulipart SDP #129

Earn330 opened this issue Jun 26, 2019 · 7 comments

Comments

@Earn330
Copy link

Earn330 commented Jun 26, 2019

Hi

We need to transfer SIP messages with multipart content through the SEMS SBC module for transfering geolocation in combination with emergency calls. Although i can not find any reason why it does not work the complete sdp part is dropped. I get an error that claims, that the mime body can't be parsed
Is it possible to give you the debug log in a private channel as there a sensible data in it and it doesn't make sense to delete them as i have to delete them all ;)

BR, Björn

@juha-h
Copy link
Contributor

juha-h commented Jun 26, 2019 via email

@Earn330
Copy link
Author

Earn330 commented Jun 27, 2019

I will put an Invite here where I leave out sensible stuff. Please keep in mind, that this Invite is simplified.

INVITE sip:+49ddddddddd@x.x.x.x:5060 SIP/2.0
From: <sip:nnnnnnnn@domain.de>;tag=6DA2C9E877C08A8D
To: <sip:dddd@x.x.x.x>
Call-ID: 187782822C24B596@x.x.x.x
CSeq: 10635 INVITE
Contact: <sip:nnnnnnnn-pjhq8ddet3tu9@x.x.x.x:5060;transport=udp>
Privacy: none
Max-Forwards: 68
Expires: 120
Allow-Events: telephone-event,refer
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,PRACK,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,PUBLISH
Accept: application/sdp, multipart/mixed
Accept-Encoding: identity
Content-Length: 1489
Geolocation: <cid:+49nnnnnnnnn@domain.de>
Content-Type: multipart/mixed;boundary="unique-boundary-1"
Mime-Version: 1.0
P-App-Name: sbc
P-App-Param: profile=out

--unique-boundary-1
Content-Type: application/sdp

v=0
o=user 1090551538 1177155 IN IP4 x.x.x.x
s=call
c=IN IP4 x.x.x.x
t=0 0
m=audio 27292 RTP/AVP 9 8 0 2 102 100 99 101
a=rtpmap:2 G726-32/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:100 G726-40/8000
a=rtpmap:99 G726-24/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20

--unique-boundary-1
Content-Type: application/pidf+xml

Content-ID: <cid:+49nnnnnnnnn@domain.de>
<?xml version="1.0" encoding="UTF-8"?>
.
.
.
.
Lots of xml stuff I can't post in public
.
.
.
.

--unique-boundary-1--

@juha-h
Copy link
Contributor

juha-h commented Jul 2, 2019 via email

@Earn330
Copy link
Author

Earn330 commented Jul 2, 2019

Hi

this is what I get from debug log

Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parse_sip_uri, parse_uri.cpp:338] DEBUG:  Converted URI port (5060) to int (5060)
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parse_via_params, parse_via.cpp:521] DEBUG:  parsed branch: z9hG4bKbf33.891e425fe0128b176fe65b56975b9c46.0
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parse_via_params, parse_via.cpp:544] DEBUG:  has_rport: 0
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [match_request, trans_table.cpp:99] DEBUG:  Matching INVITE request
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parse_sip_uri, parse_uri.cpp:338] DEBUG:  Converted URI port (5060) to int (5060)
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parseParams, AmMimeBody.cpp:302] DEBUG:  parsed new content-type parameter: <boundary>=<"boundary1">
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parse, AmMimeBody.cpp:586] DEBUG:  parsing multi-part body
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [parseMultipart, AmMimeBody.cpp:545] DEBUG:  unexpected end-of-buffer
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [sip_msg2am_request, SipCtrlInterface.cpp:603] DEBUG:  could not parse MIME body
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [handle_sip_request, SipCtrlInterface.cpp:765] DEBUG:  Received new request from <192.168.253.77:5060/udp> on intf #0
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [handleSipMsg, AmSipDispatcher.cpp:105] DEBUG:  method: `INVITE' [6].
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [getActiveProfileMatch, SBC.cpp:282] DEBUG:  active profile = out
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [getActiveProfileMatch, SBC.cpp:294] DEBUG:  using call profile 'out' (from matching active_profile rule '$(paramhdr)')
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [AmSession, AmSession.cpp:87] DEBUG:  dlg = 0x7f62b4003bb0
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [setOAEnabled, AmSipDialog.cpp:210] DEBUG:  enabling offer_answer on SIP dialog ''
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [setRel100State, AmSipDialog.cpp:204] DEBUG:  setting 100rel state for '' to 3
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [setLocalTag, AmSession.cpp:223] DEBUG:  AmSession::setLocalTag() - session id set to 12E90F35-5D11CCF80009E66C-D70CE700
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [startSessionUAS, AmSessionContainer.cpp:297] INFO:  Starting UAS session 12E90F35-5D11CCF80009E66C-D70CE700
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [postEvent, AmEventQueue.cpp:54] DEBUG:  AmEventQueue: trying to post event
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [postEvent, AmEventQueue.cpp:70] DEBUG:  AmEventQueue: event posted
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d70ce700] [handle_sip_request, SipCtrlInterface.cpp:789] DEBUG:  ^^ M [76092B2B2C1096C3@217.70.195.35|] Ru SIP request INVITE handled ^^
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d55b3700] [_start, AmThread.cpp:74] DEBUG:  Thread 140062463047424 is starting.
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d55b3700] [run, AmSession.cpp:261] DEBUG:  startup session
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d55b3700] [run, AmSession.cpp:265] DEBUG:  running session event loop
Jun 25 09:27:52 voip-lab-proxy02 sems[12725]: [#7f62d55b3700] [processingCycle, AmSession.cpp:347] DEBUG:  vv S [|12E90F35-5D11CCF80009E66C-D70CE700] Disconnected, running, 0 UACTransPending, 0 usages vv

@juha-h
Copy link
Contributor

juha-h commented Jul 3, 2019 via email

@juha-h
Copy link
Contributor

juha-h commented Jul 3, 2019

I used sipp to generate multipart/mixed body and got the same "could not parse MIME body" error. I don't myself have need for multipart bodies and therefore lack motivation to start debugging the issue. If you find where the bug is, please create a pull request.

@Earn330
Copy link
Author

Earn330 commented Jul 4, 2019

Unfortunately I'm not able to fix this. If I could do it on my own, I would not have opened an issue here.

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

2 participants