I'm trying to send an Image Thumbnail in a SIP INVITE using JAIN SLEE.
I'm using gov.nist.javax.sip.message.MultipartMimeContent, and what i'm doing is something like this:
bytes[] imageBytes = ... //get bytes from image.
String type[] = {"application", "image"};
String subtype[] = {"sdp", "jpeg"};
String content[] = new String[2];
content[0] = sdp.toString();
content[1] = new String(imageBytes, "UTF-8");
MultipartMimeContent mmc = mfactory.createMultipartMimeContent(cth, type, subtype, content);
INVITE sip:9...@open-ims.test SIP/2.0
CSeq: 4657 INVITE
From: <tel:92;phone-context=open-ims.test>;tag=72f96dc5
To: <sip:9...@open-ims.test>
Via: SIP/2.0/UDP 10.39.40.194:5090;branch=z9hG4bK-383338-ae45f2406b55e410d141dd200e9a18a3
Max-Forwards: 70
Content-Type: multipart/related;type=application/sdp;boundary=boundary22
Allow: PRACK,INFO,INVITE,ACK,BYE,CANCEL,UPDATE,SUBSCRIBE,NOTIFY,REFER,MESSAGE,OPTIONS
Supported: replaces,100rel,timer,norefersub
Accept-Contact: *;+g.3gpp.cs-voice;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-is"
Contribution-ID: a841504e-abaf-4403-a42f-c297a8b1dcf1
Contact: <sip:10.39.40.194:5090;transport=udp>
Content-Length: 6699
--boundary22
Content-Type: application/sdp
v=0
o=user null null IN IP4 10.39.40.194
s=-
c=IN IP4 10.39.40.194
t=0 0
m=message 50345 TCP/MSRP *
a=accept-types:*
a=setup:active
a=sendonly
a=file-selector:name:"bazinga.jpg" size:91902 type:image/jpeg
a=file-transfer-id:17hmdmg9m95cgrsnq2i05go56u
a=file-disposition:render
a=file-range:1-91902
a=file-icon:cid:f0e21544-7e4c-4b91...@open-ims.test
--boundary22
Content-Type: image/jpeg
JFIFC
$.' ",#(7),01444'9=82<.342C 2!!22222222222222222222222222222222222222222222222222T"
}!1AQa"q2#BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w!1AQaq"2B #3Rbr
$4%&'()*56789:CDEFGH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R<4Q@)}MP/_SEyKhER<4Q@)}MP/_SEyKhE^b_{Z(lqU
--boundary22--
this looks pretty good, however, all the caracters that represent the image are parsed as text, and not as bytes... is there anyway i can actual send the bytes and not a string?