[Asterisk-Users] Re: Asterisk Question

sdcharly at gmail.com sdcharly at gmail.com
Tue Feb 28 06:39:54 MST 2006


On 28/02/06, Alexander Lopez <Alex.Lopez at opsys.com> wrote:
>
> read STDIN
> while [ "x$STDIN" != "x" ]
> do
>         export VARNAME=`echo $STDIN | cut -f1 -d ":"`
>         export VARVALUE=`echo "$STDIN" |cut -f2 -d ":" | cut -c2-255`
>         case $VARNAME in
>                 ("agi_request") export AGIREQUEST=$VARVALUE;;
>                 ("agi_channel") export AGICHANNEL=$VARVALUE;;
>                 ("agi_language") export AGILANGUAGE=$VARVALUE;;
>                 ("agi_type") export AGITYPE=$VARVALUE;;
>                 ("agi_uniqueid") export AGIUNIQUEID=$VARVALUE;;
>                 ("agi_callerid") export AGICALLERID="$VARVALUE";;
>                 ("agi_calleridname") export
> AGICALLERIDNAME="$VARVALUE";;
>                 ("agi_dnid") export AGIDNID=$VARVALUE;;
>                 ("agi_rdnis") export AGIRDNIS=$VARVALUE;;
>                 ("agi_context") export AGICONTEXT=$VARVALUE;;
>                 ("agi_extension") export AGIEXTENSION=$VARVALUE;;
>                 ("agi_priority") export AGIPRIORITY=$VARVALUE;;
>                 ("agi_enhanced") export AGIENHANCED=$VARVALUE;;
>                 ("agi_accountcode") export AGIACCOUNTCODE=$VARVALUE;;
>         esac
>         read STDIN
> done
> }
> #
> #  You now have all the stuff Asterisk gives you stored in Variables
> #
> #
> #   Do what ever you want here:
> #
> #
>
>
>
> > -----Original Message-----
> > From: asterisk-users-bounces at lists.digium.com
> > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
> > pdhales at optusnet.com.au
> > Sent: Monday, February 27, 2006 10:53 PM
> > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > Subject: Re: [Asterisk-Users] Re: Asterisk Question
> >
> >
> > I was going to see if I can execute a bash script as an AGI -
> > just looking around the internet for examples at the moment.
> > Anybody got an example spare?
> > I'm just a bit stuck on how to start this, but I am quite
> > comfortable writing asterisk dialplan stuff and bash scripts....
> >
> > later,
> >
> > PaulH
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list