Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Dec 08, 2016 5:51 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Other files need to edit?
PostPosted: Thu Feb 28, 2008 9:27 am 
Offline

Joined: Wed Feb 27, 2008 8:47 am
Posts: 3
Location: Malaysia
Hi,
Can you gave me some advice which files need to change besides the config that you show earlier. I already do your instructions but still cannot get through a2billing. Please help me. Thanks.


Top
 Profile  
 
 Post subject: Freepbx 2.4
PostPosted: Tue Jun 10, 2008 11:41 pm 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
It is possible to make it work with freepbx 2.4 ?

I'm trying it but with no sucess.


Top
 Profile  
 
 Post subject: Re: Freepbx 2.4
PostPosted: Wed Jun 11, 2008 1:46 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
razametal wrote:
It is possible to make it work with freepbx 2.4 ?
I know now a little more about FreePBX than I did previously, and looking at this I'm sure it's possible without needing to directly modify either FreePBX or A2Billing. As described in an unrelated trixbox thread, you can make use of the [macro-dialout-trunk-predial-hook] to accomplish exactly the same technique as ChrisUK1978 first described, but without needing to re-apply the changes each time FreePBX or A2Billing is upgraded.

It turns out it's very simple:
Create a new custom trunk with 'Custom Dial String' set to 'A2B/1' and add the following to extensions_custom.conf:
Code:
[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit

[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php|${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()
You're done!

If you need to get clever, you can select which of A2B's [agi-confX] sections is used by changing the custom dial string, ie 'A2B/3' would use [agi-conf3].

I've only tested this on FreePBX 2.3.15, so let me know how you get on with other versions.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 3:42 am 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
Quote:
I've only tested this on FreePBX 2.3.15, so let me know how you get on with other versions.


It works for me on 2.4.0 but I need to add every caller Id of every freepbx extension in this way: select CUSTOMERS > List customers > Edit > Add a new CALLERID

To avoid it, I´m using the card number as `account code´ on every freepbx extension, to make it posible you must have to put on the respective [agi-confX] section:

Code:
cid_enable = NO



This is my [agi-conf1] section:
Code:
[agi-conf1]
debug = 1
asterisk_version = 1_4
answer_call = NO
play_audio = YES
say_goodbye = NO
play_menulanguage = NO
force_language =
intro_prompt =
min_credit_2call = 0
min_duration_2bill = 0
notenoughcredit_cardnumber = YES
notenoughcredit_assign_newcardnumber_cid = YES
use_dnid = YES
no_auth_dnid = 2400,2300
number_try = 1
force_callplan_id  =
say_balance_after_auth = NO
say_balance_after_call = NO
say_rateinitial = NO
say_timetocall = NO
auto_setcallerid = YES
force_callerid =
cid_sanitize = NO
cid_enable = NO
cid_askpincode_ifnot_callerid = NO
cid_auto_assign_card_to_cid = YES
cid_auto_create_card = NO
cid_auto_create_card_len = 10
cid_auto_create_card_typepaid = POSTPAY
cid_auto_create_card_credit = 0
cid_auto_create_card_credit_limit = 1000
cid_auto_create_card_tariffgroup = 6
callerid_authentication_over_cardnumber = NO
sip_iax_friends = NO
sip_iax_pstn_direct_call_prefix = 9191
sip_iax_pstn_direct_call = YES
ivr_voucher = NO
ivr_voucher_prefix = 8181
jump_voucher_if_min_credit = NO
extracharge_did =
extracharge_fee =
extracharge_buyfee =
international_prefixes = 011,00,09
dialcommand_param = "|60|iCHgLiwWTt(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend = "|60|HRgirL(3600000:61000:30000)"
switchdialcommand = NO
failover_recursive_limit = 2
maxtime_tocall_negatif_free_route = 5400
send_reminder = NO
record_call = NO
monitor_formatfile = gsm
agi_force_currency =
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit
file_conf_enter_destination = prepaid-enter-dest
file_conf_enter_menulang = prepaid-menulang2
callback_bill_1stleg_ifcall_notconnected = YES


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 3:22 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
razametal wrote:
It works for me on 2.4.0
Thanks for your feedback.
Quote:
I´m using the card number as `account code´ on every freepbx extension
Yes, thanks for pointing that out. I guess I should have mentioned that part.


Top
 Profile  
 
 Post subject: FreePBX Custom Trunk Integration -> A2B/$OUTNUM$?
PostPosted: Fri Jun 13, 2008 3:21 am 
Offline

Joined: Sun May 25, 2008 12:08 am
Posts: 5
I've tried your simplfied way of:
[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit

[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php|${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()

But, I don't have any success. Are there any other details that we need to know? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 13, 2008 3:51 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Only what I said, and what razametal added. Of course you still need to configure FreePBX so your outbound calls actually hit this custom trunk. Once calls are being passed to A2B you'll then have to ensure your call plans, rate cards and trunks are configured correctly to allow correct completion of the call.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 8:26 pm 
Offline

Joined: Fri Apr 11, 2008 5:20 pm
Posts: 22
Hello, I am trying to make a call using a2billing routes with the trixbox extension
I used the configuration that you sugested here but when I make the call it ask for my card number, and I dont want that.

I want that the calls pass directly throught that without asking anything

how can i do that?

tnx

Added after 8 minutes:

Oh never mind!

I simply resolved that by changed the context from the extension to "a2billing" and set the account code like the card number

tnx anyway!


Top
 Profile  
 
 Post subject: Do No forget to use the intra company route in FreePBX
PostPosted: Fri Jan 23, 2009 10:53 am 
Offline

Joined: Mon Jan 29, 2007 1:26 pm
Posts: 12
Important:
be sure to check the Intra Company Route option. This ensures that you preserve the original extension ID when dialing out.

Best regards,

Daniel Friedman
Trixton

Tel: 972.72.2557000
Mobile: 972.50.6655579


Last edited by danifr on Tue Apr 22, 2014 8:23 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: FreePBX Custom Trunk Integration -> A2B/$OUTNUM$?
PostPosted: Tue Jul 13, 2010 9:25 pm 
Offline

Joined: Tue Jul 13, 2010 7:14 pm
Posts: 5
Hi everyone,

I follow the instructions said by stavros, and created the trunk and write the code in extensions_custom.conf. After I modified the a2billing.conf following same as razametal.
In the cli I am having the following error :

-- AGI Script Executing Application: (Dial) Options: (ZAP/g0/36230000|60|iCHgLiwWTt(1497000000:61000:30000))
== Everyone is busy/congested at this time (1:0/0/1)
a2billing.php|1: file:Class.RateEngine.php - line:1095 - [USEDRATECARD - FAIL =0]

My ratecard if configured dnid to all and callerid prefix to all, and the rate associated dial prefix to all.

I used the same elastix trunk's name on a2billing.

Does anyone have a clue about what's happening?

Sorry about my english, and thanks for the attention.


Top
 Profile  
 
 Post subject: Re: FreePBX Custom Trunk Integration -> A2B/$OUTNUM$?
PostPosted: Wed Jul 14, 2010 6:17 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4064
Have you set the A2Billing version correctly in Global settings?

Your trunk should be set in A2Billing as tech type = ZAP assuming you are using ZAP not DAHDI, in which case it will be DAHDI, and the trunk IP field should be set to g0

Joe


Top
 Profile  
 
 Post subject: Re: FreePBX Custom Trunk Integration -> A2B/$OUTNUM$?
PostPosted: Wed Jul 14, 2010 12:57 pm 
Offline

Joined: Tue Jul 13, 2010 7:14 pm
Posts: 5
MAn you solve my problem !! :D
I was using the wrong tech type, I changed to DAHDI and everything works !
Thank you very much! :mrgreen2:


Top
 Profile  
 
 Post subject: Re: FreePBX Custom Trunk Integration -> A2B/$OUTNUM$?
PostPosted: Tue Apr 22, 2014 1:01 am 
Offline

Joined: Tue Apr 22, 2014 12:58 am
Posts: 1
I have the same problem but with A2B/1 register string.

I'm using Ubuntu v12.04 LTS, Asterisk v11.8.1, FreePBX v2.11.0, A2Billing 2.0.8.

Detail of my setting;
my extension is 14020001, tried calling 20639XX502.
the trunk add prefix 1 before sending out to my provider -> 120639XX502

here is the debug;
Executing [[email protected]:1] DeadAGI("SIP/14020001-00000006", "a2billing.php,1") in new stack
...
a2billing.php,1: file:Class.A2Billing.php - line:2044 - uniqueid:1398115702.6 - [BEFORE: 1 SPRINTF : 1.00]
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <sip 14020001-00000006=""> Playing 'digits/1.ulaw' (language 'en')
-- Playing 'dollar' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:a2billing.php - line:181 - uniqueid:1398115702.6 - [TRY : callingcard_ivr_authenticate]
...
a2billing.php,1: file:Class.RateEngine.php - line:1228 - uniqueid:1398115702.6 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse = inuse + 1 WHERE id_trunk = '2']
-- AGI Script Executing Application: (DIAL) Options: (SIP/voip.ms/120639XX502,60,HRrL(60...
> Limit Data for this call:
> timelimit = 6000000 ms (6000.000 s)
> play_warning = 61000 ms (61.000 s)
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000 ms (30.000 s)
> start_sound =
> warning_sound = timeleft
> end_sound =
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
...
Any suggestion?

thank you very much.
sma


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group