[asterisk-users] Best method for detecting state of a sip trunk

Per Møller per at wallin.dk
Fri Jul 7 07:20:45 MST 2006


What is the best method to detect the state of a sip trunk from an external
monitoring application?

I am currently testing a series of sip providers, and I wish to monitor
their state from an external application so that I may collect statistics on
their uptime/availability.

If I use Qualify=yes, I can monitor the state through the AMI using SIPPEER
and see if the line is ok and how lagged it is. However some providers does
not support the OPTIONS request that a qualify makes, which makes Asterisk
believe that the provider is down, making it impossible to use that
provider.

Also if my authorization (username/secret) is incorrect, querying through
AMI with SIPPEER show me that the trunk is ok, although I am not actually
registered with the provider.

I know that I can use the AMI command 'Command' and request the 'sip show
registry' and get the registration state that I need, but this list
truncates the Username down to 12 chars making it impossible to know which
sip trunk it belongs to.

Any ideas?


// Per





More information about the asterisk-users mailing list