Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Apr 24, 2024 3:06 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: DID Forwarding Howto?
PostPosted: Tue Apr 08, 2008 9:09 pm 
After reading the forums today, I'm interested to know if a2billing will help me accomplish my task or make it more difficult.

I'm interested in being able to create customers, who specify a landline (or cell phone number). Then, we sell the customer 2 DIDs, both of which need to forward to the customer's landline. The forwarded call would go out on a trunk and be billed for as a whole call (not by minutes), but only begin billing after a few seconds.

Is this possible to do with a2billing? If so, any suggestions for this implementation would be greatly appreciated. Thanks!


Top
  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 9:15 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Yes this fairly easy.

Bring in the DID into A2Billing, and send it out via a trunk.

You can bill the call via the rate tables which are very flexible.

Have a go at it, and see how you get on. Let us know any specific problems, rather than me writing a complete howto.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 10:24 pm 
Oh, I have been messing with it for a few hours.. I guess my first question is now that I have some DIDs pointed at that box, and I can see them coming in with ngrep, how do I get them to ring to a2billing? I saw something about manually editing extensions.conf but I cannot find anything about this in the wiki.

Another side question: how many DIDs can a2billing handle? I noticed the add destination dialog has a drop down list with all DIDs. What if that list has 1,000 DIDs? 10,000? 100,000? The add destination page wouldn't work very well...?


Top
  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 10:42 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Having got the DID on the Asterisk box, you need to feed it into A2Billing with a context something like : -

[a2billing-did]
exten => _X.,1,deadAGI(a2billing.php|1|did)
exten => _X.,2,Hangup


Which passes the call into A2Billing, telling it that it is a DID.

Then you need a DID to match in A2Billing

Then add a destination.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 9:47 pm 
I'm finally able to get calls to come into the system, at first I was getting the PIN prompt, but I didn't have the |did parameter in the context. Now it's coming in as a DID call but does not complete. I don't yet have a trunk set up, but there is no error message, the call is just disconnected after the script seems to exit at line 358. Will simply adding a trunk fix this?



