[asterisk-users] Detecting Disconnected Numbers - PRI

Michael Collins mcollins at fcnetwork.com
Tue Jan 23 02:00:26 MST 2007


> The correct way to determine the ending cause of a call is the
> ${HANGUPCAUSE} variable that Dial creats.  Just to be sure, set
> priindication=outofband in /etc/asterisk/zapata.conf.  HANGUPCAUSE
> should always be set.
> 

HANGUPCAUSE is indeed always set.  The question is, Set with what data?
The problem is that the telco doesn't consistently and uniformly send
back the Q.931 hangup cause.  Believe me, I've pored over mountains of
Q.931 logs, both with inband and outofband signaling.  The telcos just
plain suck at delivering this information consistently.  They usually
get it right, but when you are making tens of thousands of dial attempts
per day and the telco is giving you accurate info 90% of the time then
you still have 100's of call records with suspect data.  Garbage in,
garbage out.  

My work around is to make multiple attempts on so-called invalid numbers
and to keep track of the results.  If I dial a phone number and get
hangup cause 16 less than two seconds after the dial attempt, and if I
can repeat that result, then I assume it is truly a disconnected or
otherwise invalid number. 

-MC


More information about the asterisk-users mailing list