<div dir="ltr">Pruning a realtime peer alone will not help as the device the peer is configured on will just re-register<div><br></div><div>For the record the command is</div><div><br></div><div>sip prune realtime <peer-name></div>
<div><br></div><div>You could go down the realtime route and remove the DB row containing the peer, or even change the password but you would have to follow any such action with pruning the peer to fluch the realtime cache</div>
<div><br></div><div>Ish</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 October 2013 06:12, Warren Selby <span dir="ltr"><<a href="mailto:wcselby@selbytech.com" target="_blank">wcselby@selbytech.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 22, 2013 at 11:36 PM, Michelle Dupuis <span dir="ltr"><<a href="mailto:mdupuis@ocg.ca" target="_blank">mdupuis@ocg.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div dir="ltr"><font color="#000000" face="Tahoma">I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI.</font></div>
<div dir="ltr"><font face="tahoma"></font> </div>
<div dir="ltr"><font face="tahoma">Is there a command to enable/disable (or perhaps delete/add) a peer via the AMI?  I could create code to modify sip.conf and force a reload, but that seems like the wrong approach...</font></div>


</div><br></blockquote></div><br></div></div><div class="gmail_extra">Have you considered adding realtime sip peers?  They can peacefully co-exist with a sip.conf file.  Then just build in some logic to sip prune when you need to remove the peer...(I forget the actual command at the moment).  As far as I can tell, no AMI would be needed...<br>

<br><br clear="all"><div><div dir="ltr">--<br>Thanks,<br>Warren Selby, dCAP<br><a href="http://www.selbytech.com" target="_blank">http://www.SelbyTech.com</a><br></div></div>
<br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<pre>Ishfaq Malik 
Department: VOIP Support
Company: Packnet Limited
t: +44 (0)845 004 4994
f: +44 (0)161 660 9825
e: <a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>
w: <a href="http://www.pack-net.co.uk" target="_blank">http://www.pack-net.co.uk</a>

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street 
Manchester, M1 2JW
COMPANY REG NO. 04920552
</pre></div>
</div>