Summary: | ASTERISK-13471: [patch] Segfault if you transfer a call into a meetme room | ||
Reporter: | Sven Hirschmueller (sodom) | Labels: | |
Date Opened: | 2009-01-28 08:44:50.000-0600 | Date Closed: | 2009-07-14 14:49:48 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_misdn |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) gdb.txt ( 1) misdn_xfer_v14_r205839.patch | |
Description: | Asterisk crashes with a seg fault if you transfer a call (via ISDN Transfer) into a meetme room. Hold/Retrive between PRI-Zaptel and/or other mISDN channels works. e.g. Phone No: 10 connected to port 3 Phone No: 11 connected to port 4 Meetme: Call No: 771 routes into Meetme-Room 9991 (static) You connect 11 to 10 (success) -> then press R for hold on 11 (success), 10 gets MOH -> dial 771 on 11 (success) you get anouncement of MeetMe -> hang up 11 to transfer 10 to MeetMe -> (crash, seg fault) ****** ADDITIONAL INFORMATION ****** I tracked down the error to the misdn_transfer method. It seems that the endpoint of the meetme-room isn't correctly insert into the channel struct. in function misdn_transfer_bc in chan_misdn.c the resolvment of the meetme-endpoint channel causes the seg fault as the result of ast_bridged_channel for the meetme endpoint is null. static void misdn_transfer_bc(struct chan_list *tmp_ch, struct chan_list *holded_chan) { chan_misdn_log(1, 0, "TRANSFERRING %s to %s\n", holded_chan->ast->name, tmp_ch->ast->name); tmp_ch->state = MISDN_HOLD_DISCONNECT; ast_moh_stop(ast_bridged_channel(holded_chan->ast)); holded_chan->state=MISDN_CONNECTED; /* misdn_lib_transfer(holded_chan->bc); */ ast_channel_masquerade(holded_chan->ast, ast_bridged_channel(tmp_ch->ast)); // <-- HERE IS THE CRASH as tmp_ch->ast dind't seem to contain the correct data. } mISDN: 1.1.8 Kernel: 2.6.24.7 Asterisk: 1.4.23.1 | ||
Comments: | By: Sven Hirschmueller (sodom) 2009-01-29 07:54:26.000-0600 crich offered a workaround. if you first generate a locale channel and connect that channel to a meetme you seem to be able to transfer in and out as you like without any problems. e.g. [special-meetme] exten => 111,1,Meetme() [meetme] exten => 123,1,Dial(Local/111@special-meetme) By: Leif Madsen (lmadsen) 2009-01-29 07:59:02.000-0600 In order to resolve the crash, we'll need a backtrace of the crash (not the core file). See the doc/backtrace.txt file in your Asterisk source directory. Be sure you enable DONT_OPTIMIZE in the Compiler Flags option of menuselect, recompile and install (make install), reproduce the crash, then follow the instructions in backtrace.txt, and attach that file to this bug. Thanks! By: Sven Hirschmueller (sodom) 2009-02-09 05:44:36.000-0600 sorry, i can't give you a backtrace in the moment. I only have access to production systems in the moment and on them i can't fiddle with the asterisk. I will generate a backtrace after i got my "playbox" back. On the other hand do i think that i already tracked down the problem. The problem is quite simple that chan_misdn can't transfer to a application, it can only transfer to channels. If you check the "additional informations" section, i marked the code segment that causes the seg fault there. so sorry, please be paitioned. By: Sven Hirschmueller (sodom) 2009-03-09 04:46:52 So, i attached a backtrace of the crash. Hope you can read it. By: Leif Madsen (lmadsen) 2009-03-10 11:30:14 I'm assigning this to Tilghman for now to see if there is anything he can read in the backtrace to determine a fix here. However he may just end up re-assigning as Tilghman isn't really a chan_misdn specialist. Thanks! By: Joshua C. Colp (jcolp) 2009-03-10 11:35:22 I'm bouncing this back to confirmed since the issue is clear from reading the code that it just does not support transferring to an application. Support will have to be added for it. By: Richard Mudgett (rmudgett) 2009-07-10 19:12:39 There are several outstanding problems with the chan_misdn transfer feature that individual fixes would conflict with each other. Therefore, the misdn_xfer_v14_r205839.patch file fixes the following issues: JIRA ABE-1903 - Orphaned held calls left in music-on-hold. issue 0014692 - Held calls are not automatically cleared after transfer. issue 0014355 - Crash if attempt to transfer a call to an application. By: Digium Subversion (svnbot) 2009-07-14 11:44:48 Repository: asterisk Revision: 206487 U branches/1.4/channels/chan_misdn.c U branches/1.4/channels/misdn/isdn_lib.c U branches/1.4/channels/misdn/isdn_lib.h ------------------------------------------------------------------------ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue ASTERISK-13471 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue ASTERISK-13770 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue ASTERISK-13471) (closes issue ASTERISK-13770) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=206487 By: Digium Subversion (svnbot) 2009-07-14 12:01:49 Repository: asterisk Revision: 206489 _U trunk/ U trunk/channels/chan_misdn.c U trunk/channels/misdn/isdn_lib.c U trunk/channels/misdn/isdn_lib.h ------------------------------------------------------------------------ r206489 | rmudgett | 2009-07-14 12:01:49 -0500 (Tue, 14 Jul 2009) | 35 lines Merged revisions 206487 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue ASTERISK-13471 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue ASTERISK-13770 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue ASTERISK-13471) (closes issue ASTERISK-13770) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=206489 By: Digium Subversion (svnbot) 2009-07-14 13:17:15 Repository: asterisk Revision: 206555 _U branches/1.6.0/ U branches/1.6.0/channels/chan_misdn.c U branches/1.6.0/channels/misdn/isdn_lib.c U branches/1.6.0/channels/misdn/isdn_lib.h ------------------------------------------------------------------------ r206555 | rmudgett | 2009-07-14 13:17:15 -0500 (Tue, 14 Jul 2009) | 42 lines Merged revisions 206489 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r206489 | rmudgett | 2009-07-14 12:01:48 -0500 (Tue, 14 Jul 2009) | 35 lines Merged revisions 206487 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue ASTERISK-13471 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue ASTERISK-13770 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue ASTERISK-13471) (closes issue ASTERISK-13770) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=206555 By: Digium Subversion (svnbot) 2009-07-14 13:32:21 Repository: asterisk Revision: 206558 _U branches/1.6.1/ U branches/1.6.1/channels/chan_misdn.c U branches/1.6.1/channels/misdn/isdn_lib.c U branches/1.6.1/channels/misdn/isdn_lib.h ------------------------------------------------------------------------ r206558 | rmudgett | 2009-07-14 13:32:21 -0500 (Tue, 14 Jul 2009) | 42 lines Merged revisions 206489 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r206489 | rmudgett | 2009-07-14 12:01:48 -0500 (Tue, 14 Jul 2009) | 35 lines Merged revisions 206487 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue ASTERISK-13471 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue ASTERISK-13770 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue ASTERISK-13471) (closes issue ASTERISK-13770) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=206558 By: Digium Subversion (svnbot) 2009-07-14 14:49:47 Repository: asterisk Revision: 206565 _U branches/1.6.2/ U branches/1.6.2/channels/chan_misdn.c U branches/1.6.2/channels/misdn/isdn_lib.c U branches/1.6.2/channels/misdn/isdn_lib.h ------------------------------------------------------------------------ r206565 | rmudgett | 2009-07-14 14:49:47 -0500 (Tue, 14 Jul 2009) | 42 lines Merged revisions 206489 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r206489 | rmudgett | 2009-07-14 12:01:48 -0500 (Tue, 14 Jul 2009) | 35 lines Merged revisions 206487 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue ASTERISK-13471 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue ASTERISK-13770 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue ASTERISK-13471) (closes issue ASTERISK-13770) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=206565 |