RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
244 stars 215 forks source link

Client keep ringing even after sender of the call hangs up #1692

Open maria-farooq opened 7 years ago

maria-farooq commented 7 years ago

i have 3 registered clients in telestax.restcomm.com: maria, azlan and client2

If we see in DB, instead of 2 calls to maria and azlan we see 4 calls 2 are outbound-api 2 are Client-to-Client

mysql> select sid,parent_call_sid, sender, recipient, ms_id, status, direction from restcomm_call_detail_records order by date_created desc limit 5;
+------------------------------------+------------------------------------+--------------+-----------+-------+-----------+------------------+
| sid                                | parent_call_sid                    | sender       | recipient | ms_id | status    | direction        |
+------------------------------------+------------------------------------+--------------+-----------+-------+-----------+------------------+
| CA2a00d2a9cec1400dac9ffceb2a38bccc | NULL                               | client2 | azlan     | NULL  | BUSY      | Client-To-Client |
| CA9fae4276881e4b0fbd9d8d43c5f5f7ca | NULL                               | client2 | maria     | NULL  | BUSY      | Client-To-Client |
| CA5c9dc61dc3b54d188d12764feeb36a5c | CAb0a3530cd2554f70a8f6abbe043713d3 | client2 | maria     | NULL  | canceled  | outbound-api     |
| CAc2b4556ab100489480634e6d09e2a7ca | CAb0a3530cd2554f70a8f6abbe043713d3 | client2 | azlan     | NULL  | canceled  | outbound-api     |
| CAb0a3530cd2554f70a8f6abbe043713d3 | NULL                               | client2 | 111222    | 2     | completed | inbound          |
+------------------------------------+------------------------------------+--------------+-----------+-------+-----------+------------------+

cc: @croufay @ghjansen

maria-farooq commented 7 years ago

related to https://telestax.zendesk.com/agent/tickets/33779 https://github.com/RestComm/Restcomm-Connect/issues/1693

ghjansen commented 7 years ago

@maria-farooq could you confirm if this behaviour is noticed as constant, of if it happens randomly? No problem if you don't have this info, i just got curious because from my side it seems random, also im using XMS instead of RMS. Thanks!

maria-farooq commented 7 years ago

i tried with RMS and it was not random IIRC.

ghjansen commented 7 years ago

Great, could you confirm RC and RMS versions you used @maria-farooq ?

ghjansen commented 7 years ago

I tried to simulate this issue using RC 7.9.0.1354 and RMS 4.1.0.59 and it seems that the issue cannot be verified there.

gvagenas commented 7 years ago

@maria-farooq @ghjansen the patch I prepared for #1695 takes care to terminate the branches that were created by dial forking, when the initial call terminates. Please check again with the latest binary and update accordingly

ghjansen commented 7 years ago

Great, thanks @gvagenas! @maria-farooq are you able to test this? Let me know if you are not. I just ask because i was not able to reproduce it with my current environment.