salan1 / imsdroid

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

Which method of MsrpSession should I call for sending a chat message? #119

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.How to call sendLMessage method of MsrpSession class to send a chat message ?
2.sendLMessage(byte[] payload, String ContentType) of MyMsrpSession class is 
not finished,could you give me a code or pseudocode for showing how to call 
method of MsrpSession class in order to finish a chat?
3.I see sendFile method of MyMsrpSession class calls 
callMsrp(actionConfig).Chat message ,such as "Hello Alice!",How should I pass 
"Hello Alice!",ActionConfig only have setMediaString and setMediaInt method.
By the way,please describe callMsrp,sendLMessage and sendFile method of 
MsrpSession class,including overload version.Specially,sendLMessage() have no 
argument and how to pass payload:byte[] ("Hello Alice!")?

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.327  ,on Android 2.2

Please provide any additional information below.

For example,I want to send Request Message as follow
---------------------------------------------------------------------------
INVITE sip:192.168.253.3 SIP/2.0
To: <tel:+8521341041108>
From: <sip:nemo@ims.chinamobile.com>;tag=fy8bsg8q-6i
Call-ID: 10.170.32.117_83_5516001569175573513
CSeq: 1 INVITE
Max-Forwards: 64
Content-Length: 442
Via: SIP/2.0/TCP 
10.170.32.11:5062;branch=z9hG4bK4b9e42f6fd4df179310c943a4054d663jaaaaaaiaaaaaafo
ml5ha3Zqkv7fc433vmcw5fuja
Record-Route: 
<sip:3Zqkv7%0BaGqh4aaaadysip%3Asimba%40ims.chinamobile.com@pcscf.ims.chinamobile
.com:5060;maddr=10.170.32.11;lr>
Contact: 
<sip:10.170.32.117:5065;transport=tcp;fid=imsm_instance_PL_2_4_1>;+g.oma.sip-im
Content-Type: application/sdp
Allow: INVITE, ACK, BYE, CANCEL
Accept-Contact: *;+g.oma.sip-im
Supported: timer
Require: pref
Subject:Hello
P-Asserted-Identity: sip:nemo@ims.chinamobile.com
P-Asserted-Identity: tel:+8521341041107
Min-SE: 3600
P-Access-Network-Info: 3GPP-UTRAN-FDD;utran-cell-id-3gpp=2620209329320065
User-Agent: IM-Serv/OMA1.0/v3.0_IMSM_R1C02
Session-Expires: 3600;refresher=uac
P-Called-Party-ID: <sip:simba@ims.chinamobile.com>

v=0
o=- 1250012797 1250012797 IN IP4 10.170.32.117
s=none
c=IN IP4 10.170.32.117
t=0 0
m=message 4000 TCP/MSRP *
a=accept-types:message/cpim;text/plain;charset=UTF-8;application/im-iscomposing+
xml;image/png;image/x-png;image/jpeg;image/gif;audio/mpeg;audio/x-mpeg;audio/mid
i;x-music/x-midi;audio/wav;audio/x-wav;video/3gpp;video/mp4
a=path:msrp://10.170.32.117:4000/VL1SmRjx0qhi;tcp
a=sendrecv
a=max-size:51200
a=setup:active
a=connection:new
---------------------------------------------------------------------------

Response message as follow
---------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/TCP 
10.170.32.11:5062;branch=z9hG4bK4b9e42f6fd4df179310c943a4054d663jaaaaaaiaaaaaafo
ml5ha3Zqkv7fc433vmcw5fuja
Record-Route: 
<sip:3Zqkv7%0BaGqh4aaaadysip%3Asimba%40ims.chinamobile.com@pcscf.ims.chinamobile
.com:5060;maddr=10.170.32.11;lr>
From: <sip:nemo@ims.chinamobile.com>;tag=fy8bsg8q-6i
To: <tel:+8521341041108>;tag=2604935847
Call-ID: 10.170.32.117_83_5516001569175573513
CSeq: 1 INVITE
Contact: <sip:192.168.253.3>;+g.oma.sip-im
P-Access-Network-Info: 3GPP-UTRAN-FDD;utran-cell-id-3gpp=2620209329320065
Content-Length: 437
Content-Type: application/sdp
Allow: INVITE,OPTIONS,BYE,CANCEL,ACK,SUBSCRIBE,NOTIFY,PUBLISH,MESSAGE,REFER
Session-Expires: 3600;refresher=uac
Supported: timer
Require: timer
Server: SEMC_IMS_R3

