[Asterisk-Dev] Asterisk PSTN gateway billing issue

Noel Sharpe noels at radnetwork.co.uk
Tue May 31 06:32:48 MST 2005


Hi

I am having an issue while trying to use asterisk as a PSTN gateway.  
Let me explain my setup:

I have a SER proxy server that routes calls to different destinations to 
various PSTN gateways.  One provider runs asterisk and is connected to a 
bunch of PSTN lines (actually it's a GSM hive).  The problem is that as 
soon as asterisk tries to dial the destination number using it's ZAP 
interface, it reports back to SER that the call has been answered.  The 
problem is that SER then starts billing the customer, as it believes 
that the final leg of the call has been answered.

the offending lines of extensions.conf are similar to:

exten => _0762XXXXXXX,1,Dial(ZAP/g2//${EXTEN},,);

The incoming call is never "answered" in the dialplan, but as soon as 
dial is executed I see:

   -- Executing Dial("SIP/xxx.xxx.xxx.xxx-098226d8", 
"Zap/g1/0762xxxxxx") in new stack
   -- Called g1/0762xxxxxxx
   -- Zap/1-1 answered SIP/xxx.xxx.xxx.xxx-098226d8

It's at this point that the call is reported as being "answered", but in 
reality the destination has not even begun ringing yet.  The CDR files 
of the asterisk server show the correct call duration.  Of course the 
CDR logs from the SER side are not correct, as it reports that the call 
was answered when it was placed on the zap channel.  If the last leg of 
the call does not ever complete, the CDR logs on the SER side still show 
the call as being answered.

Unless I am missing something in the configuration, it looks to me that 
this piece of functionality is missing from *.  If it truly is missing, 
I'd like to have a go at implementing it, and I'd appreciate some 
feedback as to how this should work. BTW, this seems to work correctly 
for another provider who is using a Cisco gateway.


Noel










More information about the asterisk-dev mailing list