sksushilkumar / red5phone

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

Calls failed from softphone to red5phone client. #145

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Debian machine with red5 package and red5phone working.
2. Other Debian machine with Asterisk working.
3. Openlaszlo, Flex or Javascript client and X-lite phone. Both registered on 
Asterisk correctly.
4. Calling from X-lite to Openlaszlo, Flex or Javascript client.
5. First call always is ok, next call almost always is failed.

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

__________________________
| 192.168.14.21 ASTERISK |
| 192.168.14.19 RED5     |
--------------------------

This is tcpdump graph flow capture:

Conv.| Time    | 192.168.14.21                         |
     |         |                   | 192.168.14.19     |                   
0    |4,125    |         INVITE SDP (g711A telephone-eventRTPType-101)          
|SIP From: "4201" <sip:4201@192.168.14.21 To:<sip:4200@192.168.14.19:5074
     |         |(5060)   ------------------>  (5074)   |
0    |4,127    |         100 Trying|                   |SIP Status
     |         |(5060)   <------------------  (5074)   |
0    |4,128    |         180 Ringing                   |SIP Status
     |         |(5060)   <------------------  (5074)   |
0    |6,289    |         200 OK SDP (g711A)            |SIP Status
     |         |(5060)   <------------------  (5074)   |
0    |6,289    |         ACK       |                   |SIP Request
     |         |(5060)   ------------------>  (5074)   |
0    |6,343    |         RTP (g711A)                   |RTP Num packets:352  
Duration:6.929s SSRC:0xF403AFDA
     |         |(12820)  ------------------>  (10004)  |
0    |8,482    |         RTP (g711A)                   |RTP Num packets:225  
Duration:4.581s SSRC:0x9A959AB0
     |         |(12820)  <------------------  (10004)  |
0    |13,278   |         BYE       |                   |SIP Request
     |         |(5060)   <------------------  (5074)   |
0    |13,279   |         200 OK    |                   |SIP Status
     |         |(5060)   ------------------>  (5074)   |
---------------------------------------------------------
1    |18,679   |         INVITE SDP (g711A telephone-eventRTPType-101)          
|SIP From: "4201" <sip:4201@192.168.14.21 To:<sip:4200@192.168.14.19:5074
     |         |(5060)   ------------------>  (5074)   |
1    |18,763   |         100 Trying|                   |SIP Status
     |         |(5060)   <------------------  (5074)   |
1    |27,906   |         CANCEL    |                   |SIP Request
     |         |(5060)   ------------------>  (5074)   |
1    |27,907   |         200 OK    |                   |SIP Status
     |         |(5060)   <------------------  (5074)   |
1    |27,908   |         487 Request Terminated          |SIP Status
     |         |(5060)   <------------------  (5074)   |
1    |27,908   |         ACK       |                   |SIP Request
     |         |(5060)   ------------------>  (5074)   |

** You can see that in the second call RED5 machine is not sending the "180 
Ringing" packet.
** This can happen for a few calls and then return to work properly.

Any idea what´s happend?

What version of the product are you using? On what operating system?

DEBIAN 6
ASTERISK 1.8.3
RED5 0.9.1
RED5PHONE from sip_47.zip

Original issue reported on code.google.com by efadra...@gmail.com on 6 Apr 2011 at 3:14

GoogleCodeExporter commented 9 years ago
Incoming call sometimes fails is a known issue that has never been fixed 
because most people use it for outgoing calls only. The problem is in the mjSIP 
SIP stack, but I never had time to fix it. I think using 2 separate UA objects 
for both incoming and outgoing calls could also fix it.

Original comment by olajide....@gmail.com on 7 Apr 2011 at 7:52

GoogleCodeExporter commented 9 years ago
had any chance for this to be fix?

Original comment by nikig...@gmail.com on 12 Apr 2011 at 2:24

GoogleCodeExporter commented 9 years ago
Nope. I had a another look. Problem is in mJSIP and it needs time to find the 
issue and fix.  Maybe some else can help

Original comment by olajide....@gmail.com on 15 Apr 2011 at 10:48

GoogleCodeExporter commented 9 years ago
Hello! 
How to fix this problem?
please help

Original comment by roman....@gmail.com on 16 Jun 2011 at 1:17

GoogleCodeExporter commented 9 years ago
I too am looking for a fix

Original comment by fota...@gmail.com on 1 Aug 2011 at 6:28

