View previous topic :: View next topic |
Author |
Message |
vadim.lungu at yopeso.com Guest
|
Posted: Thu Mar 13, 2014 4:11 pm Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Hello everyone,
I would be extremely glad if someone could help me with the following issue:
cat /etc/asterisk/func_odbc.conf
[call_user]
prefix=GET
dsn=asterisk_odbc_sip
readsql=SELECT name FROM asterisk_sippeers WHERE name = '%477'
Asterisk CLI show the following issue:
-- Executing [205@phones_wildcard:1] NoOp("SIP/Y_MD_vlungu_477-00000008", "000000000000000000000000000000000000000000000000000") in new stack
-- Executing [205@phones_wildcard:2] NoOp("SIP/Y_MD_vlungu_477-00000008", "205") in new stack
Quote: | Found no rows [SELECT name FROM asterisk_sippeers WHERE name = '%477']
| -- Executing [205@phones_wildcard:3] Set("SIP/Y_MD_vlungu_477-00000008", "YUID=") in new stack
-- Executing [205@phones_wildcard:4] NoOp("SIP/Y_MD_vlungu_477-00000008", "##################################################") in new stack
-- Executing [205@phones_wildcard:5] NoOp("SIP/Y_MD_vlungu_477-00000008", "##################################################") in new stack
-- Executing [205@phones_wildcard:6] Macro("SIP/Y_MD_vlungu_477-00000008", "simple,,30") in new stack
Anyone has any ideas what is going wrong ?
--
Mit freundlichen Grüßen / Best regards
Vadim Lungu
System Engineer
Tel +49-941-569592-0 Fax +49-941-569592-99 Mail vadim.lungu@yopeso.com (vadim.lungu@yopeso.com) Web https://www.yopeso.com
YOPESO s.r.l.
Calea Orheiului 20/1
2059 Chisinau
Republik Moldau Registergericht Chisinau
Registernummer 1008600037623 VAT-ID 0207159
Geschäftsführer Svetlana Arnaut |
|
Back to top |
|
|
kevin.larsen at pionee... Guest
|
Posted: Thu Mar 13, 2014 4:18 pm Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Quote: | readsql=SELECT name FROM asterisk_sippeers WHERE name = '%477'
|
Not sure what database you are accessing, but have you tried the following:
readsql=SELECT name FROM asterisk_sippeers WHERE name LIKE '%477' |
|
Back to top |
|
|
vadim.lungu at yopeso.com Guest
|
Posted: Thu Mar 13, 2014 4:32 pm Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Sure , here is the reasult.
mysql> SELECT name FROM asterisk_sippeers WHERE name LIKE '%477' ;
+-----------------+
| name |
+-----------------+
| Y_MD_vlungu_477 |
+-----------------+
1 row in set (0.00 sec)
On 03/13/2014 11:17 PM, Kevin Larsen wrote:
Quote: | SELECT name FROM asterisk_sippeers WHERE name LIKE '%477' |
--
Mit freundlichen Grüßen / Best regards
Vadim Lungu
System Engineer
Tel +49-941-569592-0 Fax +49-941-569592-99 Mail vadim.lungu@yopeso.com (vadim.lungu@yopeso.com) Web https://www.yopeso.com
YOPESO s.r.l.
Calea Orheiului 20/1
2059 Chisinau
Republik Moldau Registergericht Chisinau
Registernummer 1008600037623 VAT-ID 0207159
Geschäftsführer Svetlana Arnaut |
|
Back to top |
|
|
kevin.larsen at pionee... Guest
|
Posted: Thu Mar 13, 2014 5:22 pm Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Quote: | Sure , here is the reasult.
mysql> SELECT name FROM asterisk_sippeers WHERE name LIKE '%477' ;
+-----------------+
| name |
+-----------------+
| Y_MD_vlungu_477 |
+-----------------+
1 row in set (0.00 sec)
|
What happens when you use that in your func_odbc.conf? Does your dialplan work? |
|
Back to top |
|
|
hkc323 at gmail.com Guest
|
Posted: Fri Mar 14, 2014 12:09 am Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Vadim Lungu
try this one .
readsql=SELECT name FROM asterisk_sippeers WHERE name LIKE '%477';
--
_____________________________________________________________________
-- 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 |
|
|
vadim.lungu at yopeso.com Guest
|
Posted: Fri Mar 14, 2014 4:05 am Post subject: [asterisk-users] func_odbc do not read LIKE predicate |
|
|
Thank you, this statement is working.
On 03/14/2014 07:08 AM, hkc323 wrote:
Quote: | Quote: | Vadim Lungu
try this one .
readsql=SELECT name FROM asterisk_sippeers WHERE name LIKE '%477';
| |
--
Mit freundlichen Grüßen / Best regards
Vadim Lungu
System Engineer
Tel +49-941-569592-0 Fax +49-941-569592-99 Mail vadim.lungu@yopeso.com (vadim.lungu@yopeso.com) Web https://www.yopeso.com
YOPESO s.r.l.
Calea Orheiului 20/1
2059 Chisinau
Republik Moldau Registergericht Chisinau
Registernummer 1008600037623 VAT-ID 0207159
Geschäftsführer Svetlana Arnaut |
|
Back to top |
|
|
|