Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 5:50 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Where 2 Start w/ A2billing for Wholesale Terminiation?
PostPosted: Thu Feb 19, 2009 6:55 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
Hi All,

Currently I want to move into the wholesale termination arena, selling minutes etc. to resellers. Right now my setup is that people come to me to be my reseller, I give them a full installation of A2B but they but their terminiation from somewhere else.


What I want to happen is that as each reseller has their own installation, with their own IP address, how would I be able to hook up that IP address to say a card number on my installation, and have them buy credit from my portal using their card number on my machine asthe username etc. and having their customers (cards) use the credit they purchase from me as termination.


In other words, how would I setup my A2B right now so that I can have each of these individual A2B installations use my A2B for their termination? So just like a customer has to signup online to use calling credit, how would another A2B installation buy termination from me?

Any help and advice would be appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2009 10:39 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
You build A2Billing server.

Create account on it for wholesale customer.

Wholesale customer builds A2Billing server (or you build it for him)

Create IAX or SIP trunk to Your A2Billing server.

Pass traffic.


Top
 Profile  
 
 Post subject: and now to steal my own thread...
PostPosted: Mon Feb 23, 2009 2:22 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
I must say, I'm really impressed with your answer. Most of the time, I post a question, then search the forum. I searched "wholesale" like you suggested in many, MANY threads prior to this one, and found a lot of help. I'm thankful I got a happy response from you.

Thanks for the encourgament to keep on using the search tool. It really is helpful!

Added after 2 minutes:

I believe you have some knowledge about using FreePBX and A2B. Right now I have 4 servers running with this install going and hence alot of DIDs. I know that there is a way to create one IVR that will give the customer the options to go to direct agi's with the aid of FreePBX.

Do I search at this forum for help on this, or the FreePBX forum...

Thanks for the input!!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 3:02 pm 
Offline

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

Bring DID into FreePBX.

Create contexts calling different AGI's in extensions-custom.conf, or if you used my install script in PBX in a Flash, extensions-a2billing.conf.

For each context you create, create custom destination. in the form "context name, extension, priority."

Set your DID inbound route in FreePBX to point at your IVR

Set each IVR menu item to point at the custom destination you just created in FreePBX which will now be available as a drop down box.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 12:26 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
thanks for the reply. that did the trick!


Top
 Profile  
 
 Post subject: "The Number your Have Dialed is Not inservice" The
PostPosted: Mon Mar 09, 2009 7:13 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
jroper wrote:
You build A2Billing server.

Create account on it for wholesale customer.

Wholesale customer builds A2Billing server (or you build it for him)

Create IAX or SIP trunk to Your A2Billing server.

Pass traffic.

So far, this is what I have setup for wholesale termination:

extensions.conf
Code:
[a2billing-wholesale]
exten => _X.,1,DeadAGI(a2billing.php|3)
exten => _X.,n,Hangup


sip_custom.conf
Code:
[2001401474]
type=peer
accountcode=2001401474
regexten=2001401474
callerid=2001401474
amaflags=billing
nat=no
dtmfmode=RFC2833
qualify=yes
canreinvite=yes
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g729
host=xxx.xxx.xxx.xxx
fromdomain=xxx.xxx.xxx.xxx
context=a2billing-wholesale
insecure=port, invite
regseconds=0
cancallforward=yes


a2billing.conf
Code:
[agi-conf3]

; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug = 3

; Asterisk Version Information
; 1_1,1_2,1_4 By Default it will take 1_2 or higher
asterisk_version = 1_4

; Manage the answer on the call
answer_call = no

; Play audio - this will disable all stream file but not the Get Data
; for wholesale ensure that the authentication works and than number_try = 1
play_audio = no

; play the goodbye message when the user has finished.
say_goodbye = mo

; enable the menu to choose the language
; press 1 for English, pulsa 2 para el español, Pressez 3 pour Français
play_menulanguage = no


; force the use of a language, if you dont want to use it leave the option empty
; Values : ES, EN, FR, etc... (according to the audio you have installed)
force_language = en

