Multiple Real Times For Same Object
Hi,
Is there any way in Asterisk to have multiple forms of real time for the same object? For instance my main source for real time is MySQL. I want a fail over that if a mailbox is say not in the MySQL database for Asterisk to try via curl.
TIA.
Dovid
5 thoughts on - Multiple Real Times For Same Object
The realtime configuration describes a failover method with priorities[1], but I’m not sure if anyone has used it in recent times or if it works with voicemail. I’m also not sure if it’ll behave exactly as you want and kick in when it’s not found.
[1]
https://github.com/asterisk/asterisk/blob/master/configs/samples/extconfig.conf.sample#L52
Josh,
What should Asterisk do if one of the real time methods fail? I have in extconfig.conf musiconhold => curl,http://localhost/moh.php,1
musiconhold => mysql,db-east,asterisk_moh,2
If the first server sends back a 404 it does not go to the second connection. Shouldn’t a 404 be considered a failure and it should then move over to the next rt engine?
Depends on what the realtime driver provides back to the core in what scenario. I’ve never used or touched the curl stuff, so dunno.
I tried fishing around the code but can’t seem to find it. Where in Asterisk does the code evaluate the response from curl?
The realtime code for CURL is res/res_config_curl.c which seems to use funcs/func_curl.c underneath. Realtime stuff is in main/config.c