[asterisk-users] AGI script

Yawar Hadi yawarhadi at gmail.com
Mon Feb 23 22:17:09 CST 2009


,must visit this site for more info
http://www.voip-info.org/wiki-Asterisk+AGI

and also take help from google its a good source


On Tue, Feb 24, 2009 at 5:08 AM, michel freiha <michofr at gmail.com> wrote:

> Dear All,
>
> I would really need to thank you all for the great help that I got here
> from all of you and specially Mr. Yawar hadi for his great assist and
> professionalism
>
> Thanks
>
>
> On Mon, Feb 23, 2009 at 6:48 PM, Steve Edwards <asterisk.org at sedwards.com>wrote:
>
>> On Mon, 23 Feb 2009, Yawar Hadi wrote:
>>
>> > so if u want to read extension then supplu variable name like
>> > $myno=$AGI->get_variable('EXTEN');
>> > hope u get it
>>
>> I think passing the variable "on the command line" is more flexible than a
>> fixed variable, particularly the much more limiting ${EXTEN}.
>>
>> My preference is to use the "getopt_long" function to parse the command
>> line passed to the AGI. I find
>>
>>        exten = _x.,n,agi(dial,--customer-id=112)
>>
>> to be more "obvious" than
>>
>>        exten = _x.,n,agi(dial,${EXTEN})
>>
>> or
>>
>>        exten = 112,n,agi(dial)
>>
>> This becomes even more obvious when you pass multiple variables:
>>
>>        exten = _x.,n,agi(dial\
>>                ,--announce=winter-specials\
>>                ,--customer-id=112\
>>                ,--caller-id=ACME Widgets Inc\
>>                ,--verbose\
>>                ,--record\
>>                )
>>
>> (line split for readability)
>>
>> rather than
>>
>>        exten = _x.,n,agi(dial,112,,,winter-specials,ACME Widgets,v,,r)
>>
>> or
>>
>>        exten = 112,n,agi(dial)
>>
>> Particularly since getopt_long does not care about the order of the
>> options.
>>
>> Thanks in advance,
>> ------------------------------------------------------------------------
>> Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
>> Newline                                             Fax: +1-760-731-3000
>>
>> _______________________________________________
>> -- 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
>>
>
>
> _______________________________________________
> -- 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
>



-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090224/c386fc37/attachment.htm 


More information about the asterisk-users mailing list