search for: foundrow

Displaying 4 results from an estimated 4 matches for "foundrow".

Did you mean: found_os
2006 Nov 13
0
Question about MySQL Fetch foundRow from the dial plan
I have a query that query's my database based on the read input for an ID number. exten => s,4,MYSQL(Query resultid ${connid} SELECT\ `FirstName`\ `HomePhone`\ FROM\ `contacts`\ WHERE\ `ContactID`= \'${ID}\') exten => s,5,MYSQL(Fetch foundRow ${resultid} var1 var2) ; fetch row Problem is is that when I do the following: exten => s,7,Cepstral(The Phone number for ${var1} is ${var2}) is reads back Executing Cepstral("SIP/2092-ef65", "The Phone number for John Doe is ") in new stack The var2 is not displaying....
2009 May 09
1
Incompatible changes to asterisk 1.6 MYSQL addon query syntax
...88,1,MYSQL(Connect connid localhost ipcontact passwd ipcontact) exten => 888,n,GotoIf($["${connid}" = ""]?error,1) exten => 888,n,MYSQL(Query resultid ${connid} SELECT\ `number`\ FROM\ `phones`\ WHERE\ `channel`=\'${chan}\') exten => 888,n(fetchrow),MYSQL(Fetch *foundRow* ${resultid} number) /; fetch row/ exten => 888,n,*GotoIf($["${foundRow}" = "1"]?done)* /; leave loop if no row found/ exten => 888,n,NoOp(${number}) exten => 888,n,*Goto(fetchrow)* /; continue loop if row found/ exten => 888,n(done),MYSQL(Clear ${resultid}) exten =&...
2008 Sep 26
0
PRI TE110P Configuration (Solved)
...> anyone knows of to output the number of rows a mysql query returned. > > > > Aka > > .. > > exten => 1,n,MYSQL(Query resultid ${connid} SELECT\ `State`\ FROM\ > `AreaCodes`\ WHERE\ `AreaCode`=\'${CIDArea}\') > > exten => 1,n(fetchrow),MYSQL(Fetch foundRow ${resultid} number) ; fetch row > > exten => 1,n,GotoIf($["${foundRow}" = "1"]?done) ; leave loop if no row > found > > exten => 1,n,Set(State=${State}) > > exten => 1,n,Goto(fetchrow) ; continue loop if row found > > exten => 1,n,Set(RowsR...
2011 Mar 03
11
mySQL connection testing
...oked from the dialplan is current or not? For example: extensions.conf =============== [context] exten => _X.,1,MYSQL(Connect connid localhost user pass db) exten => _X.,n,MYSQL(Query resultid ${connid} SELECT `something` FROM `table` WHERE `number` = ${EXTEN}) exten => _X.,n,MYSQL(Fetch foundRow ${resultid} something) exten => _X.,n,MYSQL(Clear ${resultid}) exten => _X.,n,Wait(10) ; just for fun exten => _X.,n,MYSQL(Disconnect ${connid}) exten => _X.,n,Hangup() exten => h,1,MYSQL(Disconnect ${connid}) Now if the caller hangs up before the 10 second timeout - then all is w...