v=0
o=- 1250012847 1250012847 IN IP4 192.168.253.3
s=none
c=IN IP4 192.168.253.3
t=0 0
m=message 4322 TCP/MSRP *
a=accept-types:message/cpim;text/plain;charset=UTF-8;application/im-iscomposing+
xml;image/png;image/x-png;image/jpeg;image/gif;audio/mpeg;audio/x-mpeg;audio/mid
i;x-music/x-midi;audio/wav;audio/x-wav;video/3gpp;video/mp4
a=sendrecv
a=max-size:51200
a=connection:new
a=path:msrp://192.168.253.3:4322/1314866162;tcp
---------------------------------------------------------------------------

MSRP SEND message as follow
---------------------------------------------------------------------------
MSRP 466215851 SEND
To-Path: msrp://192.168.245.23:4000/amFDknQZ7OIi;tcp
From-Path: msrp://192.168.245.235:59962/1811611648;tcp
Message-ID: ZdmAg13857-ID00000005-H12M011S2
Byte-Range: 1-9/9
Success-Report: no
Failure-Report: yes
Content-Type: text/plain;charset=utf-8

Hi buddy!
-------466215851$
---------------------------------------------------------------------------

MSRP response message as follow
---------------------------------------------------------------------------
MSRP 466215851 200 OK
To-Path: msrp://192.168.245.235:59962/1811611648;tcp
From-Path: msrp://192.168.245.23:4000/amFDknQZ7OIi;tcp
-------466215851$
---------------------------------------------------------------------------

Original issue reported on code.google.com by yuwenbin...@gmail.com on 9 Dec 2010 at 7:21

GoogleCodeExporter commented 8 years ago
Please write smth.
Any advice can help me.

Original comment by s...@android.com on 2 Mar 2011 at 10:00

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I cannot suggest anything without network trace (WIreshark).

Original comment by boss...@yahoo.fr on 3 Mar 2011 at 11:00

GoogleCodeExporter commented 8 years ago
For information, MSRP chat will be part of v2.0 
(http://code.google.com/p/imsdroid/source/browse/#svn%2Fbranches%2F2.0).

Original comment by boss...@yahoo.fr on 3 Mar 2011 at 11:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I don't need a PNG but the real Wireshark trace because I have to check the SIP 
headers.
In any case, I have changed the priority level from Medium to critical and I 
will add a reference code (MSRP Chat) code into the v2.0 today or tomorrow.

Original comment by boss...@yahoo.fr on 3 Mar 2011 at 11:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,Dear boss...@yahoo
  How to send a message based upon sip protocol rather than msrp protocol.What steps is required?
  I have tried it. But the server response the 202 and the client which runing on android device no message is accepted. 

Original comment by yangziji...@gmail.com on 4 Mar 2011 at 2:32

Attachments:

GoogleCodeExporter commented 8 years ago
Dear boss...@yahoo.fr please help ,I wait to your changes in v2.0.

Original comment by s...@android.com on 4 Mar 2011 at 7:27

GoogleCodeExporter commented 8 years ago
You have now support for MSRP chat in IMSDroid 2.x.
To download the apk: http://code.google.com/p/imsdroid/downloads/list
The source code is under branches/2.0 and depends on android-ngn-stack library 
(same folder).

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

GoogleCodeExporter commented 8 years ago

Original comment by boss...@yahoo.fr on 13 Jul 2011 at 11:54