Hi all,
we have asterik running on a local maradb database and all is ok.
But, when a call arrives, we first look into an external database to see into a phonebook if we know the name associated to a number. This work quite well.
Sometimes, we don’t know why, the database as error and in fact into the dialplan we are stuck on the instruction that reads the value for 1 or 2 minutes… thenthe call is hanged up before we continue, nobody waits for minutes when ringing
Here are the diaplan commands :
same = n(displayName),set(cidDisplayName=${ODBC_PHONEBOOK-NUMBER-USER(${CALLERID(num)})})
same = n,ExecIf($[“${cidDisplayName}” = “”]?Set(cidDisplayName=${CALLERID(num)}))
and the func_odbc associated commands :
[PHONEBOOK-NUMBER-USER]
writehandle=phonebook
readsql=select pB.displayName, pL.phoneDescription from g_phoneBook pB,g_phoneList pL where pB.ID=pL.FKphoneBook and pL.phoneNumber=‘${SQL_ESC(${ARG1})}’
I can see an old thread about mysql connectivity with no real solution.
By the way is there a solution to stop being stuck on the database reading using a timeout ?
For example if i have no reply after 5 sec i go to the next diaplan command.
Many thanks for ideas
Ced