; Introduction prompt : to specify an additional prompt to play at the beginning of the application
intro_prompt =

; Minimum amount of credit to use the application
min_credit_2call = 0

; this is the minimum duration in seconds of a call in order to be billed
; any call with a length less than min_duration_2bill will have a 0 cost
; useful not to charge callers for system errors when a call was answered but it actually didn't connect
min_duration_2bill = 0

; if user doesn't have enough credit to call a destination, prompt him to enter another cardnumber
notenoughcredit_cardnumber = no

; if notenoughcredit_cardnumber = YES  then     assign the CallerID to the new cardnumber
notenoughcredit_assign_newcardnumber_cid = no


; if YES it will use the DNID and try to dial out, without asking for the phonenumber to call
; value : YES, NO
use_dnid = yes

; list the dnid on which you want to avoid the use of the previous option "use_dnid"
no_auth_dnid = 2400,2300

; number of times the user can dial different number
number_try = 3

; this will force to select a specific call plan by the Rate Engine
force_callplan_id  = 9

; Play the balance to the user after the authentication (values : yes - no)
say_balance_after_auth = no

; Play the balance to the user after the call (values : yes - no)
say_balance_after_call = no

; Play the initial cost of the route (values : yes - no)
say_rateinitial = no

; Play the amount of time that the user can call (values : yes - no)
say_timetocall = no


; enable the setup of the callerID number before the outbound is made, by default the user callerID value will be use
auto_setcallerid = no

; If auto_setcallerid is enabled, the value of force_callerid will be set as CallerID
force_callerid =

; If force_callerid is not set, then the following option ensures that CID is set to one of the card's configured caller IDs or blank if none available.
; NO - disable this feature, caller ID can be anything.
; CID - Caller ID must be one of the customers caller IDs
; DID - Caller ID must be one of the customers DID nos.
; BOTH - Caller ID must be one of the above two items.
cid_sanitize = no


; enable the callerid authentication
; if this option is active the CC system will check the CID of caller
cid_enable = no

; if the CID does not exist, then the caller will be prompt to enter his cardnumber
cid_askpincode_ifnot_callerid = no

; if the callerID authentication is enable and the authentication fails then the user will be prompt to enter his cardnumber
; this option will bound the cardnumber entered to the current callerID so that next call will be directly authenticate
cid_auto_assign_card_to_cid = no

; if the callerID is captured on a2billing, this option will create automatically a new card and add the callerID to it
cid_auto_create_card = no

; set the length of the card that will be auto create (ie, 10)
cid_auto_create_card_len = 10

; If cid_auto_create_card has been set to YES, the following options will define with which configuration we will create the card
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid = POSTPAY

; amount of credit of the new card
cid_auto_create_card_credit = 0

; if postpay, define the credit limit for the card
cid_auto_create_card_credit_limit = 1000

; the tariffgroup to use for the new card (this is the ID that you can find on the admin web interface)
cid_auto_create_card_tariffgroup = 6

; to check callerID over the cardnumber authentication (to guard against spoofing)
callerid_authentication_over_cardnumber = NO

; enable the option to call sip/iax friend for free (values : YES - NO)
sip_iax_friends = NO

; if SIP_IAX_FRIENDS is active, you can define a prefix for the dialed digits to call a pstn number
; values : number
sip_iax_pstn_direct_call_prefix = 555

; this will enable a prompt to enter your destination number.
; if number start by sip_iax_pstn_direct_call_prefix we do directly a sip iax call, if not we do a normal call
sip_iax_pstn_direct_call = NO

; enable the option to refill card with voucher in IVR (values : YES - NO)
ivr_voucher = no

; if ivr_voucher is active, you can define a prefix for the voucher number to refill your card
; values : number - don't forget to change prepaid-refill_card_with_voucher audio accordingly
ivr_voucher_prefix =

; When the user credit are below the minimum credit to call min_credit
; jump directly to the voucher IVR menu  (values: YES - NO)
jump_voucher_if_min_credit = NO

