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

Setup calling card/access number
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=11777
Page 1 of 1

Author:  masterchan [ Fri Aug 07, 2015 11:16 am ]
Post subject:  Setup calling card/access number

Hi,

Apologies if this has been asked before but I am still new to Asterisk and A2billing, I'm struggling to figure out how to setup the calling card/access number.

I have the a2billing contexts in my extensions.conf and am thinking there needs to be an did pointing to this but not really sure?

I'm using Ubuntu 14.04, asterisk 13.3.2 and a2billing 2.1.1, most of the guides I've seen use FreePBX which I don't have installed.

Author:  bucasia [ Sat Aug 08, 2015 8:56 am ]
Post subject:  Re: Setup calling card/access number

Yes, exactly, you need a little dial plan to pass the call to a2billing. There an example here for DID numbers, but an access number would be similar (except you'd be passing the call to a2billing, not a2billing-did)

https://sysadminman.net/blog/2011/a2b10 ... lling-3233

Matt

Author:  masterchan [ Mon Aug 10, 2015 9:23 am ]
Post subject:  Re: Setup calling card/access number

Hi Matt,

I'm taking things a step at time which is why I'm still using internal extensions for testing before moving on and have my dialpan setup as below.

[LocalSets]

exten =>007,1,Goto(a2billing,${EXTEN},1)
exten =>007,n,HangUp()

[a2billing]
include => a2billing_callingcard
include => a2billing_monitoring
include => a2billing_voucher

[a2billing_callingcard]
; CallingCard application
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,DeadAgi(a2billing.php,1)
exten => _X.,n,Hangup

[a2billing_voucher]
exten => _X.,1,Answer(1)
exten => _X.,n,DeadAgi(a2billing.php,1,voucher)
;exten => _X.,n,AGI(a2billing.php,1,voucher44) ; will add 44 in front of the ca$
exten => _X.,n,Hangup

[a2billing_did]
exten => _X.,1,DeadAgi(a2billing.php,1,did)
exten => _X.,2,Hangup

If I dial 007 for what should be my access number I get this:

*CLI> == Using SIP RTP CoS mark 5
-- Executing [007@LocalSets:1] Goto("SIP/004-00000000", "a2billing,007,1") in new stack
-- Goto (a2billing,007,1)
-- Executing [007@a2billing:1] NoOp("SIP/004-00000000", "A2Billing Start") in new stack
-- Executing [007@a2billing:2] DeadAGI("SIP/004-00000000", "a2billing.php,1") in new stack
-- Executing [007@a2billing:3] Hangup("SIP/004-00000000", "") in new stack
== Spawn extension (a2billing, 007, 3) exited non-zero on 'SIP/004-00000000'

and the call shows as failed on my softphone?

Author:  bucasia [ Mon Aug 10, 2015 9:32 am ]
Post subject:  Re: Setup calling card/access number

For a calling card access number I think you need to be answering the call in the dial plan. Can't remember if A2Billing does that or not (there's a setting for it in the agi_conf).

Either way it looks like the call is being passed to a2billing, so I'd switch on the debug and see what a2billing is doing with the call - https://sysadminman.net/blog/2011/a2bil ... gging-2417

Matt

Author:  masterchan [ Wed Aug 12, 2015 1:28 pm ]
Post subject:  Re: Setup calling card/access number

I had a look at the settings for agi-conf1 in the portal and there is a key for answer_call which is set to yes.

I've also turned on debugging but it doesn't produce any output agi_log? permissions appear to be correct as well so don't know why it isn't generating anything.

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