[Home]

Summary:ASTERISK-26282: AEL: macro-call in Dial application, macro "lacks 's' extension"
Reporter:chris de rock (chrisderock)Labels:
Date Opened:2016-08-10 09:39:26Date Closed:2016-08-30 19:13:07
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_dial Applications/app_macro
Versions:13.2.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Tested with asterisk versions from 1.8 to current...Attachments:
Description:The ael parser creates macros with extension '~~s~~'. If the macro is called from the Dial application, asterisk searches for extension 's' which is not existent.

Sample:
{noformat}
dialplan show macro-foo3
[ Context 'macro-foo3' created by 'pbx_ael' ]
 '~~s~~' =>        1. NoOp(foo3)                                 [pbx_ael]
                   2. Return()                                   [pbx_ael]
 Include =>        'ael-builtin-h-bubble'                        [pbx_ael]

-= 1 extension (2 priorities) in 1 context. =-

Dialplan:
macro macro-foo3()
{
 NoOp(foo3);
}

context foo2 {
 _X. => {
   Answer();
   Wait(2);
   Hangup();
 }
}

context foo1 {
 _X. => {
   Dial(LOCAL/0815@foo2, 200, g:n:M(foo3));
 }
}
{noformat}

Console Output:
{noformat}
   -- Attempting call on LOCAL/0815@foo1 for 4711@foo1:1 (Retry 1)
   -- Called 0815@foo1
   -- Executing [0815@foo1:1] Dial("Local/0815@foo1-00000005;2", "LOCAL/0815@foo2, 200, g:n:M(foo3)") in new stack
   -- Called LOCAL/0815@foo2
   -- Executing [0815@foo2:1] Answer("Local/0815@foo2-00000006;2", "") in new stack
   -- Local/0815@foo2-00000006;1 answered Local/0815@foo1-00000005;2
[Aug 10 16:17:40] WARNING[19129][C-00000003]: app_macro.c:312 _macro_exec: Context 'macro-foo3' for macro 'foo3' lacks 's' extension, priority 1
   -- Channel Local/0815@foo1-00000005;2 joined 'simple_bridge' basic-bridge <86f2274a-e67d-4aaa-a93c-0961fcfebbc9>
   -- Local/0815@foo1-00000005;1 answered
   -- Executing [4711@foo1:1] Dial("Local/0815@foo1-00000005;1", "LOCAL/0815@foo2, 200, g:n:M(foo3)") in new stack
   -- Called LOCAL/0815@foo2
   -- Local/0815@foo1-00000005;1 requested media update control 26, passing it to Local/0815@foo2-00000007;1
   -- Executing [0815@foo2:1] Answer("Local/0815@foo2-00000007;2", "") in new stack
   -- Channel Local/0815@foo2-00000006;1 joined 'simple_bridge' basic-bridge <86f2274a-e67d-4aaa-a93c-0961fcfebbc9>
   -- Local/0815@foo2-00000007;1 answered Local/0815@foo1-00000005;1
[Aug 10 16:17:40] WARNING[19128][C-00000004]: app_macro.c:312 _macro_exec: Context 'macro-foo3' for macro 'foo3' lacks 's' extension, priority 1
   -- Channel Local/0815@foo1-00000005;1 joined 'simple_bridge' basic-bridge <f5860df1-94d9-471b-ac2f-294c998f70fa>
   -- Channel Local/0815@foo2-00000007;1 joined 'simple_bridge' basic-bridge <f5860df1-94d9-471b-ac2f-294c998f70fa>
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2016-08-10 09:39:27.197-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: chris de rock (chrisderock) 2016-08-11 00:41:39.667-0500

currently im using asterisk 11.13 on debian jessie and the patch for this version is:
[edit by Rusty - please read the guidelines for the issue tracker. Inline pages cannot be accepted. Please sign the submission agreement and attach the patch as a contribution]
should be easy to apply this patch to other versions

By: Rusty Newton (rnewton) 2016-08-11 09:51:12.404-0500

[~chrisderock] , please see the [Patch Contribution Process on the wiki|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. Thanks!

By: chris de rock (chrisderock) 2016-08-12 00:07:27.258-0500

you dont have to use my fix (are these 8 chars really a patch?) but please fix the bug.

By: Rusty Newton (rnewton) 2016-08-15 09:50:13.363-0500

A patch is a patch, even if it is a single character. :)

If your fix works, then we want to use it. We'd like you to get credit for the fix of course. We simply can't legally accept any patch submitted without a submission agreement.

Another part of this is that AEL is rarely used and if you don't submit a patch and help push it through the review process then this issue may languish with a lack of attention. There are tons of trivial issues filed with parts of Asterisk that are rarely used and the core team doesn't get the time to go address all of them. We appreciate any help you can provide.

Again it is up to you! Thanks,

By: chris de rock (chrisderock) 2016-08-19 00:59:35.068-0500

The Patch is already uploaded to gerrit. Change 3578

By: Rusty Newton (rnewton) 2016-08-19 10:20:03.521-0500

I don't see it, it looks like that review was deleted.. can you provide a link?

By: chris de rock (chrisderock) 2016-08-20 01:31:47.035-0500

https://gerrit.asterisk.org/#/c/3578/

By: Richard Mudgett (rmudgett) 2016-08-22 09:57:24.484-0500

You have to publish the review for anyone else to see it.

By: chris de rock (chrisderock) 2016-08-22 10:01:02.681-0500

done