[Asterisk-Dev] hunt --- beta
John Harragin
jharragi at mw.k12.ny.us
Fri Mar 28 15:42:13 MST 2003
I have been working on a new app to get the hang of the * environment. I
have more pressing things going on for the next week, so I figure announcing
it will make duplication of effort less likely. It should be regarded as in
development and not run in a production environment (in case dial adversely
alters the channel structure for subsequent dials - tips welcome here) - but
if anyone wants to try it now, make sure to LOOK AT THE EXAMPLE regarding
pipes and commas.
Hunt(HUNT_VARIABLE_name,SkipDev,opt1...): Executes a hunt pattern using the
current priority. One argument must be passed - HUNT_VARIABLE_name. A second
argument skipdev (generally, the calling resource) will be skipped over - or
if a timeout (or any additional dial options) are defined it will be dialed
first then be skipped if it is uniquely defined in HUNT_VARIABLE_name. (1)
* HUNT_VARIABLE_name must be passed naked - that is with no $ or{}.
* The HUNT_VARIABLE currently must be defined as a global variable.
By default, a timeout of 10 seconds (compiled in as DFT_HUNT_TaO) with no
additional options are passed to dial. These options remain in effect until
new options are encountered in any HUNT_VARIABLE element. These will in turn
become the new persistent values.
HUNT_VARIABLE Example (note the use of pipes to delimit options and commas
to delimit elements):
[globals]
HUNT_GROUP1=Zap/2,Zap/3|8|tm,Zap/10|9,Zap/4
Incantation Example:
exten => _1114,2,hunt(HUNT_GROUP1,Zap/10) ----------- Skips Zap/10
Dials Zap/2|10 > Zap/3|8|tm > Zap/4|9
Incantation Example:
exten => _1114,1,hunt(HUNT_GROUP1,Zap/10,20) -------- Dials Zap/10 first -
then skips it
Dials Zap/10|20 > Zap/2|10 > Zap/3|8|tm > Zap/4|9
Notes:
(1) The default skip behavior can be altered by compiling in #define
DFT_HUNT_TaO 40|tm = 40 sec music & then transferable just like dial. Skip
behavior can be restored by SkipDev with a trailing pipe (|) -
hunt(HUNT_GROUP1,Zap/10|).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app_hunt.c
Type: application/octet-stream
Size: 7611 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20030328/821f3bc7/app_hunt.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/ignore
Size: 75 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20030328/821f3bc7/attachment.bin
More information about the asterisk-dev
mailing list