[Asterisk-Users] Realtime SIP Lookups

Douglas Garstang dgarstang at oneeighty.com
Mon Dec 5 22:03:04 MST 2005


All,
 
I have a feeling this question has already been addressed, but the alternative to me asking is searching through six years of list archive messages... month-by-month.
 
We have two asterisk boxes that are using realtime for sip.conf, both static and ... I guess 'realtime' realtime.
 
A polycom phone registers with the first Asterisk box (well actually it registers with OpenSER who forwards the registration to the first Asterisk box... but that shouldn't be too relevant).
 
I check the sip_buddies table in mysql and I can see that the contact info has been updated for this phone. First question, if I do not set rtcachefriends, then the fullcontact field is not updated. Why? 
 
There's also another polycom phone that came in through the other Asterisk box. It also updated that phone's contact info in sip_buddies.
 
When I make a call, while running ngrep on the mysql server, I can see the asterisk box doing a 'select * from sip_buddies where username=<caller-username>' and 'select * from sip_buddies where username=<called-username>'. Under certain circumstances that I don't yet understand, it fails periodically.... it can't find the contact details for the callee. Why?
 
Also, if I DO set rtcachefriends to yes, then it updates /var/lib/asterisk/astdb, and the calls FAILS EVERY time eventhough it is still doing the same two select queries above. Why? Why doesn't it use the values it just pulled out of the database? The info is there! This is pretty basic stuff. Why doesn't it work?
 
Trying to implement a HA solution with Asterisk. CrAzY me thought that realtime might be the solution. If I can't get this to work (and it would have been cool if it did), then it's back to registering with SER, and having SER forward the registration to _all_ the Asterisk boxes, such that every Asterisk box knows the contact details for every user agent. This works well in small test situations, but I don't know how well it will scale. How fast would retrievals be on a fully loaded (ie 120 calls) Asterisk box trying to pull a key/value pair out of 16,000 records in astdb?
 
Help appreciated.
Thanks.
 


More information about the asterisk-users mailing list