GoogleCodeExporter commented 9 years ago
looks like red5 phone issue, not flex/flash. I wonder who has already fix this 
mjsip stack, any clues where to edit ?

Original comment by assegaf....@gmail.com on 5 Feb 2012 at 5:24

GoogleCodeExporter commented 9 years ago
I found the problem, its org.zoolu.sip.provider.SipProvider ..

Please contact me for details, because I want it to be posted on future release.

Original comment by assegaf....@gmail.com on 7 Feb 2012 at 11:58

GoogleCodeExporter commented 9 years ago
Thank you for finding fix. Can you post the changes here and attach any files 
for me to use directly. I am not doing any development on Red5phone, so I will 
just add you modification directly.

Original comment by olajide....@gmail.com on 9 Feb 2012 at 2:58

GoogleCodeExporter commented 9 years ago
hi mr olajide,

thank you for your reply. Sorry for long response, just take vacation.
here are method to be fixed in Class org.zoolu.sip.provider.SipProvider, 

 public boolean addSipProviderListener(Identifier key, SipProviderListener listener)
   {  printLog("adding SipProviderListener: "+key,LogLevel.MEDIUM);
      boolean ret;
      //Identifier key=id;
      if (listeners.containsKey(key) && !key.toString().equals("INVITE"))
      {  

         printWarning("trying to add a SipProviderListener with a id that is already in use.",LogLevel.HIGH);
         ret=false;

      }
      else {  

          if (listeners.containsKey(key) && key.toString().equals("INVITE") ) {
              printWarning("trying to add a SipProviderListener INVITE Again .. with a id that is already in use, Remove it first .. .",LogLevel.HIGH);
              boolean rmSuccess = removeSipProviderListener(key);
              printWarning("remove success ........... ? "+rmSuccess,LogLevel.HIGH);
          } 

         listeners.put(key,listener);
         ret=true;
      }

      if (listeners!=null)
      {  
         String list="";
         for (Enumeration e=listeners.keys(); e.hasMoreElements();)  { 
             list+=e.nextElement()+", "; 
         }

      printLog(listeners.size()+" listeners: "+list,LogLevel.LOW);
      }
      return ret;
   }

Original comment by assegaf....@gmail.com on 13 Feb 2012 at 12:55

GoogleCodeExporter commented 9 years ago
Can somebody patch this with redfire.jar:

http://code.google.com/p/redfire/

I just cannot get it to compile :(

Original comment by ales.si...@gmail.com on 18 May 2012 at 8:17

GoogleCodeExporter commented 9 years ago
its not related with red5, its related with sip client on red5phone

Original comment by assegaf....@gmail.com on 18 May 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Yeah I know - I'm using redfire (runs on openfire) which is a derivate from 
red5phone. And I'm having the same problems with incoming calls to the Flex 
webphone.

I've decompiled redfire.jar and made the correction in the  
"org.zoolu.sip.provider.SipProvider" class. But I just cannot get it to export 
to redfire.jar (missing libraryes and classes).

Original comment by ales.si...@gmail.com on 18 May 2012 at 8:44

GoogleCodeExporter commented 9 years ago
@assegaf: Questions regarding compiling when done patching file SipProvide.java 
with your solution:

Do I need to patch it with JDK 6 update 1 (via do_mjsip_compile.cmd file), or 
can I use any Java JDK?

And do I need to compile other .java files or just the mjsip ones?

And the last one - did you patch the .54 version of red5phone, or any other 
version.

I compiled the mjsip .java files with jdk 7 - and copied it over (.java and 
.class) to the re5phone sip directory (overwriting the old ones), and when I 
try to register with re5phone I get an Java error regarding JAVA SipProvider - 
so I probably missed something :(

Original comment by ales.si...@gmail.com on 22 May 2012 at 3:47

GoogleCodeExporter commented 9 years ago
any jdk is good, just SipProvider.java
Actually I use, .53 version,

I dont know if later  this red5 solution is good, maybe html5 webrtc will get 
in touch in production later.

From your message, its look like you never compiled java before.

Original comment by assegaf....@gmail.com on 22 May 2012 at 3:53

GoogleCodeExporter commented 9 years ago
Yeah, this is my first time experince with JAVA - pure frustration :)

I will try some more. Thanks for the help!

I've also checked if sip can be done with html5, but as it looks we will have 
to wait some more... I've checked one solution with python, javascript and 
html5 (I think it was from ericsson) but it is not ready for production yet.

Original comment by ales.si...@gmail.com on 22 May 2012 at 5:01