How to send multipart body in invite message?

3.7k Views Asked by At

How to send body with Cintent-Type: multipart/mixed in Invite message through Asterisk server?

I am sending

INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 172.22.212.57:60754;branch=z9hG4bK1522237847
Max-Forwards: 70
From: <sip:[email protected]>;tag=1392040412
To: <sip:[email protected]>
Call-ID: 1990232974-1385880565-1351064234
CSeq: 3 INVITE
Contact: <sip:[email protected]>
Content-Type: multipart/mixed; boundary=unique-boundary-1
Content-Length: 2652
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE, PUBLISH
User-Agent: SIP .NET 1.0, www.independentsoft.com

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

v=0
o=201 2 18299 IN IP4 172.22.212.57
s=SIP Call
c=IN IP4 172.22.212.57
t=0 0
m=audio 40004 RTP/AVP 0
a=rtpmap:0 pcmu/8000

--unique-boundary-1
Content-Type: application/rs-metadata+xml
Content-Disposition: recording-session; handling=required

<?xml version='1.0' encoding='UTF-8'?>
<content>
   ...
</content>

--unique-boundary-1--

Second client receives new Invite message which was created by Asterisk. Asterisk's Invite has content type application/sdp excepth multipart/mixed.

3

There are 3 best solutions below

0
On

Asterisk is voip application and not support multipart/mixed in sip.

0
On

You can use sipp to send multipart/mixed type messages to asterisk,you have to experiment with "nomimetype= " flag in sip.conf file to see what all types are supported in message body

0
On

actually multipart messages are accepted in SIP according to this draft and a good place to start investigating how to obtain them in the dialplan seems to be here. you may need to get your hands dirty writing a module that exposes the XML content though.