juniorlm87 / sipml5

Automatically exported from code.google.com/p/sipml5
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Quick hangup causes errors #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. initiate a phone call with "SIPml.Session.Call.call()"
2. do a "SIPml.Session.Call.hangup()" anytime before getting a SIP "Ringing" 
response event

What is the expected output? What do you see instead?
Expected to receive a "terminated" event in response to the hangup(). Instead I 
receive a "terminating" event but never receive the "terminated" event. Console 
log also shows a "This/PeerConnection is null: unexpected" error. A similar 
problem occurs when hanging up too soon after a SIPml.Session.accept() on an 
incoming call. In this case, I do receive the expected "terminated" event but I 
get the same "This/PeerConnection is null: unexpected" error in the console log.

Comment: Hanging up quickly is a normal occurrence, e.g. when you notice you 
dialed your boss instead of a coworker, or when you realize you answered a call 
from your psycho ex.

What version of the product are you using? On what operating system?
SIPML5 API version = 1.2.185 on Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by kirk.spe...@gmail.com on 31 May 2013 at 11:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

This issue happens because events of the session of the new incoming call are 
not handled.
You can prevent this by setting the config (in which the session event handler 
is provided) of the new session during the 'i_new_call' session event in the 
session event handler:

case 'i_new_call':
    if (calling) {
        e.newSession.hangup();
    }
    else {
        callSession = e.newSession;
        callSession.setConfiguration(callConf); // when this line is omitted, this issue will occur
    }
    break;

Original comment by mkatw...@gmail.com on 18 Nov 2014 at 3:16