Realtime Remote SQL v. local replication quaries

I have several servers runing 11.6-cert1 all of them, using mysql realtime in remote location.

My issue, is the US servers, who have less then 50ms latency to the SQL work fine… But European servers, withing more then 70-90ms lantecy to the SQL are failing in handle traffic, where calls are expiring in the invite, meanwhile asterisk still quaring the SQL to check authentication, and other quaries. It’s being harmless… I was crazy turning, until I got identified that.

My issue, is in all servers, I do local SQL replication, so, if I test to connect Asterisk to the local SQL, it’s working with no issue, but when do it to the remote, it’s failing as described…

As far as I understand, i can’t do use the local replication, as in the replica I may do select, show, but can’t do insert/update, as asterisk authenticaion will require this to update peers registrations.

So, my question is:

  1. I have tried to play with the dealplan to let the caller waiting meanwhile asterisk is quaring the DB, but it’s not working, as it’s deling in the authentication quaries, I’m not sure if i set got the waitng, or if there any other solution:

[quote]exten => s,1,Wait(30)
exten => s,2,Answer[/quote]
2) Dose there any other option to increase the dialog time, or decrease the sql quaries, or at least, can I descriminate the quaries, where do the show in the local replication, and the insert/update to go through the remote DB, so I save time??

I’m sorry I have put wrong title, but, even, I’m confused how is the situation, but this is my diagnostic.


As I can’t delete the earlier message, I’m answering myself, as I have SOLVED the issue myself, but still some doubts.

Eventually I have solve it by doing master-master round replication, instead of master-slave, so both servers can write in the Database simultaneously, and that’s right now…

But, i still wondering about a question.

I have provider A, created in sip.conf file, to get inbound calls from them, and appointed to dialplan providerA-inbound.

Why when I get a call from that provider, asterisk instead of read before the local files, he’s requestd to check in the Database, and doing 7 quaries in the Database to retrive the peer, and then, go to check in in file…?? Who can I set the peer config, in file, to be prioritarian, or persistant before the realtime, so I can avoid DB unnecessary quaries??