daemon: call goes to failure instead of over
Issue generated from Tuleap's migration script. Originally submitted by: Alexandre Lision (alision)
Steps to reproduce:
- make a call
- Bob hangs up
- Alice can go to Failure instead of Over (it does not happen every time I think)
This is the log generated:
1457970175.894|0x70000021d000|tls\_session.cpp:638 ] [TLS] shutdown 1457970175.894|0x1019b7000|siptransport.cpp:209 ] pjsip transport@0x1031c4088 TLS to 208.88.110.46:7170 -> DISCONNECTED 1457970175.894|0x1019b7000|sipcall.cpp:205 ] call:12405873968647423475] Ending call because underlying SIP transport was closed 1457970175.894|0x1019b7000|call.cpp:144 ] [call:12405873968647423475] state change 1/4, cnx 4/0, code 54 1457970175.894|0x1019b7000|call.cpp:163 ] [call:12405873968647423475] emit client call state change FAILURE, code 54 1457970175.894|0x1019b7000|manager.cpp:1778 ] [call:12405873968647423475] Failed 1457970175.894|0x1019b7000|corelayer.cpp:226 ] START STREAM 1457970175.894|0x1019b7000|call\_factory.cpp:39 ] Removing call 12405873968647423475 1457970175.894|0x1019b7000|call\_factory.cpp:43 ] Remaining 0 SIP call(s) 1457970175.895|0x1019b7000|call.cpp:144 ] [call:12405873968647423475] state change 4/5, cnx 0/0, code 0 1457970175.895|0x1019b7000|call.cpp:163 ] [call:12405873968647423475] emit client call state change OVER, code 0
The problem seems to be in the daemon, it emits first a FAILURE state changed before a OVER. LRC puts the call in failed and does nothing when the OVER signal is received:
Log in LRC:
Call State Changed for call "12405873968647423475" . New state : "FAILURE" Call found Call(0x6000002321e0) "Talking" Calling stateChanged "FAILURE" -> 6 on call with state "Talking" . Become "Failed" Call State Changed for call "12405873968647423475" . New state : "OVER" Call found Call(0x6000002321e0) "Failed" Origin and destination states are identical "Failed" "Failed" doing nothing Call(0x6000002321e0) Calling stateChanged "OVER" -> 7 on call with state "Failed" . Become "Failed"