Summary: | ASTERISK-14736: asterisk sends no RELEASE_COMPLETE when mISDN Call gets disconnected from asterisk side in 1.6.0.13 and likely others | ||
Reporter: | Schnulli.Maus (schnullimaus) | Labels: | |
Date Opened: | 2009-08-30 13:35:05 | Date Closed: | 2011-07-27 13:32:27 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_misdn |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Trace from mISDN: Sun Aug 30 00:36:27 2009: P[ 4] * IND : HANGUP pid:3 ctx:default dad: oad:*14 State:CONNECTED Sun Aug 30 00:36:27 2009: P[ 4] --> out_cause:16 Sun Aug 30 00:36:27 2009: P[ 4] --> state:CONNECTED Sun Aug 30 00:36:27 2009: P[ 4] I SEND:DISCONNECT oad:29 dad:14 pid:3 Sun Aug 30 00:36:27 2009: P[ 4] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:14 Sun Aug 30 00:36:27 2009: P[ 4] --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:4 Sun Aug 30 00:36:27 2009: P[ 4] I IND :RELEASE oad:29 dad:14 pid:3 state:CLEANING Sun Aug 30 00:36:27 2009: P[ 4] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:14 Sun Aug 30 00:36:27 2009: P[ 4] --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:4 Sun Aug 30 00:36:27 2009: P[ 4] --> No need to queue hangup Sun Aug 30 00:36:27 2009: P[ 4] Cannot hangup chan, no ast Sun Aug 30 00:36:27 2009: P[ 4] $$$ Cleaning up bc with stid :10010400 pid:3 looks like that all data for that call (the ast) gets voided when sending the DISCONNECT, so the RELEASE cannot be associated to a call and no RELEASE_COMPLETE is sent. According to Q931 Specs there must be a RELEASE_COMPLETE sent. ****** ADDITIONAL INFORMATION ****** I tried to trace it down (i am not a programmer) and found a function in chan_misdn.c, where i put a dirty fix: /************************************************************/ /* Receive Events from isdn_lib here */ /************************************************************/ static enum event_response_e cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) (...tons of lines removed...) case EVENT_RELEASE: { bc->need_disconnect = 0; bc->need_release = 0; hangup_chan(ch); /* send RLC on reception of RELEASE */ misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE); release_chan(bc); } break; I just inserted a line of code to send a RELEASE_COMPLETE message, after a short test it seems to do the trick, but i am uncertain wether this is the best place or the best way to fix it. (At least, i feel one should first call release_chan and then send the RELEASE_COMPLETE, but i was afraid that release_chan might void the bc variable. Now the trace looks like this: Sun Aug 30 19:14:45 2009: P[ 4] I SEND:DISCONNECT oad:29 dad:14 pid:4 Sun Aug 30 19:14:45 2009: P[ 4] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:14 Sun Aug 30 19:14:45 2009: P[ 4] --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:4 Sun Aug 30 19:14:45 2009: P[ 4] --> caps:Speech pi:0 keypad: sending_complete:0 Sun Aug 30 19:14:45 2009: P[ 4] --> Channel: mISDN/7-u3 hanguped new state:CLEANING Sun Aug 30 19:14:45 2009: P[ 4] I IND :RELEASE oad:29 dad:14 pid:4 state:CLEANING Sun Aug 30 19:14:45 2009: P[ 4] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:14 Sun Aug 30 19:14:45 2009: P[ 4] --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:4 Sun Aug 30 19:14:45 2009: P[ 4] --> caps:Speech pi:0 keypad: sending_complete:0 Sun Aug 30 19:14:45 2009: P[ 4] ast_hangup already called, so we have no ast ptr anymore in event(RELEASE) Sun Aug 30 19:14:45 2009: P[ 4] --> No need to queue hangup Sun Aug 30 19:14:45 2009: P[ 4] Cannot hangup chan, no ast Sun Aug 30 19:14:45 2009: P[ 4] I SEND:RELEASE_COMPLETE oad:29 dad:14 pid:4 Sun Aug 30 19:14:45 2009: P[ 4] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:14 Sun Aug 30 19:14:45 2009: P[ 4] --> info_dad: onumplan:0 dnumplan:0 rnumplan:0 cpnnumplan:4 Sun Aug 30 19:14:45 2009: P[ 4] --> caps:Speech pi:0 keypad: sending_complete:0 Sun Aug 30 19:14:45 2009: P[ 4] $$$ CLEANUP CALLED pid:4 Sun Aug 30 19:14:45 2009: P[ 4] $$$ Cleaning up bc with stid :10010400 pid:4 Sun Aug 30 19:14:45 2009: P[ 4] Sending Control ECHOCAN_OFF A RELEASE_COMPLETE is now sent as expected. Probably, because of the fix, an unneeded RELEASE_COMPLETE is sent here and there which might cause new problems. I found this when troubleshooting an issue with asterisk connected to my Ackermann Euracom 182 PBX. Sometimes the PBX goes into an undefined state where the caller hears a busy tone and the called persons voice. I was able to reproduce it when the SIP phone which is used to call into the PSTN via asterisk and Euracom just was disconnected from the network, then i started tracing. Have to observe some time if the issue is gone, but i assume that the missing RELEASE_COMPLETE leaves the PBX in an undefined state. But not sending the RELEASE_COMPLETE violates the standards and should be fixed. Best regards, Stephan | ||
Comments: | By: Schnulli.Maus (schnullimaus) 2009-08-31 01:08:48 same issue found in 1.6.0.14, and same workaround applies. By: Russell Bryant (russell) 2011-07-27 13:32:22.506-0500 Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks! |