Jeremy Mann wrote:
> I need help translating extensions.conf to AEL:
>
> [default]
> exten => _X.,1,Set(DID=${EXTEN:6})
> exten => _X.,n,Goto(continue,1)
> exten => _1X.,1,Set(DID=${EXTEN:7})
> exten => _1X.,n,Goto(continue,1)
>
> exten => continue,1,Noop(${DID})
> exten => continue,n,Set(GROUP(IAX)=incoming)
> exten => continue,n,GotoIf($[${MATH(${GROUP_COUNT([EMAIL
> PROTECTED])}+${GROUP_COUNT([EMAIL PROTECTED])},i)}>10]?fail)
> exten => continue,n,Goto(from-pri,${DID},1)
> exten => continue,n(fail),Set(DIALSTATUS=CHANUNAVAIL)
>
>
> I need the above to goto AEL, here's what I have so far:
> context default {
> _X. => {
> Set(DID=${EXTEN:6});
> Goto(continue,1);
> };
>
> _1X. => {
> Set(DID=${EXTEN:7});
> Goto(continue,1);
> };
>
> continue:
> Noop(${DID});
> Set(GROUP(IAX)=incoming);
> GotoIf($[${MATH(${GROUP_COUNT([EMAIL
> PROTECTED])}+${GROUP_COUNT([EMAIL PROTECTED])},i)}>10]?fail);
> Goto(from-pri,${DID},1);
> fail:
> Set(DIALSTATUS=CHANUNAVAIL);
> };
> };
>
> My issue is I don't know what to do with the fail and continue goto
> statements.
>
> Thanks.
>
> This e-mail, facsimile, or letter and any files or attachments transmitted
> with it contains information that is confidential and privileged. This
> information is intended only for the use of the individual(s) and entity(ies)
> to whom it is addressed. If you are the intended recipient, further
> disclosures are prohibited without proper authorization. If you are not the
> intended recipient, any disclosure, copying, printing, or use of this
> information is strictly prohibited and possibly a violation of federal or
> state law and regulations. If you have received this information in error,
> please notify Texas Health Management Group immediately at 1-817-310-4999.
> Texas Health Management Group, its subsidiaries, and affiliates hereby claim
> all applicable privileges related to this information.
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
I'll be more than glad to help :)
Here's the code:
context default {
_X. => {
Set(DID=${EXTEN:6});
continue:
Noop(${DID});
Set(GROUP(IAX)=incoming);
if("${MATH(${GROUP_COUNT([EMAIL PROTECTED])}+${GROUP_COUNT([EMAIL
PROTECTED])},i)}"
> "10") {
Set(DIALSTATUS=CHANUNAVAIL);
}
jump [EMAIL PROTECTED];
}
}
You didn't really need the continue or fail label, as the code that you
had at "fail" is taken care of within the if statement's execution.
Let me know if there's any issue, if there is it's probably in the
implementation of the conditional
--
Sherwood McGowan
VoIP / Telecom Solutions
[EMAIL PROTECTED]
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users