Am 15.09.2015 um 16:40 schrieb Shamus Rask <sha...@srask.ca>:

> I’m posting this here as I find the AstLinux users offer the best and most 
> responsive insights to all things Asterisk.
> 
> I’ve started a SaaS-based project that uses Asterisk to make outbound calls. 
> I’d like to implement some form of rigorous monitoring to ensure that my 2x 
> outbound SIP trunks are able to dial numbers on the PSTN.
> 
> I’ve created a cron job on my Asterisk server that generates a .call file 
> every 10 minutes. This dials a separate DID (hosted by a different SIP 
> provider) on my personal AstLinux box. By doing an Answer() immediately 
> followed by a Hangup(), I’ve limited the duration of the call to < 1s. 
> However, I’m still being charged $0.005 for each call by my SIP provider. At 
> 2x calls every 10m, this adds up to $1.44/day or $43.20/month.
> 
> Given the SIP signalling that is taking place, is there any way to parse the 
> SIP messages and terminate the call attempt when the Asterisk server sees a 
> “180 - ringing” message? This would eliminate the daily cost of the tests and 
> I would only incur the monthly DID charge.
> 
> Thank you in advance,
>    Shamus

Hi Shamus,

you could try to let the included Monit application do the job.

http://doc.astlinux.org/userdoc:tt_monit_monitoring

SIP examples from the web:

  check host openser_all with address 127.0.0.1
   if failed port 5060 type udp protocol sip 
      with target "localhost:5060" and maxforward 6
   then alert
  
  check host sip.broadvoice.com with address sip.broadvoice.com
   if failed port 5060 type tcp protocol SIP 
      and target 1...@sip.broadvoice.com maxforward 10 
   then alert

If it doesn't work, you would get a email.
You need to play with the "check host" settings or search the web

Michael

http://www.mksolutions.info





------------------------------------------------------------------------------
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to