[Asterisk-Users] How to enter billing codes when dialling

Nick Bachmann asterisk at not-real.org
Fri Nov 19 15:16:38 MST 2004


AHBLWEB wrote:

> Our current ROLM switch uses two-digit Feature Access Codes (FACs) for 
> long-distance calls to force the entering of a set of seven digits 
> representing a client and matter number before giving a real dial 
> tone.  This sequence is passed as part of the CDR record and is used 
> to charge the phone call to the correct matter.
>  
> Looking through the Asterisk documentation I can see how a fixed 
> billing code can be assigned to an extension so that the caller gets 
> charged but how can I set up a dialling plan similar to the above 
> without having to write a script to parse the matter number out of a 
> stanard CDR record?
>  
> For example, a call to New York which should be charged to matter# 
> 1234567 is dialled as;  77-1234567-1-212-555-1212.


http://www.voip-info.org/tiki-index.php?page=Asterisk+config+extensions.conf

exten => _77XXXXXXX1NXXNXXXXXX, 1, SetAccount(${EXTEN:2:7})
exten => _77XXXXXXX1NXXNXXXXXX, 2,Dial(Zap/g1/${EXTEN:9:11})

With this, the account code will at least be a separate field in your 
CDR record... I think that's what you're asking for...

You can add some logic to check for valid account codes and all that.  
Have a look at the AstCC and the Authenticate application for some ideas.

Nick



More information about the asterisk-users mailing list