[asterisk-users] 'System' application in asterisk

Tino tino at sparksupport.com
Tue Aug 10 01:07:15 CDT 2010


Sorry Dany, I am new to agi scripting. If you do not mind can you please
give me a sample script for this. That would be really helpful to me.


On Mon, Aug 9, 2010 at 11:51 PM, Danny Nicholas <danny at debsinc.com> wrote:

>   *From:* asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] *On Behalf Of *Tino
> *Subject:* [asterisk-users] 'System' application in asterisk
>
> >Hello,
> >Is there any  way to capture the output of the 'System' application in
> asterisk dialplan and evaluate it.
>
> >For example, i would like to get the output of following System
> application and use its value in next line
> >for decision making
>
> >exten => 5000,n,System(command)
>
>  I think this answer is no.  system only returns ${SYSTEMSTATUS} as
> SUCCESS or FAILURE to tell you that the command finished or died.  You could
> however do a bash AGI that would set a variable with the result of what you
> would have sent to system
>
> Replace
>
> Exten => 5000,n,System(‘/bin/ls’)
>
> With
>
> Exten => 5000,n,AGI(bashsys.sh,”/bin/ls’)
>
> Exten => 5000,n.Gotoif(${RESULT}…
>
>
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100810/48d47f60/attachment.htm 


More information about the asterisk-users mailing list