Hi, I want to know how I can get a value from a table. Say, I have a table sip_buddies for storing sip user account information. There is a field called 'accountcode' that I want to get its value in the dial plan. As I find that there is no direct way to get the value from the table. Does anyone can tell me how can I get its value in the dial plan? Thanks!
Search the wiki for the application command realtime() if you are using realtime. www.voip-info.org> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of unplug > Sent: Monday, June 12, 2006 10:47 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] get value from DB directly > > Hi, > I want to know how I can get a value from a table. Say, I have a > table sip_buddies for storing sip user account information. There is > a field called 'accountcode' that I want to get its value in the dial > plan. As I find that there is no direct way to get the value from the > table. Does anyone can tell me how can I get its value in the dial > plan? > Thanks! > _______________________________________________ > --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
The question has changed, but the answer has not> Search the wiki for the application command realtime() if you are > using realtime. > > www.voip-info.orgAccountcode is a channel variable that can be read at any time, if you are trying to get information from the DB that is not held in a channel variable use Realtime() to do a query.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of unplug > Sent: Monday, June 12, 2006 8:17 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] get value from DB directly > > Thanks. I have set the ARA to using DB without problem. From the > example, I can get the value of account code from sip_buddies using > the following. > exten=>100,1,Answer() > exten=>100,2,NoOp(${ACCOUNTCODE}) > > I can't get the value of the field 'cancallforward' using thefollowing.> exten=>101,1,Answer() > exten=>101,2,NoOp(${CANCALLFORWARD}) > > How cant I get the value of each field in the table? > > > > On 6/13/06, Damon Estep <damon@suburbanbroadband.net> wrote: > > Search the wiki for the application command realtime() if you areusing> > realtime. > > > > www.voip-info.org > _______________________________________________ > --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
Try "show application realtime" at the CLI> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of unplug > Sent: Monday, June 12, 2006 9:00 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] get value from DB directly > > Thanks! > Do you mean there is a realtime function available to get and set the > value in table? Can you give me some references (website) as I have > found nothing of this function. > > On 6/13/06, Damon Estep <damon@suburbanbroadband.net> wrote: > > The question has changed, but the answer has not > > > > > Search the wiki for the application command realtime() if you are > > > using realtime. > > > > > > www.voip-info.org > > > > Accountcode is a channel variable that can be read at any time, ifyou> > are trying to get information from the DB that is not held in achannel> > variable use Realtime() to do a query. > > > > > -----Original Message----- > > > From: asterisk-users-bounces@lists.digium.com[mailto:asterisk-users-> > > bounces@lists.digium.com] On Behalf Of unplug > > > Sent: Monday, June 12, 2006 8:17 PM > > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > > Subject: Re: [Asterisk-Users] get value from DB directly > > > > > > Thanks. I have set the ARA to using DB without problem. From the > > > example, I can get the value of account code from sip_buddiesusing> > > the following. > > > exten=>100,1,Answer() > > > exten=>100,2,NoOp(${ACCOUNTCODE}) > > > > > > I can't get the value of the field 'cancallforward' using the > > following. > > > exten=>101,1,Answer() > > > exten=>101,2,NoOp(${CANCALLFORWARD}) > > > > > > How cant I get the value of each field in the table? > > > > > > > > > > > > On 6/13/06, Damon Estep <damon@suburbanbroadband.net> wrote: > > > > Search the wiki for the application command realtime() if youare> > using > > > > realtime. > > > > > > > > www.voip-info.org > > > _______________________________________________ > > > --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 > > _______________________________________________ > > --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 > > > _______________________________________________ > --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