Account code questions

Hello all,

Here’s what I want to do - when someone place a call that goes out certian trunks they need to enter a password. I’ve figured that out (I used the path to a pw file method) but how do you get that password to show up in the CDR as an account code? We currently track long distance calls by account code on our mitel and want to be able to do it with the asterisk box.

I’m using AAH 2.8b1. Any ideas would be very helpful!!!

Thanks,

Tom

Hi

This bit does similar to what you want (except it uses a account number and password) but you should be able to amend it. It also uses the internal database so account codes canbe ammended as and when using a web interface.

exten => 514,1,Answer ; Answer the line exten => 514,n,Read(acc_code,access-code,4) exten => 514,n,set(passkey=${DB(auth_user/${acc_code})}) exten => 514,n,Authenticate(${passkey}) exten => 514,n,set(db_context=${DB(acc_cont/${acc_code})}) exten => 514,n,SetAccount(${acc_code}) exten => 514,n,DISA(no-password|${db_context})

the calls will now be flagged with the account code