Re: [asterisk-users] Disable peer from AMI
Pruning a realtime peer alone will not help as the device the peer is configured on will just re-register For the record the command is sip prune realtime peer-name 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 Ish On 23 October 2013 06:12, Warren Selby wcse...@selbytech.com wrote: On Tue, Oct 22, 2013 at 11:36 PM, Michelle Dupuis mdup...@ocg.ca wrote: I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... 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... -- Thanks, Warren Selby, dCAP http://www.SelbyTech.com http://www.selbytech.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Ishfaq Malik Department: VOIP Support Company: Packnet Limited t: +44 (0)845 004 4994 f: +44 (0)161 660 9825 e: i...@pack-net.co.uk w: http://www.pack-net.co.uk Registered Address: PACKNET LIMITED, Duplex 2, Ducie House 37 Ducie Street Manchester, M1 2JW COMPANY REG NO. 04920552 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Disable peer from AMI
put it in a different context in your dial plan and use a gotoif statement to control the times it is allowed to dial out. you can also redirect it to a prerecorded message whenever someone tries to use it during the 'off' time. no need for anything as brutal as disabling it in sip.conf. On 2013-10-23 12:37 AM, Michelle Dupuis mdup...@ocg.ca wrote: I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Disable peer from AMI
I'm just stating what is already explained above. You could either have dialplan with iftime() or use realtime peers, and have something enable/disable them from sql backend On 23 October 2013 11:38, Darryl Moore dar...@moores.ca wrote: put it in a different context in your dial plan and use a gotoif statement to control the times it is allowed to dial out. you can also redirect it to a prerecorded message whenever someone tries to use it during the 'off' time. no need for anything as brutal as disabling it in sip.conf. On 2013-10-23 12:37 AM, Michelle Dupuis mdup...@ocg.ca wrote: I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Disable peer from AMI
Unfortunately I do not have the ability / permission to alter the dialplan used for this customer. Odd requirement I know... From: asterisk-users-boun...@lists.digium.com [asterisk-users-boun...@lists.digium.com] On Behalf Of Darryl Moore [dar...@moores.ca] Sent: Wednesday, October 23, 2013 6:38 AM To: Asterisk Users List Subject: Re: [asterisk-users] Disable peer from AMI put it in a different context in your dial plan and use a gotoif statement to control the times it is allowed to dial out. you can also redirect it to a prerecorded message whenever someone tries to use it during the 'off' time. no need for anything as brutal as disabling it in sip.conf. On 2013-10-23 12:37 AM, Michelle Dupuis mdup...@ocg.camailto:mdup...@ocg.ca wrote: I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Disable peer from AMI
I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Disable peer from AMI
On Tue, Oct 22, 2013 at 11:36 PM, Michelle Dupuis mdup...@ocg.ca wrote: I need to disable/enable a peer after hours automatically, and am thinking about doing so via the AMI. 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... 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... -- Thanks, Warren Selby, dCAP http://www.SelbyTech.com http://www.selbytech.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users