joelmap / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

Could you introduce MSRP file-transfer and chat process of IMSDroid? #137

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I did not find where sendFile method is called.
2.How to send file and chat message?
3.How to implement to send SIP BYE message?

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
IMSDroid 1.1.343    on Android 2.2

Please provide any additional information below.

Original issue reported on code.google.com by Splash.P...@gmail.com on 31 Dec 2010 at 6:09

GoogleCodeExporter commented 9 years ago
I want to implement chat based on MSRP.After SIP session(INVITE/200 OK) is 
created,I want to send many MSRP message to chat.When I want to end the chat,I 
may call a method to send SIP BYE message.

Alice send INVITE to Bob.
Bob accept this INVITE.
Alice receive Bob's 200 OK.
-----------------------------------
Alice:Hello Bob!
Bob:Hi~
Alice:How are you?
Bob:Fine.
-----------------------------------
Alice send BYE message to Bob.

Original comment by Splash.P...@gmail.com on 31 Dec 2010 at 6:30

GoogleCodeExporter commented 9 years ago
I want to have a method to control sending BYE message.Now when I call callMsrp 
and sendMessage method,the BYE message will be sent automatically.I want to the 
end of chat(BYE message) is controllable.

Original comment by Splash.P...@gmail.com on 31 Dec 2010 at 6:45

GoogleCodeExporter commented 9 years ago
 // establish an MSRP session
        ActionConfig sessionConfig = new ActionConfig();
        MyMsrpSession msrpSession = MyMsrpSession.createOutgoingSession(sipStack, MediaType.Chat);
        sessionConfig.addHeader("Subject","Hello");
        msrpSession.session.callMsrp("+8521341041108", sessionConfig);
        sessionConfig.delete();

        // Once the session is established
        if(msrpSession.isConnected())
        {
            byte[] content = "Hello Bob!".getBytes();
            final ByteBuffer payload = ByteBuffer.allocateDirect(content.length);
            payload.put(content);

            ActionConfig messageConfig = new ActionConfig();
            messageConfig.setMediaString(twrap_media_type_t.twrap_media_msrp, "content-type", "text/plain;charset=utf-8");
            msrpSession.session.sendMessage(payload, (long)payload.capacity(), messageConfig);
        }

Original comment by Splash.P...@gmail.com on 31 Dec 2010 at 6:46

GoogleCodeExporter commented 9 years ago
In addition,could you introduce the relationship between function calls in MSRP 
process.(INVITE->MSRP message->BYE)

Original comment by Splash.P...@gmail.com on 2 Jan 2011 at 5:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The BYE message will never be sent unless you call "msrpSession.hangup()" or 
the object get destroyed by the garbage collector and finalize() is called.
1. msrpSession.session.getId() will give you the id of the session.
2. "msrpSession.session.callMsrp()" will send the INVITE message. The response 
to the INVITE will be sent to "SipService::OnInviteEvent(InviteEvent e)" 
callback. Call "e.getSession().getId()" to check if it's your session or not.
3. The session states (dialog) changes will be sent to 
"SipService::OnDialogEvent(DialogEvent e)". Call "e.getBaseSession().getId()" 
to check if it's your session or not. To get the session state, call 
"e.getCode()". If the value of the code is equal to 
"tsip_event_code_dialog_connected" this means that your session is connected 
and you are ready to send messages.
4. To send a MSRP message you can use the above code.

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 4:18

GoogleCodeExporter commented 9 years ago
msrpSession.session.callMsrp();  ---> INVITE 
msrpSession.accept();  ---> 200 OK  accept this INVITE

msrpSession.session.sendMessage();  ---> MSRP message
MyMsrpSession::OnEvent() response the MSRP message?

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:44

GoogleCodeExporter commented 9 years ago
MyMsrpSession::OnEvent(): called when you receive new msrp requests (chunks) 
(SEND, AUTH, ...) or response.

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 6:00

GoogleCodeExporter commented 9 years ago
In IMSDroid,after INVITE is accepted,which method(function) is called to send 
file data?

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Please help
Is the code of chat messaging work in your project.
It's only call and doesn't not send message
Please help it's very important for me.

Original comment by Arian.Sa...@gmail.com on 13 Feb 2011 at 7:45

GoogleCodeExporter commented 9 years ago
We have added support for MSRP chat in IMSDroid 2.x.
The source code is under branches/2.0.

Original comment by boss...@yahoo.fr on 21 Apr 2011 at 3:42

GoogleCodeExporter commented 9 years ago
Dear all,

I am working with Imsdroid. 
I fogot same problem with issue 281 
(https://code.google.com/p/imsdroid/issues/detail?id=281), after receive 200 
OK, sender not send msrp message. You fixed it? I using Imsdroid v2.0 last and 
doubango 2.0 last.
Please help me.

Original comment by mr.kun...@gmail.com on 5 Sep 2014 at 9:54