Summary: | ASTERISK-00273: # from MGCP during Ringtone causes Asterisk to stop responding | ||
Reporter: | jazz (jazz) | Labels: | |
Date Opened: | 2003-09-14 22:59:56 | Date Closed: | 2004-09-25 02:46:18 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Sending # from MGCP device before a call is answered is received by Asterisk and causes the system to stop responding. ****** ADDITIONAL INFORMATION ****** I have a D-Link DG1102s running MGCP into asterisk and an extension *9 setup which dumps me into my inbound context to simulate calls coming in from my X100P. This usually works with no hassles at all. Except this time I pressed # too early, as in before it actually answered and the MGCP IAD was still providing ring tone, and Asterisk just stopped responding to everything! I had to do a send a SIGKILL just to kill the running process. Here's a quick log just to illustrate what I mean: == Spawn extension (default, 121, 1) exited non-zero on 'MGCP/aaln/1@DLINK01-1' -- Endpoint 'aaln/1@DLINK01-1' observed 'hd' -- MGCP mgcp_new(MGCP/aaln/1@DLINK01-1) created in state: Down -- Endpoint 'aaln/1@DLINK01-1' observed '*' -- Endpoint 'aaln/1@DLINK01-1' observed '9' -- Executing Goto("MGCP/aaln/1@DLINK01-1", "inbound|s|1") in new stack -- Goto (inbound,s,1) -- Executing Dial("MGCP/aaln/1@DLINK01-1", "MGCP/aaln/1@DLINK01|30") in new stack -- MGCP mgcp_request(aaln/1@DLINK01) -- MGCP cw: -1, dnd: 0, so: 1, sno: 0 -- MGCP mgcp_new(MGCP/aaln/1@DLINK01-0) created in state: Down -- Called aaln/1@DLINK01 -- MGCP/aaln/1@DLINK01-0 is ringing -- Endpoint 'aaln/1@DLINK01-1' observed '#' -- Endpoint 'aaln/1@DLINK01-1' observed 'hu' And at this point everything stops responding. | ||
Comments: | By: Mark Spencer (markster) 2003-09-16 14:37:28 You'll need to find me on IRC so I can ssh in and look at this bug on your system. By: Pavel Litvinenko (pavell) 2003-09-23 11:03:35 The problem rises with any key pressed when remote end is ringing !!! here is short :) log: root@phongo:/home/litw# asterisk -r Asterisk CVS-09/08/03-15:30:26, Copyright (C) 1999-2001 Linux Support Services, Inc. Written by Mark Spencer <markster@linux-support.net> ========================================================================= Connected to Asterisk CVS-09/08/03-15:30:26 currently running on phongo (pid = 2040) phongo*CLI> set verbose 100 -- Endpoint 'aaln/4@sale-0' observed 'hd' -- MGCP mgcp_new(MGCP/aaln/4@sale-0) created in state: Down -- Endpoint 'aaln/4@sale-0' observed '1' -- Endpoint 'aaln/4@sale-0' observed '5' -- Endpoint 'aaln/4@sale-0' observed 'hf' -- Swapping 0 for 1 on aaln/4@sale -- MGCP Muting 0 on aaln/4@sale -- MGCP mgcp_new(MGCP/aaln/4@sale-1) created in state: Down -- Endpoint 'aaln/4@sale-1' observed '1' -- Endpoint 'aaln/4@sale-1' observed '5' -- Endpoint 'aaln/4@sale-1' observed '3' -- Executing Dial("MGCP/aaln/4@sale-1", "MGCP/aaln/3@sale") in new stack -- MGCP mgcp_request(aaln/3@sale) -- MGCP cw: -1, dnd: 0, so: 0, sno: 0 -- MGCP mgcp_new(MGCP/aaln/3@sale-1) created in state: Down -- Called aaln/3@sale -- MGCP/aaln/3@sale-1 is ringing -- Endpoint 'aaln/4@sale-1' observed '3' phongo*CLI> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here mgcp stack is stoped !!! phongo*CLI> mgcp debug MGCP Debugging Enabled phongo*CLI> phongo*CLI> mgcp audit endpoint aaln/3@sale Posting Request: AUEP 2485 aaln/3@sale MGCP 1.0 F: A,R,D,S,X,N,I,T,O,ES,VS,E,MD,M to 195.161.106.163:2427 phongo*CLI> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this packet was not sent to the endpoint phongo*CLI> show channels Channel (Context Extension Pri ) State Appl. Data MGCP/aaln/3@sale-1 (noc 1 ) Ringing AppDial (Outgoing Line) MGCP/aaln/4@sale-1 (noc 153 1 ) Ring Dial MGCP/aaln/3@sale 2 active channel(s) phongo*CLI> soft hangup MGCP/aaln/3@sale-1 phongo*CLI> soft hangup MGCP/aaln/4@sale-1 phongo*CLI> show channels Channel (Context Extension Pri ) State Appl. Data MGCP/aaln/3@sale-1 (noc 1 ) Ringing AppDial (Outgoing Line) MGCP/aaln/4@sale-1 (noc 153 1 ) Ring Dial MGCP/aaln/3@sale 2 active channel(s) phongo*CLI>^C ^^^^^^^^^^^^^^^^^^^^^^^^^^ hangup does not help root@phongo:/etc/asterisk# tcpdump -i eth0 udp port 2427 tcpdump: listening on eth0 17:20:29.078998 xxx.xxx.xxx.xxx.2427 > phongo.krypton.ru.2427: udp 55 [tos 0x3,CE] 17:20:37.631419 xxx.xxx.xxx.xxx.2427 > phongo.krypton.ru.2427: udp 129 [tos 0x3,CE] 7 packets received by filter 0 packets dropped by kernel root@phongo:/etc/asterisk# netstat -an|grep 2427 udp 63980 0 195.161.106.3:2427 0.0.0.0:* root@phongo:/etc/asterisk# By: Pavel Litvinenko (pavell) 2003-09-24 01:59:03 I have made this changes, endpoint does not send me error messages now, but the problem is not gone Index: chan_mgcp.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v retrieving revision 1.19 diff -u -r1.19 chan_mgcp.c --- chan_mgcp.c 8 Sep 2003 16:48:06 -0000 1.19 +++ chan_mgcp.c 24 Sep 2003 06:55:22 -0000 @@ -1565,7 +1565,13 @@ add_header(&resp, "R", "hu(N), hf(N), D/[0-9#*](N)"); break; } - if (strlen(tone)) { + if ((strlen(tone) == 1) && + (sub->cxmode == MGCP_CX_RECVONLY) && + (((tone[0] >= '0') && (tone[0] <= '9')) || ((tone[0] >= 'A') && (tone[0] <= 'D')) || (tone[0] == '*') || (tone[0] == '#'))) { + + return 0; + + } else if (strlen(tone)) { add_header(&resp, "S", tone); } return send_request(sub, &resp, oseq); By: Mark Spencer (markster) 2003-09-24 14:42:41 Fixed in CVS |