[asterisk-users] Variable using AMI

Carlos Ruiz Diaz carlos.ruizdiaz at gmail.com
Mon Jul 6 14:08:48 CDT 2009


Thank you!

I did not know the existence of  DB command. The command allows me to store
KVPs but I have to use the same variable name every time so every process
that starts the AMI instance will override the values making it unusable for
what I want to achieve.

It was really useful anyways. :)


2009/7/6 "Juan E. Rodríguez" <jerdguez at gmail.com>

>  Maybe you could use the Asterisk Database.
> In 1.4 you can do it with DBGet and DBPut:
> http://www.voip-info.org/wiki/view/Asterisk+cmd+DBget
> http://www.voip-info.org/wiki/view/Asterisk+cmd+DBput
>
> In 1.6 use DB() function.
>
> Regards,
> Juan
>
>
> David Backeberg wrote:
>
> On Mon, Jul 6, 2009 at 11:37 AM, Carlos Ruiz
> Diaz<carlos.ruizdiaz at gmail.com> <carlos.ruizdiaz at gmail.com> wrote:
>
>
>  Hello,
>
> if I do a variable assignation using AMI interface, that variable will be
> visible only for the current AMI instance or will be readable for all AMI
> instances?. I will login using the same user, concurrently. A program will
> write a global variable using the same name and if asterisk don't have any
> scope rules I have to find another way to do what I want.
>
>
>  If you want to maintain scope for a variable across multiple calls you
> should maintain the value of that variable outside of asterisk and
> keep setting it for each new phonecall. Global variables in asterisk
> do not do what you are describing.
>
> AMI does have something where you can name a particular AMI session,
> and then communication for that session will care that name. That
> should not be confused with a system-wide global variable.
>
> _______________________________________________
> -- 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090706/5f84a9b9/attachment.htm 


More information about the asterisk-users mailing list