Bryan Field-Elliot
2011-Jan-02 23:26 UTC
[asterisk-users] Realtime SIP, multiple AX servers question
We have several Asterisk servers (1.6.2.15) all configured for Realtime, all backed by the same database. The Asterisk servers are all listed under DNS SRV records, and SIP ATAs find us this way. Normally, no matter which Asterisk server an ATA connects to, we get our database fields filled out correctly, such as "regseconds", "lastms", "ipadr", etc. However, with some ATA's we are experiencing a problem as follows: 1. ATA reaches its "re-registration" timeout, which we typically configure to be 60 minutes. 2. ATA re-queries DNS SRV record, and ends up re-registering with a different AX server than it was on previously. 3. The new AX server updates the Realtime DB fields (regseconds, lastms, etc). 4. The old AX server, after a few more minutes, notices that the ATA has vanished, and therefore clears out these same fields. Is there any way to fix this problem? We need to know if ATA's go offline, but, we don't want them caught in this endless loop where our multiple AX servers are out-guessing eachother and overwriting valid data in the database. Our realtime options in sip.conf are as follows: rtcachefriends=yes rtsavesysname=yes ;rtautoclear=yes ;ignoreregexpire=yes Because we are using "rtsavesysname", a perfect solution seems like it might be along the lines of "If an ATA disappears, empty out the RT database fields ONLY if it's last regserver was this one". Is this possible? Thank you, Bryan
Olle E. Johansson
2011-Jan-04 08:18 UTC
[asterisk-users] Realtime SIP, multiple AX servers question
3 jan 2011 kl. 00.26 skrev Bryan Field-Elliot:> > Normally, no matter which Asterisk server an ATA connects to, we get our database fields filled out correctly, such as "regseconds", "lastms", "ipadr", etc. However, with some ATA's we are experiencing a problem as follows: > > 1. ATA reaches its "re-registration" timeout, which we typically configure to be 60 minutes. > 2. ATA re-queries DNS SRV record, and ends up re-registering with a different AX server than it was on previously. > 3. The new AX server updates the Realtime DB fields (regseconds, lastms, etc). > 4. The old AX server, after a few more minutes, notices that the ATA has vanished, and therefore clears out these same fields.Oh, that's an interesting observation. Depending on how you see it, it's a bug or a feature request. Code-wise what you could do is that Asterisk could retrieve the information from realtime. If the sysname is not the same as the systems, it let the information be. If it's the same sysname, then erase the information. /O