jinzigui / imsdroid

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

MSRP message is not sent #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I write a ChatService class.
2.ChatService cs = ChatService.getChatService();
  cs.requestToChat("sip:xxxx@sip2sip.info");
  When receiving 200 OK,I call cs.sendMessage("Hello World!");
3.According to the log info,ChatService::sendMessage return true,but no MSRP 
message is captured.(receiver call msrpSession.accept(); in OnInviteEvent,as 
long as receive the INVITE,receiver accept the INVITE automatically.)

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.
My code as attachment file.Thank you.

Original issue reported on code.google.com by nieyaol...@gmail.com on 4 Jan 2011 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
Through Wireshark,the Sip session can be built.(INVITE and 200 OK).However,call 
sendMessage,no MSRP message is captured,and sendMessage return true!

Original comment by nieyaol...@gmail.com on 4 Jan 2011 at 3:52

GoogleCodeExporter commented 9 years ago
Receiver 
in OnIviteEvent method
public int OnInviteEvent(InviteEvent e) {
            short code = e.getCode();
            String phrase = e.getPhrase();
            tsip_invite_event_type_t type = e.getType();
            //SipMessage message = e.getSipMessage();
            InviteSession session = e.getSession();
            session.accept();
                        ...
}

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

GoogleCodeExporter commented 9 years ago
Could you please send the Android log file?
My email address is diopmamadou (at) doubango (dot) org

Original comment by boss...@yahoo.fr on 7 Jan 2011 at 3:14

GoogleCodeExporter commented 9 years ago
My log file,my code and message captured by Wireshark is already sent to 
diopmamadou@doubango.org.
Thank you!If you need more info,please contact me.

Original comment by twbc.cla...@gmail.com on 9 Jan 2011 at 5:31

GoogleCodeExporter commented 9 years ago
D/MSRP_TEST(  682): msrpSession is not connected

D/MSRP_TEST(  682): sendMessage Hello World! false!

D/MSRP_TEST(  682): 6

D/MSRP_TEST(  682): msrpSession.isConnected() WWWWWW

D/MSRP_TEST(  682): MSRP send WWWWW!

D/org.doubango.imsdroid.Services.Impl.SipService(  682): OnDialogEvent (Dialog 
connected)

E/tinyWRAP(  682): ***ERROR: function: "tnet_sockfd_send()" 

E/tinyWRAP(  682): file: "src/tnet_utils.c" 

E/tinyWRAP(  682): line: "1316" 

E/tinyWRAP(  682): MSG: send failed.

E/tinyWRAP(  682): ***ERROR: function: "tnet_sockfd_send()" 

E/tinyWRAP(  682): file: "src/tnet_utils.c" 

E/tinyWRAP(  682): line: "1316" 

E/tinyWRAP(  682): MSG: (SYSTEM)NETWORK ERROR ==>Bad file number

These log meaning?
(SYSTEM)NETWORK ERROR ==>Bad file number???

Original comment by twbc.cla...@gmail.com on 9 Jan 2011 at 5:45

GoogleCodeExporter commented 9 years ago
       Receiver's code.         
                @Override
        public int OnInviteEvent(InviteEvent e) {
            //short code = e.getCode();
            String phrase = e.getPhrase();
            tsip_invite_event_type_t type = e.getType();
            //SipMessage message = e.getSipMessage();
            InviteSession session = e.getSession();
            session = e.takeMsrpSessionOwnership();
            SipMessage message = e.getSipMessage();
//          System.out.println(session.getId());
            final MyMsrpSession msrpSession = MyMsrpSession.takeIncomingSession(this.sipService.sipStack, (MsrpSession)session, message);
            if(msrpSession != null){
                msrpSession.accept();
            }

Original comment by twbc.cla...@gmail.com on 10 Jan 2011 at 5:21

GoogleCodeExporter commented 9 years ago
attachment is receiver's takingIncomingSession method.

Original comment by twbc.cla...@gmail.com on 10 Jan 2011 at 5:24

GoogleCodeExporter commented 9 years ago
attachment is receiver's takingIncomingSession method.

Original comment by twbc.cla...@gmail.com on 10 Jan 2011 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
I have received your mail and according to your capture you are using two 
emulators. You must use a real device as the emulator's ip address (10.2.0.15) 
isn't routable (only for the incoming connection). You can also send the msrp 
messages to a PC client (e.g. Boghe) from the emulator.

Original comment by boss...@yahoo.fr on 11 Jan 2011 at 1:03

GoogleCodeExporter commented 9 years ago
How can change emulator's IP address?For example,change 10.0.2.15 to 
192.168.10.249?

Original comment by nieyaol...@gmail.com on 11 Jan 2011 at 5:25

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 26 Jan 2011 at 10:55

GoogleCodeExporter commented 9 years ago
Thank you very much. 
but in onInviteEvent method the code's value always equals to 100 and
it is not become 200.
Can you say what can be the reason? or I do smth. wrong.
Please answer.

Original comment by Arian.Sa...@gmail.com on 18 Feb 2011 at 2:17

GoogleCodeExporter commented 9 years ago
could you please attach network trace?
Which client are you using on the remote part?

Original comment by boss...@yahoo.fr on 18 Feb 2011 at 2:34

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 18 Feb 2011 at 2:36

GoogleCodeExporter commented 9 years ago
I am running project on emulator and I use x-lite4.
But can  an emulator be the reason of my problem?
Thanks in advance.

Original comment by Arian.Sa...@gmail.com on 18 Feb 2011 at 2:56

GoogleCodeExporter commented 9 years ago
Thanks.
Now I am running project on emulator and I use ekiga.
And in OnInviteEvent method now e.getcode()  value = 482.
the only reason of my problem  is that I am testing on emulator,isn't it?

Original comment by Arian.Sa...@gmail.com on 18 Feb 2011 at 3:55

GoogleCodeExporter commented 9 years ago
It will not work with Ekiga. YOU MUST FIND A CLIENT WHICH SUPPORT MSRP.
On Windows you can use Boghe (http://code.google.com/p/boghe/), on Linux you 
can try monster.
Off course you can use two IMSDroids.

Original comment by boss...@yahoo.fr on 18 Feb 2011 at 3:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
But if I use emulator and if I will use with  Boghe ,it will  not work ,isn't 
it?
because I am not testing on real android device 

Original comment by Arian.Sa...@gmail.com on 18 Feb 2011 at 4:19

GoogleCodeExporter commented 9 years ago
If the tcp connection is from IMSDroid(emulator) to Boghe then it will work.
If the tcp connection is from Boghe to IMSDroid(emulator) it will not work as 
the IP address advertised by IMSDroid is not routable (10.0.2.15). Once the 
connection is established both will be able to send messages.

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

GoogleCodeExporter commented 9 years ago
I want to know in OnInviteEvent method we must call sendMessage method and in 
the same onInviteEvent method we must call a takeIncomingSession method.I can't 
understand how it can work.Please write smth here.

Original comment by timeandr...@time.com on 18 Feb 2011 at 7:48

GoogleCodeExporter commented 9 years ago
Hi,all
Which method will be called to get the MSRP message content?

Original comment by sundl2...@gmail.com on 23 Feb 2011 at 3:38