[asterisk-users] Realtime SIP peers - reloading cached info

Rob Hillis rob at hillis.dyndns.org
Mon Feb 11 00:24:38 CST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys,

I've been working on a little dialplan fragment for roaming extensions, 
however the customer wants us to set the MWI indicator for the roaming 
extension that has just logged in.  We're using MySQL realtime, so I've 
figured out that RealTimeUpdate will happily update the realtime 
database with the correct mailbox.  My problem comes when I need to tell 
Asterisk to flush the realtime data for that extension and reload it so 
that the cached data is correct.  Running the commands "sip prune 
realtime peer XXX" followed by "sip show peer XXX load" work fine from 
the Asterisk manager interface and correctly update the cached data so 
the MWI indicator works fine.

What I want to know is if there is any better method of running manager 
API commands from within the dialplan than the horribly ugly 
System(asterisk -rx "sip prune realtime peer XXX")  It works, but from 
my point of view, it's a somewhat nasty hack.

Anyone have any suggestions?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFHr+om6uKn5cBSgGQRAn++AJ4sNAHSG3s/FCVYTreBURn7Mt91UACgy26h
UC8Q+27UbbFsL9OnL/FzcOY=
=9gf8
-----END PGP SIGNATURE-----




More information about the asterisk-users mailing list