[Asterisk-Users] Using ',' character in applications data
Jeremy McNamara
jj at nufone.net
Tue Apr 27 15:55:06 MST 2004
Steven Critchfield wrote:
>I actually use the postgres app for our oncall rotation. I know I could
>have coded this in perl and AGI, but I wanted to use the PSQL app. I
>also used it for a random quote file once.
>
>
Sure, but there is nothing stopping anyone from using the C-API to
create Asterisk applications.
how about:
exten => s,1,DetermineOnCall(technical)
exten => s,2,Dial,(${ONCALL})
exten => s,3,Dial,(${BACKUP})
exten => s,4,Playback,out-of-luck
exten => s,103,Dial,(${BACKUP})
exten => s,104,Playback,out-of-luck
exten => s,105,Hangup
*CLI> show application DetermineOnCall
-= Info about application 'DetermineOnCall' =-
[Synopsis]:
Determines who is on call.
[Description]:
DetermineOnCall(category)
Determines who is on call for the passed category and sets the channel
value ${ONCALL} along with ${BACKUP}which
are valid URI's to be passed to the Dial application.
This way you have the full power of asterisk's API and C and your
favorite DB C-API or whatever the job entails. Granted, if you
distribute this application you need to release the code gpl or contact
Digium about a non-gpl license.
Jeremy McNamara
More information about the asterisk-users
mailing list