Free Billing, Routing and Management software for Asterisk and VOIP
Home | Forums | Wiki | Manual | Open Source | Billing and BSS | Demo | Contact Us
DownLoad | Bugs | Help Wanted | Numbering Plan
  
 

How AstBill Handle extensions.conf

 
By london3 at Tue, 2005-10-11 08:25

AstBill is not using the Asterisk REALTIME engine for extensions.

We think we have found an excellent solution that is compatible with earlier versions of asterisk. All call processing is done in agi using the Perl script agiastar.agi

If you study agiastar.agi you will see that must of the processing is done by MySQL Stored Procedures. The Perl scrip is basically only a wrapper.

Our use of extensions.conf is simple:
[astartelecom-iax]
exten => _0[0-9].,1,AGI(agiastar.agi,${EXTEN})
exten => _0[0-9].,2,GotoIf($["${BILLSTATUS}" = "NOCREDIT"]?20)
exten => _0[0-9].,3,GotoIf($["${BILLSTATUS}" = "INVALID"]?30)
exten => _0[0-9].,4,Dial(${DIALSTRING})

exten => _0[0-9].,20,Playback(beep)
exten => _0[0-9].,21,Playback(not-enough-credit) ; Tells them they do not have enough money
exten => _0[0-9].,22,Hangup

exten => _0[0-9].,30,Playback(beep)
exten => _0[0-9].,31,Playback(that-is-not-rec-phn-num) ; "That is not a recognized phone number."
exten => _0[0-9].,32,Hangup

MySQL will return the variable ${DIALSTRING} to Asterisk. It will also return ${BILLSTATUS} for credit control. All processing in agiastar.agi is done from the MySQL database In real-time. But we are not using the Asterisk Real-time engine.

With the AstBill solution call handling is completely dynamic. New accounts, change between SIP or IAX, Virtual Accounts and forwarding of calls are all happening in real time as the users are changing the configuration.

  
BerliOS Developer LogoSourceForge.net Logo Drupal.org Logo