Displaying 20 results from an estimated 214 matches for "gosub".
2008 Oct 06
1
AEL and swap from macros to contexts
Hi, according to discussion on asterisk IRC, where people said, that
macros will be depracated, I tried to migrate from macros to contexts
and Gosub
but if I try to use gosub in extensions.ael, ael compiler complains,
that I shouln't use Gosub app,
but I can't find ael keyword, that will be Gosub equivalent, or can I
ignore this ael warnings? thanks
PJ
LOG: lev:3 file:pval.c line:2521 func: check_pval_item Warning: file
/etc/aste...
2019 Oct 11
3
clarification on gosub, macros and AEL
I'm trying to clarify my understand of gosub, macros and AEL.
My understanding is that macros using the Macro() application, which is
defined in extensions.conf by:
[macro-foo]
...
and called in extensions.conf with
exten => _9NXXNXXXXXX.,n,Macro(fastbusy)
is deprecated in favour of Gosub(). True so far?
But then there are "mac...
2009 Feb 24
3
Gosub behavior change <=1.6.0.5 to 1.6.0.6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here's one that may be of interest to any upgraders. If you rely on the
behavior of gosub you may want to make note of this change.
I have an incoming call context:
exten => _XXXX,n,GoSub(incoming,${EXTEN},1(${EXTEN}));
that is supposed to gosub into the incoming extension at priority 1.
Versions before 1.6.0.6 would drop into the incoming,i,1 priority if the
requested extension w...
2009 Apr 29
1
Replacement of Macro() with Gosub()
...taxtA]
...stuff...
[contextA]
...stuff...
Is this true? Or have I misunderstood the post that I read?
2) The single most useful feature of a macro was auto-return on
unmatched goto. This feature reduces the size of my dialplan to about
30% of its previous size! How can this be implemented with a Gosub?
eg.
[macro-specialcases]
exten => s,1,Goto(c-${ARG1})
exten => c-special,1,NoOp(I am special)
The above would execute the NoOp if ARG1 is set to "special" but just
return otherwise. Perhaps a Gosub can use the 'i' extension to do the
same?
[macro-specialcases]
exten =&g...
2008 Dec 05
1
Gosubs broken since r160626 (1.6.0 SVN) ?
Hi all,
I've just upgraded to latest 1.6.0 SVN from a few days ago and my Gosubs
have stopped working.
This is from the verbose logs:
-- Executing [03333407271 at incoming-aaisp:4] GotoIf("IAX2/aaisp-3802",
"1?5:7") in new stack
-- Goto (incoming-aaisp,03333407271,5)
-- Executing [03333407271 at incoming-aaisp:5] Gosub("IAX2/aaisp-3802",...
2019 Oct 15
4
clarification on gosub, macros and AEL
>>> Nobody has any information or opinions on any of this?
Personally, I don't think MACROS are going anywhere any time soon, so I have not bothered looking into a substitution.
As for ael; I've never used it.
Doug
2010 May 18
3
About option U in Dial Ast version 1.6.2
Has any one used this?
U(x[^arg[^...]]):
x - Name of the subroutine to execute via Gosub
arg - Arguments for the Gosub routine
Execute via Gosub the routine <x> for the *called* channel before
connecting to the calling channel. Arguments can be specified to
the Gosub
using '^' as a delimiter. The Gosub routine can set the variable ${GO
SUB_RE...
2010 Jul 23
2
application call to Gosub affects flow of control, and needs to be re-written using AEL
...ng a macro for queuemetrics logging, or direct
call)
i wanted to factorise the routing process so i came up with something
like the following. All in one it's working like expected, however
every "ael reload" command trigger a lot of warning like that
"application call to Gosub affects flow of control, and needs to be
re-written using AEL if, while, goto, etc. keywords instead!"
But i fail to see how i could do it another way, any idea/suggestion ?
Extraction of the outbound processing structure:
context outboundSimple {
_9X. => {
//...
2009 Mar 06
1
GoSub & Queue
...r them to say there name. That gets saved and
they are entered into the queue using Queue(mainqueue,,,,300).
In the queues.conf i have a list of members these are
local/extension at external-default, there are two weights/prioritys 10 and 20.
The external-default context has a dial that uses a GoSub to play the
recording of the caller to the member, it them gives the member a list of
options like Connect, Voicemail, Hangup.
The problem i'm having right now is that if a member pics up, all the phones
of the other members continue to ring (ringall in queues.conf) while the
member who an...
2009 Aug 17
2
Accessing Asterisk gosub arguments in extensions.lua
How does one go about accessing gosub arguments from Asterisk in
extensions.lua?
For example, I have the following in extensions.conf:
exten => 1000,1,Wait(1)
exten => 1000,n,Gosub(functions,mytest,1("123"))
exten => 1000,n,Hangup
And then the following in extensions.lua:
extensions = {
functions = {
[&q...
2011 Mar 04
3
Gosub and 'h' (again?)
Problem as follows:
[default]
exten => 777,1,Gosub(sub,1,1)
exten => 777,n,Hangup()
exten => h,1,NoOp(hung up in 'default' context)
[sub]
exten => 1,1,NoOp(in sub)
exten => 1,n,Playback(tt-monkeys)
exten => 1,n,Return()
exten => h,1,NoOp(hung up in 'sub' context)
This works fine if the caller listens to all the &...
2011 Aug 15
3
Queue Breakout Input being Ignored
...tested with different actions to occur (sorry
I dont have a simpler version of the below at hand)
[extensions.conf]
[app-helpdesk-bh]
exten => s,1(unanswered),Ringingsame => n,Wait(2)
same => n,Answer
same => n,Wait(1)
same => n(answered),NoOp(Helpdesk)
same => n,Gosub(app-filteranon,s,1)
same => n,Set(CALLERID(name)=${client} Helpdesk)
same => n,NoOp(Caller ID set to: ${CALLERID(name)})
same => n,NoOp(Callers waiting in queue:
${QUEUE_WAITING_COUNT(helpdesk)})
; play the announcement for this helpdesk client (or the general intro)
same =>...
2010 Apr 02
1
Gosub replacement within AEL2 dialplans
Hello,
When reloading a diaplan (asterisk 1.6.1.X), I can see in console :
[Apr 2 09:02:00] WARNING[2217]: ael/pval.c:2522 check_pval_item: Warning:
file /etc/asterisk/extensions.ael, line 621-621: application call to Gosub
affects flow of control, and needs to be re-written using AEL if, while,
goto, etc. keywords instead!
What is then the recommended substitution for Gosub() application (when you
want to return to next statement after routine completion) ?
www.voip-info.org doesn't mention much about that.
Re...
2009 Jun 13
1
1.6.0.10: core restart on ReceiveFax()
...f the faxes are going to
branch offices. If they are, I want to capture and email them to the
branches. I've set up extension 8447 to test this.
A fax machines is connected via an SPA 2102 on 173. Any calls from 173
are sent to:
[outbound-fax]
exten => 8447,1,Answer()
exten => 8447,n,GoSub(Capture-Fax,s,1)
exten =>_NXXNXXXXXX,1,Answer()
exten =>_NXXNXXXXXX,n,GoSub(DialOut-PSTN,s,1(1${EXTEN}))
exten =>_1NXXNXXXXXX,1,Answer()
exten =>_1NXXNXXXXXX,n,GoSub(DialOut-PSTN,s,1(${EXTEN}))
exten =>_91NXXNXXXXXX,1,Answer()
exten =>_91NXXNXXXXXX,n,GoSub(DialOut-PSTN,s,1(${EX...
2003 Aug 24
2
line numbering and gosub
...em
as I've labled them. the * code should do :
when calling an exten: goto first line in the link list of
lines
when executing a goto: goto the node that matches the label, or
create a quicky hash of lables -> node pointers to match quickly
The second item:
It would be nice to have a Gosub type command. That
way you could pop off to a standard strain of code, even
nest a bit and then by the magic of a stack pop back to
previous parts......
cheers
2013 Aug 08
1
queue member ackcall - cpuspikes
...AEL
Similar Example:http://www.voip-info.org/wiki/view/Asterisk+tips+Queue+Member+ackcall
Scenario:
1. User calls in a General Number
2. Call is queued in Queue Application
3. Queue calls a Local/xxxx at members channel
4. At members context:
Dial The real member(called party) channel with a U(GOSUB X) routine
4.1 The "called party" answers, & is led to the GOSUB routine X:
Here the prompt is given to the called party to acknowledge the incoming
call
[ depending on the out put, this will return appropriate GOSUB result ]
4.2 Based on the GOSUB result, the Dial proceeds
5. The Qu...
2010 Feb 24
1
Macros, GoSub & StackPop
Hi -
I have a Macro that contains a GoTo. The documentation indicates:
If you GoTo out of the Macro context, the Macro will terminate and control
will return at the location refered to by the Goto.
I thought I might convert the Macro to a GoSub routine, but the
documentation doesn't mention what happens if you GoTo out. It does however
mention that the return address gets pushed onto the stack, so I'm a little
concerned about the state of the stack if I simply GoTo out. Should I call
StackPop first?
Thanks!
Hugh
--------------...
2023 Jun 17
1
Expanding my answering-machine system
...since that is the way I've
always expected Asterisk to work; my dialplan examples are based on that.
The below example shows a call coming into a DID, playing background
prompts and excepting input during play.
;****************
;* Auto attendant
;****************
exten => 5175551212,1,Gosub(check-blacklist,s,1)
same => n,Gosub(check-hours,s,1)
same => n,Gosub(holiday-check,s,1)
same => n,Gosub(get-callerid,s,1)
same => n,Goto(auto-attend,s,1)
[auto-attend]
include => dial-by-extension
;*************
;* Set timeouts
;*************
exten =>...
2012 Oct 31
1
Asterisk 11 and stdexten written in AEL invoked by pbx_config
...years ago, a change between how AEL code is built into
Asterisk dialplan between minor versions made clear the need to
provide a sane entry point into AEL subroutines and that's how
AELSub() born.
With Asterisk 11 release, they way [stdexten] at extensions.conf is
invoked changed from Macro to Gosub using the 'missing context
feature' and this caused that any stdexten written in anything else
but extensions.conf (AEL, LUA, etc, being these not able to define an
arbitrary priority) will not work.
The only way to workaround this is to fallback to Macro() and write
macro-contexts in AEL...
2010 Jul 17
1
AGI gosub return value
It appears that there's no way to get the return value from a GOSUB into
an AGI script. Is that correct?