-- Executing [13216540987@a2billing:1] Answer("SIP/12.34.56.78-b7205db0", "") in new stack
-- Executing [13216540987@a2billing:2] Wait("SIP/12.34.56.78-b7205db0", "2") in new stack
-- Executing [13216540987@a2billing:3] DeadAGI("SIP/12.34.56.78-b7205db0", "a2billing.php|1|did") in new stack
[Apr 23 17:35:22] WARNING[4897]: res_agi.c:2116 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|1|did: A2Billing AGI internal configuration:
a2billing.php|1|did: Array
a2billing.php|1|did: (
a2billing.php|1|did: [debug] => 3
a2billing.php|1|did: [asterisk_version] => 1_4
a2billing.php|1|did: [answer_call] => 1
a2billing.php|1|did: [play_audio] => 1
a2billing.php|1|did: [say_goodbye] =>
a2billing.php|1|did: [play_menulanguage] =>
a2billing.php|1|did: [force_language] =>
a2billing.php|1|did: [intro_prompt] =>
a2billing.php|1|did: [min_credit_2call] => 0
a2billing.php|1|did: [min_duration_2bill] => 0
a2billing.php|1|did: [notenoughcredit_cardnumber] => 1
a2billing.php|1|did: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php|1|did: [use_dnid] =>
a2billing.php|1|did: [no_auth_dnid] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [0] => 2400
a2billing.php|1|did: [1] => 2300
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [number_try] => 3
a2billing.php|1|did: [force_callplan_id] =>
a2billing.php|1|did: [say_balance_after_auth] => 1
a2billing.php|1|did: [say_balance_after_call] =>
a2billing.php|1|did: [say_rateinitial] =>
a2billing.php|1|did: [say_timetocall] => 1
a2billing.php|1|did: [auto_setcallerid] => 1
a2billing.php|1|did: [force_callerid] =>
a2billing.php|1|did: [cid_sanitize] =>
a2billing.php|1|did: [cid_enable] =>
a2billing.php|1|did: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|1|did: [cid_auto_assign_card_to_cid] => 1
a2billing.php|1|did: [cid_auto_create_card] =>
a2billing.php|1|did: [cid_auto_create_card_len] => 10
a2billing.php|1|did: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|1|did: [cid_auto_create_card_credit] => 0
a2billing.php|1|did: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|1|did: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|1|did: [callerid_authentication_over_cardnumber] =>
a2billing.php|1|did: [sip_iax_friends] =>
a2billing.php|1|did: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php|1|did: [sip_iax_pstn_direct_call] =>
a2billing.php|1|did: [ivr_voucher] =>
a2billing.php|1|did: [ivr_voucher_prefix] => 8
a2billing.php|1|did: [jump_voucher_if_min_credit] =>
a2billing.php|1|did: [extracharge_did] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [0] =>
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [extracharge_fee] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [0] =>
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [international_prefixes] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [0] => 011
a2billing.php|1|did: [1] => 00
a2billing.php|1|did: [2] => 09
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [dialcommand_param] => |60|HRgrL(%timeout%:61000:30000)
a2billing.php|1|did: [dialcommand_param_sipiax_friend] => |60|HRgirL(3600000:61000:30000)
a2billing.php|1|did: [switchdialcommand] =>
a2billing.php|1|did: [failover_recursive_limit] => 2
a2billing.php|1|did: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|1|did: [send_reminder] =>
a2billing.php|1|did: [record_call] =>
a2billing.php|1|did: [monitor_formatfile] => gsm
a2billing.php|1|did: [agi_force_currency] =>
a2billing.php|1|did: [currency_association] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [0] => usd:dollars
a2billing.php|1|did: [1] => mxn:pesos
a2billing.php|1|did: [2] => eur:euros
a2billing.php|1|did: [3] => all:credit
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1|did: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1|did: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|1|did: [logger_enable] => 1
a2billing.php|1|did: [log_file] => /tmp/a2billing.log
a2billing.php|1|did: [currency_association_internal] => Array
a2billing.php|1|did: (
a2billing.php|1|did: [usd] => dollars
a2billing.php|1|did: [mxn] => pesos
a2billing.php|1|did: [eur] => euros
a2billing.php|1|did: [all] => credit
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: [ivr_voucher_prefixe] => 8
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: file:a2billing.php - line:76 - IDCONFIG : 1
a2billing.php|1|did: file:a2billing.php - line:77 - MODE : did
a2billing.php|1|did: file:a2billing.php - line:89 - AGI Request:
a2billing.php|1|did: file:a2billing.php - line:90 - Array
a2billing.php|1|did: (
a2billing.php|1|did: [agi_request] => a2billing.php
a2billing.php|1|did: [agi_channel] => SIP/12.34.56.78-b7205db0
a2billing.php|1|did: [agi_language] => en
a2billing.php|1|did: [agi_type] => SIP
a2billing.php|1|did: [agi_uniqueid] => 1208986520.58
a2billing.php|1|did: [agi_callerid] => +11234567890
a2billing.php|1|did: [agi_calleridname] => unknown
a2billing.php|1|did: [agi_callingpres] => 0
a2billing.php|1|did: [agi_callingani2] => 0
a2billing.php|1|did: [agi_callington] => 0
a2billing.php|1|did: [agi_callingtns] => 0
a2billing.php|1|did: [agi_dnid] => 13216540987
a2billing.php|1|did: [agi_rdnis] => unknown
a2billing.php|1|did: [agi_context] => a2billing
a2billing.php|1|did: [agi_extension] => 13216540987
a2billing.php|1|did: [agi_priority] => 3
a2billing.php|1|did: [agi_enhanced] => 0.0
a2billing.php|1|did: [agi_accountcode] =>
a2billing.php|1|did: )
a2billing.php|1|did:
a2billing.php|1|did: file:Class.A2Billing.php - line:616 - get_agi_request_parameter = +11234567890 ; SIP/12.34.56.78-b7205db0 ; 1208986520.58 ; ; 13216540987
a2billing.php|1|did: file:a2billing.php - line:329 - [ANSWER CALL]
a2billing.php|1|did: file:a2billing.php - line:344 - [DID CALL - [CallerID=+11234567890]:[DID=13216540987]
a2billing.php|1|did: file:a2billing.php - line:356 - SELECT cc_did.id, cc_did_destination.id, billingtype, tariff, destination, voip_call, username FROM cc_did, cc_did_destination, cc_card WHERE id_cc_did=cc_did.id and cc_card.id=id_cc_card and cc_did_destination.activated=1 and cc_did.activated=1 and did='13216540987' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00') ORDER BY priority ASC
a2billing.php|1|did: file:a2billing.php - line:358 -
-- AGI Script a2billing.php completed, returning 0


Top
  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 10:23 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It looks like there's a problem when assigning DIDs from the admin UI. Try buying a DID from the customer UI. It seemed to help Da.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 4:47 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
OK, I've checked and the only problem that I can find using DIDs from the Admin UI is that there's no way to initially assign a DID to a card. This must be done whilst logged in as the customer.
Once a DID has been purchased from the Customer UI there's no problem adding/modifying the destinations.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 3:42 pm 
I have one account created in the admin ui, when I try to log in using the card number and password on that account through the customer ui I get a message: BLOCKED ACCOUNT, Please contact your administrator!

Do I need to enable web access for the card? Ideas?


Top
  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:24 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Ensure the card is activated?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 9:30 pm 
activated is set to yes

Added after 9 minutes:

apparently i should have been using the card alias as the username to log in, not the card number itself...

Added after 7 minutes:

I have some DIDs added in the admin ui, but when I try to "buy" one from the customer ui none are listed (I selected country United States and in admin ui they are assigned to United States).

Added after 25 minutes:

Not sure how I did it had to log in and out a few times, but I have the DID forwarding set up. Is a trunk required for the call to go through or should I be able to see in the asterisk CLI that it's about to make a call but can't because there is no trunk?


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 26 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