On Friday 16 January 2009 17:43:21 sean darcy wrote:
> Danny Nicholas wrote:
> > Why not do a "zap restart" instead of restarting asterisk?  You could
> > write an AGI to do the ZR when the condition occurred and lines where
> > empty.
>
> Yes, a cron job to restart zaptel would cut off any call then existing.
>
> But how would I test for it? I can imagine:
>
> exten=>s,n,ExecIf(<some damn thing>, System(service dahdi restart))
>
> It's the <some damn thing> I can't imagine. How do you test if dahdi is
> acting up?

Not a service restart, but a "dahdi restart".  You can't restart the dahdi
service without first stopping Asterisk, anyway.

if [ `../asterisk-trunk/contrib/scripts/astcli "core show channels" | wc -l` = 
3 ]; then asterisk -rx 'dahdi restart'; fi

-- 
Tilghman

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to