Summary: | ASTERISK-17334: [patch] [regression] Dial() and Queue() with a macro argument are broken by AEL macro compilation change | ||
Reporter: | Kirill Katsnelson (kkm) | Labels: | |
Date Opened: | 2011-02-02 04:15:30.000-0600 | Date Closed: | 2011-02-14 00:54:10.000-0600 |
Priority: | Minor | Regression? | Yes |
Status: | Closed/Complete | Components: | PBX/pbx_ael |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 018729-dial-queue-gosub-breakage-kkm-1.patch ( 1) 018729-dial-queue-gosub-try3.patch ( 2) 20110209__issue18729.diff.txt | |
Description: | Macros used to compile using 's' as the entry point, and that changed to '~~s~~'. The change broke the macro argument to Dial and Queue applications. ****** STEPS TO REPRODUCE ****** Dial (SIP/Test, 90, gU(orig-remote-connect^${EXTEN:1}) . . . macro orig-remote-connect(ext) { } results in ERROR[7633] app_stack.c: Attempt to reach a non-existent destination for gosub: (Context:orig-remote-connect, Extension:s, Priority:1) Similarly, Queue (SomeQueue,,,,600,,,on-queue-answer) . . . macro originate-on-queue-answer() { } results in ERROR[7950]: app_stack.c:419 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:on-queue-answer, Extension:s, Priority:1) ****** ADDITIONAL INFORMATION ****** 1.8.1.1: pbx6*CLI> dialplan show orig-remote-connect [ Context 'orig-remote-connect' created by 'pbx_ael' ] 's' => 1. MSet(LOCAL(ext)=${ARG1}) [pbx_ael] .... -= 1 extension (6 priorities) in 1 context. =- 1.8.3.rc2: pbx4b*CLI> dialplan show orig-remote-connect [ Context 'orig-remote-connect' created by 'pbx_ael' ] '~~s~~' => 1. MSet(LOCAL(ext)=${ARG1}) [pbx_ael] .... -= 1 extension (6 priorities) in 1 context. =- | ||
Comments: | By: Paul Belanger (pabelanger) 2011-02-02 10:07:45.000-0600 Looks to be a regression. By: Kirill Katsnelson (kkm) 2011-02-02 17:06:08.000-0600 It certainly is. Additional info from rswagoner: “Asterisk 1.8.2.3 doesn't have patch for issue 18480 which caused your issue 18729.” By: Tilghman Lesher (tilghman) 2011-02-09 00:08:13.000-0600 Verifying the extension exists ensures we don't break non-AEL dialplans. By: Kirill Katsnelson (kkm) 2011-02-09 01:08:05.000-0600 I am afraid this patch did not fix it. Queue (SomeQueue,,,,600,,,on-queue-answer) . . . macro originate-on-queue-answer() { } gives this: [2011-02-08 22:44:23.996] ERROR[26040]: app_stack.c:419 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:originate-on-queue-answer, Extension:s, Priority:1) and after the queue is answered, [2011-02-08 22:45:01.876] WARNING[26042]: pbx.c:4812 __ast_pbx_run: Channel 'SIP/netborder-out-00000001' sent into invalid extension '~~s~~' in context 'app_dial_gosub_virtual_context', but no invalid handler The extension in the context created by the Queue app, app_dial_gosub_virtual_context, is always "s". So this is not right: + ast_copy_string(peer->exten, "~~s~~", sizeof(peer->exten)); Also, what_is_s was not used in app_queue when forming a GoSub argument, as it was in app_dial. I am attaching a new diff with these changes; does it look correct? By: Digium Subversion (svnbot) 2011-02-14 00:50:26.000-0600 Repository: asterisk Revision: 307750 U branches/1.8/apps/app_dial.c U branches/1.8/apps/app_queue.c ------------------------------------------------------------------------ r307750 | tilghman | 2011-02-14 00:50:24 -0600 (Mon, 14 Feb 2011) | 23 lines Calling a gosub routine defined in AEL from Dial/Queue ceased to work. A bug in AEL did not distinguish between the "s" extension generated by AEL and an "s" extension that was required to exist by the chan_dahdi (or another channel) that was not supplied with a starting extension. Therefore, AEL made incorrect assumptions about what commands were permissable in the context. This was fixed by making AEL generate a different extension name. However, Dial and Queue make additional assumptions about the name of the default gosub extension. Therefore, they needed to be brought into line with a "macro" rendered by AEL (as a gosub), without breaking traditional dialplans written without the aid of AEL. Related to (issue ASTERISK-17113) Reported by: nivek (closes issue ASTERISK-17334) Reported by: kkm Patches: 20110209__issue18729.diff.txt uploaded by tilghman (license 14) 018729-dial-queue-gosub-try3.patch uploaded by kkm (license 888) Tested by: kkm ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=307750 By: Digium Subversion (svnbot) 2011-02-14 00:54:09.000-0600 Repository: asterisk Revision: 307751 _U trunk/ U trunk/apps/app_dial.c U trunk/apps/app_queue.c ------------------------------------------------------------------------ r307751 | tilghman | 2011-02-14 00:54:08 -0600 (Mon, 14 Feb 2011) | 30 lines Merged revisions 307750 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307750 | tilghman | 2011-02-14 00:50:23 -0600 (Mon, 14 Feb 2011) | 23 lines Calling a gosub routine defined in AEL from Dial/Queue ceased to work. A bug in AEL did not distinguish between the "s" extension generated by AEL and an "s" extension that was required to exist by the chan_dahdi (or another channel) that was not supplied with a starting extension. Therefore, AEL made incorrect assumptions about what commands were permissable in the context. This was fixed by making AEL generate a different extension name. However, Dial and Queue make additional assumptions about the name of the default gosub extension. Therefore, they needed to be brought into line with a "macro" rendered by AEL (as a gosub), without breaking traditional dialplans written without the aid of AEL. Related to (issue ASTERISK-17113) Reported by: nivek (closes issue ASTERISK-17334) Reported by: kkm Patches: 20110209__issue18729.diff.txt uploaded by tilghman (license 14) 018729-dial-queue-gosub-try3.patch uploaded by kkm (license 888) Tested by: kkm ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=307751 |