; Extracharge DIDs, multiple numbers and fees must be separated by comma
; extracharge_did = 1800XXXXXXX,1888XXXXXXX
extracharge_did =
;extracharge_fee = 0.02,0.03
extracharge_fee =
;extracharge_buyfee = 0.015,0.025
extracharge_buyfee =

; List the prefixes that will be stripped off if the call plan requires it
international_prefixes = 011,00,09

; More information about the Dial : http://voip-info.org/wiki-Asterisk+cmd+dial
;       30 :  The timeout parameter is optional. If not specifed, the Dial command will wait indefinitely, exiting only when the originating channel hangs up, or all the dialed channels return a busy or error condition. Otherwise it specifies a maximum time, in seconds, that the Dial command is to wait for a channel to answer.
;       H: Allow the caller to hang up by dialing *
;       r: Generate a ringing tone for the calling party
;       g: When the called party hangs up, exit to execute more commands in the current context. (new in 1.4)
;       i: Asterisk will ignore any forwarding (302 Redirect) requests received. Essential for DID usage to prevent fraud. (new in 1.4) Useful if you are ringing a group of people and one person has set their phone to forwarded direct to voicemail on their cell or something which normally prevents any of the other phones from ringing.
;       R: Indicate ringing to the calling party when the called party indicates ringing, pass no audio until answered.
;       m: Provide Music on Hold to the calling party until the called channel answers.
;       L(x[:y][:z]): Limit the call to 'x' ms, warning when 'y' ms are left, repeated every 'z' ms)
;                                 %timeout% tag is replaced by the calculated timeout according the credit & destination rate!

dialcommand_param = "|60|HRgrL(%timeout%:61000:30000)"

; by default (3600000  =  1HOUR MAX CALL)
dialcommand_param_sipiax_friend = "|60|HRgirL(3600000:61000:30000)"

; Define the order to make the outbound call
; YES -> SIP/dialedphonenumber@gateway_ip - NO  SIP/gateway_ip/dialedphonenumber
; Both should work exactly the same but i experimented one case when gateway was supporting dialedphonenumber@gateway_ip
; So in case of trouble, try it out
switchdialcommand = NO

; failover recursive search - define how many time we want to authorize the research of the failover trunk when a call fails (value : 0 - 20)
failover_recursive_limit = 2

; For free calls, limit the duration: amount in seconds
maxtime_tocall_negatif_free_route = 5400

; Send a reminder email to the user when they are under min_credit_2call
send_reminder = no

; enable to monitor the call (to record all the conversations)
; value : YES - NO
record_call = no

; format of the recorded monitor file
monitor_formatfile = gsm

; Force to play the balance to the caller in a predefined currency, to use the currency set for by the customer leave this field empty
agi_force_currency =

; CURRENCY SECTION
; Define all the audio (without file extensions) that you want to play according to currency (use , to separate, ie "usd:prepaid-dollar,mxn:pesos,eur:Euro,all:credit")
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit,cad:dollars

; Please enter the file name you want to play when we prompt the calling party to enter the destination number
; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011
file_conf_enter_destination =

; Please enter the file name you want to play when we prompt the calling party to choose the prefered language
; file_conf_enter_menulang = prepaid-menulang
file_conf_enter_menulang =

; Define if you want to bill the 1st leg on callback even if the call is not connected to the destination
callback_bill_1stleg_ifcall_notconnected = no


and yet i recieve this response the "The number you have dialed is not in service. Please check the number and try again." Then the systems says goodbye and hangs up. Also, the second A2B server (the termination customer making the calls) is billing the calls, but the server that is providing the termination is not billing the calls at all.

I am doing something wrong here? If so what exactly should I be doing to resolve this?

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 8:17 pm 
Offline

Joined: Sun Feb 01, 2009 12:52 pm
Posts: 47
Location: Netherlands
two things..

1. check if u can receive calls via the PBX outside of A2billing first.
2. Posting the error messages from your /var/log/asterisk/full will also shed some light as to where the problem lies..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 8:34 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
yes i can make calls through the PBX perfectly :) but i still can't get the main server to bill the customers server... but i'll check the place you were talking about...


