INVITE with multipart content, exception in sip_multipart.c:multipart_clone_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have been looking into pjsip handling of multipart.
I have added tests in multipart_test.c and msg_err_test.c.

1.

The multipart_test originally has one test in it.
That test multipart contains 4 parts with boundary "12345" and the last
part has a nested multipart with 2 parts with boundary "6789".
The message I have problem with is much simpler; it contains 2 parts with
boundary "boundary1".
I cannot get any form of simpler message to work.
In fact if I edit a Body or subbody Epilogue/Prolog of the original test
then the test fails!?

e.g. quite simple:

{
/* Content-type */
"multipart", "mixed", "12345",

/* Body: */
                "\r\n"
"--12345\r\n"
"Content-Type: my/text\r\n"
"\r\n"
"Header and body\r\n"
"--12345\r\n"
"Content-Type: my/text\r\n"
"\r\n"
"Header and body again\r\n"
"--12345--",

&verify1
},
 The test fails with that. Test outputs:
11:09:51.858    err: verify_part rc=-20
11:09:51.858 ..ERROR(-240)

Should the multipart_test handle that okay?

2.

For the INVITE below the msg_err_test doesn't parse it.
If the lines between the first Content-Type: and the following
Content-Length: are removed then parse test works.
(i.e. the Subject:, Contribution-ID:, Proxy-Authorization: lines)


I'd appreciate it if anyone with experience with pjsip and multipart
messages could comment.
I'm just getting familiar with pjsip so I could be doing something
incorrectly.

Thanks!

James.


On 5 February 2014 19:29, James Coleman
<james.coleman at openmindnetworks.com>wrote:

> Hello,
>
> I have an INVITE with multipart content which is causing some trouble.
> INVITE comes to clearwater IMS which uses pjsip.
> Getting a core dump in sip_multipart.c:multipart_clone_data
>
>
> I have added a chunk from our INVITE to pjsip-test multipart.
>  It doesn't like that. "..ERROR(-200)" and "Peak memory size=40 MB"
>
> I have also added a simpler multipart to pjsip-test from this old problem
> report:
>  http://trac.pjsip.org/repos/ticket/1070
>  It doesn't like that either.
>
> Am I doing something wrong here?
> Perhaps someone with pjsip lib experience can say if I'm doing something
> silly!
> Please see attached patch.
>  svn diff pjsip/src/test/multipart_test.c >multipart_test_add_INVITE.patch
>
> Hmmm, if I build latest svn trunk pjsip then make pjsip-test doesn't
> result in multipart tests running ?
> I'd appreciate any help! :-7
>
> Thanks!
>
> James.
>
>
> The INVITE from clearwater bono log: (with some munging of host and phone
> numbers)
>
> 04-02-2014 12:45:17.017 Verbose pjsip: tcps0x7f73b40d TCP connection closed
> 04-02-2014 12:45:17.017 Verbose pjsip: tcps0x7f73b40d TCP transport
> destroyed with reason 70016: End of file (PJ_EEOF)
> 04-02-2014 12:45:26.726 Verbose stack.cpp:200: RX 2169 bytes Request msg
> INVITE/cseq=1 (rdata0x7f73b4092a98) from UDP 88.888.888.888:16399:
> --start msg--
>
> INVITE sip:+888888888888 at openims.test;user=phone SIP/2.0^M
> Call-ID: 7rn78PURzC at 888.888.888.888^M
> CSeq: 1 INVITE^M
> From: <sip:+888889999999@xxxxxxxxxxxx>;tag=Bsn78PUSzC^M
> To: <sip:+888888888888 at openims.test;user=phone>^M
> Via: SIP/2.0/UDP
> 888.888.888.888:5060;branch=z9hG4bK89c6df1ba8b54f300f0400b952d16259353036;rport^M
> Max-Forwards: 70^M
> Contact: <sip:+888889999999 at 888.888.888.888
> :5060;transport=udp>;+sip.instance="<urn:uuid:ee388fc4-f9e1-3dd6-90d8-48c2947787fb>";+g.oma.sip-im;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopush"^M
> Accept-Contact:
> *;+g.oma.sip-im;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopush"^M
> Allow: INVITE,UPDATE,ACK,CANCEL,BYE,NOTIFY,OPTIONS,MESSAGE,REFER^M
> Route:
> <sip:888.88.88.88:5060;transport=udp;lr>,<sip:888-88-88-88:5054;transport=tcp;lr;orig>^M
> P-Preferred-Identity: <sip:+888889999999 at openims.test>^M
> User-Agent: IM-client/OMA1.0 Neusoft-Silta-RCSe-client/2.0.1344.33_TR^M
> Content-Type: multipart/mixed;boundary=boundary1^M
> Subject: Amazeballs or ?^M
> Contribution-ID: d9d5ea4a46d8e0180393a3e7cd0cdda2^M
> Proxy-Authorization: Digest username="+888889999999 at openims.test
> ",uri="sip:+888888888888 at openims.test
> ;user=phone",algorithm=MD5,realm="openims.test",nc=00000002,nonce="6728054437e0f19d",response="f7b30628a50eff6cfff1cbf4441b25cb",cnonce="1391517852372",qop=auth^M
> Content-Length: 791^M
> ^M
> --boundary1^M
> Content-Type: application/sdp^M
> Content-Length: 343^M
> ^M
> v=0^M
> o=- 3600506724 3600506724 IN IP4 888.888.888.888^M
> s=-^M
> c=IN IP4 888.888.888.888^M
> t=0 0^M
> m=message 9 TCP/MSRP *^M
> a=path:msrp://888.888.888.888:7777/1391517924073;tcp^M
> a=setup:active^M
> a=accept-types:message/cpim application/im-iscomposing+xml^M
> a=accept-wrapped-types:text/plain message/imdn+xml
> application/rcspushlocation+xml^M
> a=sendrecv^M
> ^M
> --boundary1^M
> Content-Type: message/cpim^M
> Content-Length: 300^M
> ^M
> From: <sip:anonymous@anonymous.invalid>^M
> To: <sip:anonymous at anonymous.invalid>^M
> NS: imdn <urn:ietf:params:imdn>^M
> imdn.Message-ID: Msg6rn78PUQzC^M
> DateTime: 2014-02-04T12:45:24.000Z^M
> imdn.Disposition-Notification: positive-delivery, display^M
> ^M
> Content-type: text/plain; charset=utf-8^M
> ^M
> Amazeballs or ?^M
> --boundary1--
>
>
>

-- 
 <http://openmindnetworks.com/mobile-operators>

<http://www.linkedin.com/company/76647?trk=fc_badge>

openmindnetworks.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140207/bed54e3f/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux