Reloading a realtime peer

This is something of a puzzle… we are trying to reload a real-time peer, and keep the phone registered. Here is the senario…

  1. The sip username and password, never change, but things like Caller ID do, quite often.
  2. The sip extensions are stored in a mysql database
  3. rtcachefriends=yes
  4. rtupdate=no
  5. rtautoclear=60
  6. ignoreregexpire=no

As you can see with the combination of the above, if we change say the callerid in the database, the updated settings will only be read when you issue a sip prune realtime ‘extention’.

But then the extension is no longer on in Asterisk peers list… right. Now if the phone re-registers within a second or two - it would be all fine… but what if the re-register setting on the phone was an hour… that phone would be unreachable for an hour!!!

So if course you supposed to issue: sip show peer ‘extension’ load… great! but there is a problem… because the rtupdate is set to no, there is no “registry” values in the db, and so the sip peers still shows as offline (but yes the callerid would be updated).

What would the solution be here, to keep the phone online the entire time?

PS: i noticed that the database keeps the SIP/Registry/extension with the registry details… can i use this somehow?