Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Database and variables


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
admin at tootai.net
Guest





PostPosted: Tue Jul 08, 2014 9:03 am    Post subject: [asterisk-users] Database and variables Reply with quote

Hi list,

question regarding the result of a DB query. I have

database put Agora modele/IVR/AstreinteNagios/1 ${ASTR_State}

i=1 and I read the DB with

exten => IVR,n,Set(__PlayMe=${DB(${ASTRSVC}/IVR/${IVR}/${i})})
exten => IVR,n,NoOp(We read ${PlayMe})

Result:

-- Executing [IVR@Automates:8] Set("SIP/laotseu-00000001",
"__PlayMe=${ASTR_State}") in new stack
-- Executing [IVR@Automates:9] NoOp("SIP/laotseu-00000001", "Value
of PlayMe is ${ASTR_State}") in new stack

This means that ${ASTR_State} is not considered as a variable but as a
simple alphanumerical chain. What I would like is to display the value
of ASTR_State wich was setted before the PlayMe affectation in the
dialplan. I tried the ${${ASTR_State}} command, no more luck.

Is there a way to archieve what I want to do? A regexp ?

In any dialplan, if you make a NoOp( ${blabla} ) and blabla was not
inizialized, the ${blabla} has an empty value. Why in my case above
${ASTR_State} is not treated as a variable?

Thanks for any suggestion

--
Daniel

--
_____________________________________________________________________
-- 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
Back to top
EWieling at nyigc.com
Guest





PostPosted: Tue Jul 08, 2014 9:09 am    Post subject: [asterisk-users] Database and variables Reply with quote

If you are executing "database put Agora modele/IVR/AstreinteNagios/1 ${ASTR_State}" while in the Asterisk CLI, that won't work. You cannot access DIALPLAN variables from the CLI.

-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Administrator TOOTAI
Sent: Tuesday, July 08, 2014 11:02 AM
To: Asterisk-Users
Subject: [asterisk-users] Database and variables

Hi list,

question regarding the result of a DB query. I have

database put Agora modele/IVR/AstreinteNagios/1 ${ASTR_State}

i=1 and I read the DB with

exten => IVR,n,Set(__PlayMe=${DB(${ASTRSVC}/IVR/${IVR}/${i})})
exten => IVR,n,NoOp(We read ${PlayMe})

Result:

-- Executing [IVR@Automates:8] Set("SIP/laotseu-00000001",
"__PlayMe=${ASTR_State}") in new stack
-- Executing [IVR@Automates:9] NoOp("SIP/laotseu-00000001", "Value
of PlayMe is ${ASTR_State}") in new stack

This means that ${ASTR_State} is not considered as a variable but as a
simple alphanumerical chain. What I would like is to display the value
of ASTR_State wich was setted before the PlayMe affectation in the
dialplan. I tried the ${${ASTR_State}} command, no more luck.

Is there a way to archieve what I want to do? A regexp ?

In any dialplan, if you make a NoOp( ${blabla} ) and blabla was not
inizialized, the ${blabla} has an empty value. Why in my case above
${ASTR_State} is not treated as a variable?

Thanks for any suggestion

--
Daniel

--
_____________________________________________________________________
-- 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

--
_____________________________________________________________________
-- 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
Back to top
admin at tootai.net
Guest





PostPosted: Wed Jul 09, 2014 3:42 am    Post subject: [asterisk-users] Database and variables Reply with quote

Le 08/07/2014 16:07, Eric Wieling a écrit :
Quote:
If you are executing "database put Agora modele/IVR/AstreinteNagios/1 ${ASTR_State}" while in the Asterisk CLI, that won't work. You cannot access DIALPLAN variables from the CLI.

I didn't know that, thanks. Will try another way.

Regards

Quote:
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Administrator TOOTAI
Sent: Tuesday, July 08, 2014 11:02 AM
To: Asterisk-Users
Subject: [asterisk-users] Database and variables

Hi list,

question regarding the result of a DB query. I have

database put Agora modele/IVR/AstreinteNagios/1 ${ASTR_State}

i=1 and I read the DB with

exten => IVR,n,Set(__PlayMe=${DB(${ASTRSVC}/IVR/${IVR}/${i})})
exten => IVR,n,NoOp(We read ${PlayMe})

Result:

-- Executing [IVR@Automates:8] Set("SIP/laotseu-00000001",
"__PlayMe=${ASTR_State}") in new stack
-- Executing [IVR@Automates:9] NoOp("SIP/laotseu-00000001", "Value
of PlayMe is ${ASTR_State}") in new stack

This means that ${ASTR_State} is not considered as a variable but as a
simple alphanumerical chain. What I would like is to display the value
of ASTR_State wich was setted before the PlayMe affectation in the
dialplan. I tried the ${${ASTR_State}} command, no more luck.

Is there a way to archieve what I want to do? A regexp ?

In any dialplan, if you make a NoOp( ${blabla} ) and blabla was not
inizialized, the ${blabla} has an empty value. Why in my case above
${ASTR_State} is not treated as a variable?

Thanks for any suggestion


--
_____________________________________________________________________
-- 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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services