v8elvis
(Elvis)
1
Hi, I am trying to link to a mariadb database to use as a caller ID source.
The suggested query SELECT name FROM phonebook WHERE number LIKE ‘%[NUMBER]%’ works fine when done manually and substituting the number in.
But when the pbx does a lookup it truncates the end of the query. eg
Query SELECT name FROM data WHERE number LIKE ‘%0409820705 the %’; is missing so the query never completes.
I’m just wondering if this setup works for anyone else or does anyone use this?
arielgrin
(Ariel)
2
You might need to escape the % in the script.
v8elvis
(Elvis)
3
I reworked the script to see if it was the % causing the problem…
SET @passnum = [NUMBER]; SELECT name FROM phonebook.data WHERE number LIKE CONCAT(’%’,@passnum,’%’);
Truncates straight after the [NUMBER] as well.
Surely there must be someone using this feature/code path and it can’t be a bug…
system
(system)
Closed
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.