Summary: | ASTERISK-03663: [patch] When a SIP client unregisters with asterisk, call states aren't properly handled using app_realtime | ||
Reporter: | jens (jens) | Labels: | |
Date Opened: | 2005-03-10 06:05:40.000-0600 | Date Closed: | 2008-01-15 15:27:37.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Registration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) dialstatus_patch.txt ( 1) regexpire.txt | |
Description: | If a client unregisters with asterisk, it leaves the IP-Adress in the Database as 0.0.0.0 . When dialed Asterisk searches for the client, finds one and a peer is created for it in chan_sip.c [peer = build_peer(peername, var, ast_test_flag((&global_flags_page2), SIP_PAGE2_RTCACHEFRIENDS) ? 0 : 1); ] If the the peer isn't created, asterisk will set the variable DIALSTATUS to CHANUNAVAIL but since it is we get CONGESTION as DIALSTATUS which is wrong. | ||
Comments: | By: Clod Patry (junky) 2005-03-10 07:46:03.000-0600 please attach any informations that could help me to locate the problem exactly. By: Olle Johansson (oej) 2005-03-10 10:20:01.000-0600 Please test if this patch changes the behaviour in the way you want. By: jens (jens) 2005-03-11 12:28:18.000-0600 Your patch resolved the entry of the 0.0.0.0 ip addr. However it did no resolve the call states. app_dial handled CONGESTION and CHANUNAVAIL the same way so the call state was still wrong. The applied patch fixes this but the bug is still not solved as there seems to occur a second hangup call which clears out the dialstate. I rechecked my dialplan but the next operation after dial is a NoOP (no +100 catched). See this: -- Executing Dial("SIP/aunten-d919", "SIP/a7|30") in new stack Urgent handler Mar 11 19:00:07 NOTICE[907]: app_dial.c:940 dial_exec_full: Unable to create channel of type 'SIP' (cause 3) == Everyone is busy/congested at this time (1:0/0/1) Urgent handler -- Executing Hangup("SIP/aunten-d919", "") in new stackl: (added log in source here->) DIALSTATUS is CHANUNAVAIL Urgent handler -- Executing Hangup("SIP/aunten-d919", "") in new stack edited on: 03-11-05 12:28 edited on: 03-11-05 12:29 By: Olle Johansson (oej) 2005-03-13 09:23:44.000-0600 Does your dialplan include a "._" extension? Please show your dial plan. Your debug output indicates CHANISUNAVAIL, which is correct, but something else is going on after the call. By: jens (jens) 2005-03-13 11:14:15.000-0600 I restarted asterisk and wasn't able to reproduce the problem. Although I get a second HangUp I can check for callstates now. Maybe I forgot something before :-) . -- Executing Dial("SIP/aunten-01b8", "SIP/a7|120") in new stack Urgent handler Mar 13 18:11:22 NOTICE[4779]: app_dial.c:940 dial_exec_full: Unable to create channel of type 'SIP' (cause 3) == Everyone is busy/congested at this time (1:0/0/1) Urgent handler -- Executing NoOp("SIP/aunten-01b8", "CHANUNAVAIL") in new stack Urgent handler -- Executing Macro("SIP/aunten-01b8", "dialstatus_sip|6107") in new stack Urgent handler -- Executing NoOp("SIP/aunten-01b8", "CHANUNAVAIL") in new stack Urgent handler -- Executing NoOp("SIP/aunten-01b8", "0") in new stack Urgent handler -- Executing Goto("SIP/aunten-01b8", "CHANUNAVAIL|1") in new stack Urgent handler -- Goto (macro-dialstatus_sip,CHANUNAVAIL,1) Urgent handler -- Executing Hangup("SIP/aunten-01b8", "") in new stack Urgent handler -- Executing Hangup("SIP/aunten-01b8", "") in new stack Urgent handler By: Olle Johansson (oej) 2005-03-16 01:56:24.000-0600 Ok, so my patch works. Thank you! By: Mark Spencer (markster) 2005-03-17 10:16:03.000-0600 Added to CVS head, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:27:37.000-0600 Repository: asterisk Revision: 5188 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r5188 | markster | 2008-01-15 15:27:37 -0600 (Tue, 15 Jan 2008) | 2 lines Cleanup registration expirey with realtime (bug ASTERISK-3663) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5188 |