Summary: | ASTERISK-12194: Hangup extension doesn't seem to work in ast-1.4.19.1 | ||
Reporter: | Binu Nair (binuvb) | Labels: | |
Date Opened: | 2008-06-14 07:24:28 | Date Closed: | 2008-08-01 11:19:31 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Hello all, I have made a call back service using the call files. Here people would call on some predetermined number, the system recognizes the caller id (we have a caller id database) and disconnects the call and call back. If the system could not recognize the caller id, it plays a message and gives options to register the caller id, etc. All these works well in asterisk 1.4.4. The problem started when I upgraded asterisk to version 1.4.19.1. I am attaching the portion of the context. When the system receives a call, it just hangs up and the rest is done in "h" extension. I guess this is a problem with h extension in the version 1.4.19.1 ( as I said earlier that it works very well with 1.4.4). In the asterisk console I am able to see "Playback(prompt_register_cid)" , but it is not actually playing. Thanks all ****** ADDITIONAL INFORMATION ****** [callback] exten => s,1,Set(authcallerid = 0|caller=${CALLERID(num)}|callerfull=${CALLERID(num)}) exten => s,n,Hangup exten => h,n,Gotoif($[${LEN(${caller})} < 7]?trikon,s,11) exten => h,n,DeadAGI(/usr/local/ownmail/bin/auth_user,1,${caller}) exten => h,n,Gotoif($[${auth}>0]?+3:+1) ;some lines here creates a call file for callback, all these are done from the AGI call. exten => h,n,Playback(prompt_register_cid) exten => h,n,Goto(mainn,s,1) exten => h,n,Hangup | ||
Comments: | By: Tilghman Lesher (tilghman) 2008-06-14 09:15:37 > exten => s,n,Hangup > exten => h,n,Gotoif($[${LEN(${caller})} < 7]?trikon,s,11) Here's your problem. Your h extension doesn't start with "1". Change this to: > exten => s,n,Hangup > exten => h,1,Gotoif($[${LEN(${caller})} < 7]?trikon,s,11) and I think you'll find that things work fine. By: Binu Nair (binuvb) 2008-06-16 00:42:47 Sorry, I missed one line in my post (0012857). In fact the hangup DID start with 1. I was hardcoding a caller id for my testing. The following line was doing that. exten => h,1,Set(caller=15555555) Thanks once again and sorry for the trouble By: Joshua C. Colp (jcolp) 2008-06-16 07:07:34 How about attaching the actual console log when this context is executed? By: Binu Nair (binuvb) 2008-06-16 07:55:26 -- Executing [17813821904@trikon:1] NoOp("SIP/216.143.130.12-081fd2e8", "912224318815") in new stack -- Executing [17813821904@trikon:2] Goto("SIP/216.143.130.12-081fd2e8", "callback|s|1") in new stack -- Goto (callback,s,1) -- Executing [s@callback:1] Hangup("SIP/216.143.130.12-081fd2e8", "") in new stack == Spawn extension (callback, s, 1) exited non-zero on 'SIP/216.143.130.12-081fd2e8' -- Executing [h@callback:1] Set("SIP/216.143.130.12-081fd2e8", "authcallerid = 0|caller=912224318815|callerfull=912224318815") in new stack [Jun 16 18:31:21] WARNING[2456]: pbx.c:5870 pbx_builtin_setvar: Setting multiple variables at once within Set is deprecated. Please separate each name/value pair into its own line. -- Executing [h@callback:2] NoOp("SIP/216.143.130.12-081fd2e8", "912224318815") in new stack -- Executing [h@callback:3] NoOp("SIP/216.143.130.12-081fd2e8", "") in new stack -- Executing [h@callback:4] NoOp("SIP/216.143.130.12-081fd2e8", "912224318815") in new stack -- Executing [h@callback:5] Set("SIP/216.143.130.12-081fd2e8", "caller=4318815") in new stack -- Executing [h@callback:6] GotoIf("SIP/216.143.130.12-081fd2e8", "0?trikon|s|11") in new stack -- Executing [h@callback:7] DeadAGI("SIP/216.143.130.12-081fd2e8", "/usr/local/ownmail/bin/auth_user|1|4318815") in new stack -- Launched AGI Script /usr/local/ownmail/bin/auth_user -- AGI Script Executing Application: (Set) Options: (authcallerid=0) -- AGI Script /usr/local/ownmail/bin/auth_user completed, returning 0 -- Executing [h@callback:8] GotoIf("SIP/216.143.130.12-081fd2e8", "0?+1:+4") in new stack -- Goto (callback,h,12) -- Executing [h@callback:12] Playback("SIP/216.143.130.12-081fd2e8", "trikon/register_cid") in new stack == Spawn extension (callback, h, 12) exited non-zero on 'SIP/216.143.130.12-081fd2e8' [Jun 16 18:31:21] NOTICE[2456]: cdr.c:432 ast_cdr_free: CDR on channel 'SIP/216.143.130.12-081fd2e8' not posted It clearly says executing Playback, but actually line is disconnected whereas it works perfectly in ast-1.4.4 By: Tilghman Lesher (tilghman) 2008-07-14 12:32:07 I'm not really convinced that this SHOULD work. You're clearly abusing what a hangup is supposed to do, and we probably fixed a bug that made this previous exploitation fail. Most people who implement callback do so by generating a .call file and placing the file within /var/spool/asterisk/outgoing, not by overloading the "h" extension. |