Displaying 20 results from an estimated 66 matches for "resultid".
Did you mean:
resulted
2006 Dec 04
4
MySQL cmd % pattern matching
Hi All
Does anyone know how to use the MySQL cmd in Asterisk with LIKE and % in
the query?
I have:
exten => s,5,Set(query=SELECT name from contacts where tel like
%${number})
exten => s,6,MySQL(Connect connid hostname username password dbname)
exten => s,7,MySQL(Query resultid ${connid} ${query})
But there seems to be a problem with the % sign and I don't know how to
hash it out.
It works without the % sign.
Thanks
Kind Regards
Garth
2011 May 17
1
mysql call stored procedure
...mysql> call call_control(78236721,1000,1233);
+------+
| pass |
+------+
| 1 |
+------+
So I need asterisk to recognize this pass and take some actions based on
what the pass value is.
Dialplan looks like this:
MYSQL(Connect connid ${DBDefaultHost} ${DBuser} ${DBpass} ${DBname})
MySQL(Query resultid ${connid} CALL call_control(78236721,1000,1233))
MySQL(Fetch fetchid ${resultid} pass)
MYSQL(clear ${resultid})
MySQL(Query resultid ${connid} SELECT/INSERT whatever from table)
So, it gives me this pass value correct, but if I execute some other query
INSERT or SELECT after clearing the result, i...
2010 May 13
1
app_addon_sql_mysql.c:116 find_identifier
Hello list,
I have the following problem with MySQL-queries : it seems that the
resultid and connid are not cleared !
[macro-GetMailboxFromSIPuserID]
exten => s,1,MYSQL(Connect connid localhost xxx xxx xxx)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ extensie FROM\
tbl_SIPaccounts\ WHERE\ ID="${ARG1}")
exten => s,n,MYSQL(Fetch fetchid ${resultid} extensie)...
2011 Feb 18
2
cmd MySQL
Hi guys,
I'm trying to connect Asterisk to the MySQL, but I can't execute it. It
returns an error, as below:
-- Executing [200 at teste:2] MYSQL("Console/dsp", "Query resultid 1 SELECT/
ramal/ FROM/ colaboradores/ WHERE/ ramal=200") in new stack
[Feb 18 15:55:13] WARNING[7696]: app_mysql.c:393 aMYSQL_query: aMYSQL_query:
mysql_query failed. Error: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right synta...
2007 Apr 13
2
MySQL query from extensions?
What wrong with this:
[get-dnisinfo]
; sub-routine to get owner's password
exten => s,1,Verbose( == )
exten => s,n,MYSQL(Connect connid localhost root password dax)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
dnislookup\ WHERE\ dnis=\'${IVR-Exten}\')
exten => s,n,MYSQL(Fetch fetchid ${password} password)
exten => s,n,Verbose( == Password found was
[${password}]-[${connid}]-[${fetchid}]-[${resultid}] )
exten => s,n,MYSQL(Clear ${password})
exten =>...
2006 Mar 28
1
Asterisk to MySQL Data Lookup Warning Message?
..._mysql.c:318 aMYSQL_fetch: ast_MYSQL_fetch: numFields=1
Should I be concerned? Does anyone know what it means?
Thanks.
JR
I'm dialing extension 1001
extensions.conf
[lookupmysql]
exten => _X.,1,MYSQL(Connect connid 10.10.10.110 asteriskdb password table)
exten => _X.,2,MYSQL(Query resultid ${connid} SELECT\ fullcontact\ from\ table_sip\ where\ name=${EXTEN})
exten => _X.,3,MYSQL(Fetch fetchid ${resultid} var1)
exten => _X.,4,MYSQL(Clear ${resultid})
exten => _X.,5,MYSQL(Disconnect ${connid})
exten => _X.,6,GotoIf($["${var1}" = ""]?invalid,i,1:${EXTEN},...
2007 Apr 19
1
MySQL Update from exten
I've tried every combination I could find on the net and so far there is
no joy
The thing is I can do this update from the command line: Maybe some new
eyes might find the answer?
exten => update,1,MYSQL(Connect connid localhost root password dax)
exten => update,n,MYSQL(QUERY resultid ${connid} UPDATE\ caller\ SET\
lastcall=${LASTCALL}\,totalcalls=totalcalls+1\,currentcalls=currentcalls+1\
WHERE\ dnis=\'${IVR-Exten}\'\ AND\ ani=\'${CALLERID(number)}\')
exten => update,n,MYSQL(Clear ${resultid})
exten => update,n,MYSQL(Disconnect ${connid})
Asterisk logs...
2008 Jan 07
1
extension.conf with mysql
Hi,
I am trying to connect the outbound dialing with mysql with the following
code,
exten => 88,1,MYSQL(Connect connid hostname username password dbname)
exten => 88,2,GotoIf($["${connid}" = ""]?error,1)
exten => 88,3,MYSQL(Query resultid ${connid} SELECT\ phone\ FROM\
<tablename>\ WHERE\ phone =${a})
exten => 88,4,MYSQL(Fetch fetchid ${resultid} ph\ sa)
...
.
...
after this I am getting confused. My moto is to display the number in the
database and need to check with my outgoing number.
how to display fetched number from...
2007 Apr 16
1
Stuck on MySQL UPDATE
...for the value - I'm not sure asterisk will allow
using a variable for the field name and if not, I'll attempt to create
an exten for each bin to update.
Here the method I'd like to use:
exten => sav,n,MYSQL(Connect connid localhost root password dax)
exten => sav,n,MYSQL(QUERY resultid ${connid}UPDATE\ dnislookup\ SET\
${BINID}\ =\ ${NEWPHRASENAME}\ WHERE\ dnis\ =\ ${IVR-Exten})
But I've tried this too:
exten => sav,n,MYSQL(Connect connid localhost root password dax)
exten => sav,n,MYSQL(QUERY resultid ${connid}UPDATE\ dnislookup\ SET\
bin2\ =\ ${NEWPHRASENAME}\ WHE...
2006 Jun 15
7
Echo Problem with T411P
Hello,
There are 3 PRI's connected to the card each from different operators.
Especially echo occured on span 3 is really annoying. Configuration
files are as follows. Is there something wrong in conf ?
Zapata.conf --------------------------
[channels]
context=default
switchtype=euroisdn
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
2009 Apr 22
1
Upgrading from 1.4.21.2 to 1.6.0.5 breaks sql queries with backslashes?
...pe the commas, but I
could be wrong.
Here's an example of a failing query from extensions.conf (line 2) that
works fine in 1.4.21.2 and fails in 1.6.0.5:
[vpbx-generic-cc-get-vpbx-number]
exten => s,1,MYSQL(Connect connid ${DBHOST} ${DBUSER} ${DBPW} ${DBNAME})
exten => s,2,MYSQL(Query resultid ${connid} SELECT vpbx_id\,vpbx.password\,vpbx.name FROMext\,vpbx WHERE mailbox="${CALLERID(num)}" and vpbx_id=vpbx.id)
exten => s,3,MYSQL(Fetch fetchid ${resultid} vpbx-id vpbx-password vpbx)
exten => s,4,MYSQL(Clear ${resultid})
exten => s,5,MYSQL(Query resultid ${connid} SELECT...
2009 Aug 30
2
MySQL syntax error : I really don't see where...
Hi list,
I'm stuck for the moment @ the following :
My Query (in a macro) :
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ vakantie_set\
vakantie_data1\ vakantie_data2\ FROM\ AstDB\ where\
SIPACCOUNT="${ARG1}")
Asterisk CLI :
[Aug 30 14:07:42] -- Executing [s at macro-vakantie:2]
MYSQL("IAX2/zoiper-9238", "Query resultid 1 SELECT vakantie_set
vakantie_data1 vakantie_data...
2017 Apr 22
4
asterisk name in mysql
Thanks a lot for the reply.
I did follow that already, but i do have a problem. Here is my
extensions.conf part for that particular number
exten => 6912345678,1,Answer()
exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd asterisk)
exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8)
exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb)
exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname
FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1)
exten => 6912345678,n,MYSQL(Fetch fetchid ${resulti...
2005 May 18
1
Mysql cmd with Asterisk Problems
...s formed from using the wiki reference to using the
mysql command.
The problem is with the fetch command.
Here is the macro code:
Mysql(QueryString=SELECT\ ivr-password\ from\ users\ where\ ivr-id=${userid})
Mysql(Query r ${connid} ${QueryString})
Mysql(Fetch fetchid ${r} dbuserpass)
Mysql(Clear ${resultid})
Mysql(Disconnect ${connid})
However, it never gets past the fetch line. and ${r} is not showing
anything either from che CLI window.
I usesd the mysqlasteri web page to make the command escape character
happy, etc. I have tried putting \' around each item, etc. However The
same problem comes...
2009 Feb 25
1
Realtime database function help
Hello Everyone!
According to voip-info.org the correcy syntax for the realtime function is:
REALTIME(family|fieldmatch[|value[|delim1[|delim2]]]) on read
REALTIME(family|fieldmatch|value|field) on write
It seems from the syntax that it is only possible to retrieve a full
row according to the value of only of column. This translates in SQL
language as Select * from family where fieldmath =
2009 Sep 09
1
MySQL question
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090909/4ba848c0/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bhfisher.vcf
Type: text/x-vcard
Size: 253 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090909/4ba848c0/attachment.vcf
2003 Jun 24
1
parsing bug? (using PGSQL)
Hi all again,
if i make a query with
...
exten => _X.,2,PGSQL,"Query resultid ${connid} SELECT getdest('${EXTEN}')";
...
an error like
WARNING[32785]: File pbx.c, Line 1126 (pbx_extension_helper): No application
'PGSQL,"Query resultid ${connid} 'SELECT getdest'
for extension (tel1, 00905888, 2)
occurs.
This looks like an parsing bug. As if t...
2006 Dec 18
1
Re: Best way to access MySQL data from dial plan
Resending as message didn't show up the first time
>I need to access MySQL from the dial plan. Currently I am using the MYSQL
>function:
> exten => *78,n,MYSQL(Connect asterisklocal localhost asteriskuser password
> asterisk)
> exten => *78,n,MYSQL(Query resultid ${asterisklocal} CALL\
> sp_ins_into_avp(\'/DND/${CALLERID(number)}\'\,\'YES\'))
> exten => *78,n,MYSQL(Clear ${resultid})
> exten => *78,n,MYSQL(Disconnect ${asterisklocal})
>
> This shows authentication details in the Asterisk CLI which is not ideal.
> Wh...
2007 Apr 02
1
Mysql issue
Trying to create an extension that will toggle an enum value in our
database...
exten => s,1,MYSQL(Connect connid localhost myuser tmppass asterisk)
exten => s,n,MYSQL(Query resultid ${connid} UPDATE\ night_service\ SET\
status=(SELECT\ CASE\ status\ WHEN\ \'y\'\ THEN\ \'n\'\ ELSE\ \'y\'\ END));
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,Hangup
This is saying its exiting with a 0 value, and then...
2008 Mar 06
1
AEL - SQL and TIMEDIFF()
...ly from the MySQL Client, but from the Asterisk Dialplan it
just wont work. Is there a limitation in the MySQL() application for the
Asterisk dialplan that produces this error?
<CODE>
context testsql {
s => {
MYSQL(Connect connid ${DBHOST} ${DBUSER} ${DBPASS} ${DB});
MYSQL(Query resultid ${connid} SELECT TIMEDIFF(callend,callstart) FROM
tblCall WHERE id=7);
MYSQL(fetch fetchid ${resultid} temp);
MYSQL(Disconnect ${connid});
}
}
</CODE>
The error I'm getting is below:
[Mar 6 08:59:35] WARNING[27116]: app_addon_sql_mysql.c:268 aMYSQL_query:
aMYSQL_query: mysql_q...