asterisk2billing.org
http://forum.asterisk2billing.org/

Taking a2billing.php to a new level - To MASTER GURUS!!!
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=7722
Page 1 of 1

Author:  bruce [ Sun May 30, 2010 1:24 am ]
Post subject:  Taking a2billing.php to a new level - To MASTER GURUS!!!

Hi Guys,

Is there ANY way that I can bypass every authentication and announcement within a2billing.php and do something like this:

exten => s,1,deadAGI(a2billing.php,1234567890,14156667777)

Where 1234567890 is the Account or PIN number and 1-415-666-7777 is the destination number to be dialed?

I have a specific need for this and wondering if a2billing.php can take options like the account number and destination number.

Thanks

Author:  jroper [ Sun May 30, 2010 6:15 am ]
Post subject:  Re: Taking a2billing.php to a new level - To MASTER GURUS!!!

Yes, this is straightforward and easy.

Set the accountcode to the A2Billing account number in the first line of the dial-plan,

Then set the extension number in the line that calls a2billing.php, e.g. don't use the "s" extension.

In the agi-conf use_dnid = yes

Joe

Author:  bruce [ Sun May 30, 2010 5:46 pm ]
Post subject:  Re: Taking a2billing.php to a new level - To MASTER GURUS!!!

Thanks for the input Joe. I did understand the second part but not the first part.

For second part use something like:

exten => _x.,deadAGI(a2billing.php,1)

But line line before that should be like what?:

exten => s,1,Dial(SIP/provider/415-444-5555/1234567890) ???? I checked Dial() and can't see an option for Account Code.

I guess what you mention is the same concept as Account Code set in Extension of FreePBX but I am not familiar with the code how they do it. Can you please help out with that first part.

Thanks

Author:  bruce [ Sun May 30, 2010 6:22 pm ]
Post subject:  Re: Taking a2billing.php to a new level - To MASTER GURUS!!!

Got it working. Thanks for the leads Joe.

For others reference:

[a2billing-advance]
exten => s,1,answer
exten => s,n,playback(enter-prepaid)
exten => s,n,Read(pin_Numb,,10)
exten => s,n,playback(prepaid-enter-dest)
exten => s,n,Read(dest_Numb,,11)
exten => s,n,Set(CDR(accountcode)=${pin_Numb})
exten => s,n,NoOp(CDR(accountcode))
exten => s,n,Goto(${dest_Numb},1)
exten => _X.,1,deadAGI(a2billing.php,2)
exten => _X.,n,Hangup

-Bruce

Author:  bruce [ Sun May 30, 2010 7:39 pm ]
Post subject:  Re: Taking a2billing.php to a new level - To MASTER GURUS!!!

That works just fine but I noticed I am loosing all other capabilities like announcing the balance and that route is not available.

I want to keep this in Asterisk dialplan context because I want to use GROUP and GROUP_COUNT to limit the number of channels of a trunk and to echo Music on Hold while the limit is reached.

I guess I will do some more coding and retrieve balance and use SayDigit....

Any wiser method to this?

-Bruce

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/