Top
 Profile  
 
 Post subject: Something from the logs on Server B
PostPosted: Tue Mar 10, 2009 2:08 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
ok so here's what i'm getting so far from the log output

Code:


Nothing. The server that is buying termination is the only server that is receiving the calls (Server B). The server that is providing the wholesale termination (Server A) is not receiving ANY calls from Server B. Server A is working fine recieving calls and so is Server B.

Server B is an A2B installation with customers and calling cards
Server A is also an A2B installation with customers and calling cards, but is now being changed to be able to handle wholesale termination with A2B

Does anyone has any input as to where I'm going wrong in the above post?

Thanks!

Added after 2 hours 26 minutes:

When I try to make an outgoing call from Server B, this is what seems to pop out at me:

Code:
-- Called wholesale/14167314166
-- SIP/wholesale-0901af20 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)


What does this mean? I know It says that this line is busy, but Server A is up and running, and acceptings calls through...

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 7:17 pm 
Offline

Joined: Sat May 10, 2008 4:19 pm
Posts: 132
Location: Wilmington, DE
Hi;

It sounds like the called server does not have the authentication information of the calling server. At least that's what I found when I was having a similar problem. Check the called server log to see if the authentication was refused.

The problem with the incoming calls could be that you do not have the trunk setup with the IP address(es) of your DID provider. Then again it could be something totally different. But check those areas.

Robin.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 11, 2009 3:20 am 
Offline
User avatar

Joined: Wed Aug 20, 2008 9:37 am
Posts: 51
Location: India
In asterisk based pbx like trixbox, by default all the inbound calls are barred with the announcement "The number you have dialed is not in service. Please check the number and try again.", which is more similar to yours

Quote:
i recieve this response the "The number you have dialed is not in service. Please check the number and try again."


You can allow incoming calls by adding trusted ip addresses in your sip.conf or making your incoming context as context=from-trunk rather than from-sip-external. In freepbx you can find the option "Allow Anonymous Inbound SIP Calls?". But be aware of the warning below.

** WARNING **

Setting "Allow Anonymous Inbound SIP Calls to 'yes' will potentially allow ANYBODY to call into your Asterisk server using the SIP protocol

It should only be used if you fully understand the impact of allowing anonymous calls into your server


Vino


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 2:21 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
hi all,

so vinodestiny if i gave this to my wholesale customers to put into there end, would this work:

Code:
host=xxx.xxx.xxx.xxx
context=from-trunk
type=friend
insecure=very
nat=no
canreinvite=no
fromuser=710371145760
username=71031145760
secret=110110110


thanks for all the help given so far!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 22, 2009 4:58 pm 
Offline

Joined: Mon Nov 12, 2007 6:25 am
Posts: 25
I think you will also need to ensure that the sip user (or IAX) is created with that card number.

I have the similar setup where I have SIP users created with each card and I can have a client login using XLite remotely.

Only problem I am having is if the client dials a number it asks to enter the phone number again. It does not perform the direct dialing even when the client is set to post-paid and callerid authentication is set to his SIP Account username and callerID are same.

I am guessing I would not be able to do both post paid and prepaid in the same server. If I disable the Balance and Minute announcement in the A2billing.conf then I loose that for pre-paid customers unless there is some other way of achieving the direct dialing for sip post paid clients.

Any help is appreciated.

Thanks

Kim

-------------

I have achieved what I want, which can also be used for wholesale termination:

In a2billing.conf
Dnid = YES
play_audio=no

But now my prepaid callers who access the system using an access number cannot make calls.


Any help?

Thanks,

Kim


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 22, 2009 5:41 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
you should be able to use both prepaid and postpaid customers on the same server... and yes what i was missing from my whole setup was that the sip users were being created separate from the account :x


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 29, 2009 5:49 am 
Offline

Joined: Mon May 14, 2007 5:41 am
Posts: 12
you can use diff agi-conf

http://forum.asterisk2billing.org/viewt ... highlight=

kimnkhan wrote:
But now my prepaid callers who access the system using an access number cannot make calls.


Any help?

Thanks,

Kim


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group