Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 4:34 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Please check my settings for incoming did billing
PostPosted: Tue Dec 05, 2006 2:07 pm 
Offline

Joined: Mon Dec 04, 2006 1:40 am
Posts: 14
Customer
type=friend, username=9250, type=friend, username=9250, accountcode=9250, regexten=9250, callerid=4332,

amaflags=billing, secret=6628619979, NAT=yes, tdmfmode=rfc2833, qualify=yes, canreinvite=yes,disallow=all,

allo=g729,ulaw,alaw,gsm, host=dynamic, callgroup=<blank>, context=a2billing, (the rest blank except)

RegSeconds=0, cancallforward=yes

List sip-friends shows the above

DID
DID=6144481900, billing=Fix per month, startdate=2006-12-04 13:43:36, endate=2031-12-04 13:43:36,

DIDGroup=ldl, country=US,activated=yes, fixrate 0.02

DESTINATION
Destination SIP/9250 (have tried just 9250, [email protected], SIP/[email protected])
ID Card 4
DID 6144481900
activated Yes
priority 1
VOIP_Call Yes (have tried no)

my trixbox inbound route for this did is set to:
<x> Set Destination Custom App: custom-ext-did-a2b,s,1

[custom-ext-did-a2b]
exten => s,1,DeadAGI(a2billing.php|2|did)
exten => s,2,Wait,2
exten => s,3,Hangup

Below is my agi-conf2

When I dial in on the 6144481900 the little lady says, Person at extension 6144481900 is unavialbe please leave your

message after the tone when done hang up or press the # key.

WHY is the extension not ringing?

Asterick CLI shows:

- Executing NoOp("SIP/kbrown-09177128", "Received incoming SIP connection from unknown peer to

6144481900") in new stack
- Executing Goto("SIP/kbrown-09177128", "custom-ext-did-a2b|s|1") in new stack
-- Goto (custom-ext-did-a2b,s,1)
-- Executing DeadAGI("SIP/kbrown-09177128", "a2billing.php|2|did") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|2|did: line:58 - IDCONFIG : 2
a2billing.php|2|did:
a2billing.php|2|did: line:67 - MODE : did
a2billing.php|2|did:
a2billing.php|2|did: A2Billing AGI internal configuration:
.....
......
and the the end of the info shows

a2billing.php|2|did: line:490 get_agi_request_parameter = 2816574545 ; SIP/kbrown-09177128 ; 1165327173.251

; ; s
a2billing.php|2|did: line:314 - [NO ANSWER CALL]
a2billing.php|2|did: line:330 - [DID CALL - [CallerID=2816574545]:[DID=s]
a2billing.php|2|did: line:340 - 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='s' AND cc_did.startingdate<=

CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS

NULL OR LENGTH(cc_did.expirationdate)<5) ORDER BY priority ASC
a2billing.php|2|did: line:343 - 0
-- AGI Script a2billing.php completed, returning 0






[agi-conf2]

debug=1

answer_call=NO

logger_enable=YES
log_file=/tmp/a2billing.log

setlanguage_deprecate=YES

say_goodbye=NO
play_menulanguage=NO
force_language=
intro_prompt=

len_cardnumber=4
len_aliasnumber = 3
len_voucher = 3

min_credit_2call=0
min_duration_2bill=0

notenoughcredit_cardnumber=NO
notenoughcredit_assign_newcardnumber_cid=NO

use_dnid=YES

number_try=1

say_balance_after_auth=NO
say_balance_after_call=NO
say_rateinitial=NO
say_timetocall=NO

auto_setcallerid=YES
force_callerid=

cid_sanitize=CID
cid_enable=YES
cid_askpincode_ifnot_callerid=NO
cid_auto_create_card=NO
cid_auto_assign_card_to_cid=NO
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

sip_iax_friends=NO
sip_iax_pstn_direct_call_prefix=9
sip_iax_pstn_direct_call=NO

extracharge_did=
extracharge_fee=

dialcommand_param="|90|HL(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend="|90|HL(3600000:61000:30000)"

switchdialcommand=NO

maxtime_tocall_negatif_free_route = 5400

send_reminder=NO

record_call=NO

monitor_formatfile=gsm

base_currency = usd

agi_force_currency =

currency_association = usd:prepaid-dollar,mxn:pesos,eur:euro,all:credit

file_conf_enter_destination = prepaid-enter-dest
file_conf_enter_menulang = prepaid-menulang2

debugshell=0


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 3:42 pm 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
Quote:
my trixbox inbound route for this did is set to:
<x> Set Destination Custom App: custom-ext-did-a2b,s,1

[custom-ext-did-a2b]
exten => s,1,DeadAGI(a2billing.php|2|did)
exten => s,2,Wait,2
exten => s,3,Hangup

in the log file the following is there
a2billing.php|2|did: line:330 - [DID CALL - [CallerID=2816574545]:[DID=s]





Do this to insure that that the proper DID parameter is passed to a2b


my trixbox inbound route for this did is set to:
<x> Set Destination Custom App: custom-ext-did-a2b,${EXTEN},1

You are trying to pass the DID that is the current extension.

[custom-ext-did-a2b]
exten => _X.,1,DeadAGI(a2billing.php|2|did)
exten => _X.,2,Wait,2
exten => _X.,3,Hangup

Check the log file to insure that the DNID is the DID you are calling and that the DID is set to the one you are calling.

[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 7:57 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Hi, i agree with the post above, you should be seing something like this

a2billing.php|2|did: line:330 - [DID CALL - [CallerID=2816574545]:[DID=16144481900]

Your system should recognize this DID and call your sip friend.

By the way i don't think - monthly DID charge or charge for incomming DID's working. I couldn't make it work atleast, but everything else is ok.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 9:54 pm 
Offline

Joined: Mon Dec 04, 2006 1:40 am
Posts: 14
:D
Thank you very much for the correction.
My code had this:

[custom-ext-did-a2b]
exten => s,1,DeadAGI(a2billing.php|2|did)
exten => s,2,Wait,2
exten => s,3,Hangup

You told me to change it to:
[custom-ext-did-a2b]
exten => _X.,1,DeadAGI(a2billing.php|2|did)
exten => _X.,2,Wait,2
exten => _X.,3,Hangup

Now my inbound did is passed to the DID destination configured in a2b.

The goal is to bill a card for the DID inbound call. In the DID/destination I have a card number entered. At first I thought I would just enter the card number. I have 4 digits as it is being used for a small local mission group. I put in 9250 but actually it wants the ID which is 4. After saving the changes the DID list shows the actually card number of 9250.

After sending the DID to to SIP/504 which is configured in FreePBX I would expect that the card 9250 would be billed for the call. The problem is that the card is not being billed.

Somewhere I read that you click VOIP = yes to get the billing to work for a DID. I checked and mine is set to yes. If I set it to no then the DID no longer forwards to my SIP/504 phone.

How do I realize a deduction of the balance of the card 9250? Must I send it to a a2b SIP friend in order for the billing to work? My system is not configured to do so right now. It makes no sense that would be required otherwise there would be no reason to ask for the card number in the DID/Destination.

Please analyze my setup once again and let me know why my customer card is not being billed.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 9:55 pm 
Offline

Joined: Mon Dec 04, 2006 1:40 am
Posts: 14
:D
Thank you very much for the correction.
My code had this:

[custom-ext-did-a2b]
exten => s,1,DeadAGI(a2billing.php|2|did)
exten => s,2,Wait,2
exten => s,3,Hangup

You told me to change it to:
[custom-ext-did-a2b]
exten => _X.,1,DeadAGI(a2billing.php|2|did)
exten => _X.,2,Wait,2
exten => _X.,3,Hangup

Now my inbound did is passed to the DID destination configured in a2b.

The goal is to bill a card for the DID inbound call. In the DID/destination I have a card number entered. At first I thought I would just enter the card number. I have 4 digits as it is being used for a small local mission group. I put in 9250 but actually it wants the ID which is 4. After saving the changes the DID list shows the actually card number of 9250.

After sending the DID to to SIP/504 which is configured in FreePBX I would expect that the card 9250 would be billed for the call. The problem is that the card is not being billed.

Somewhere I read that you click VOIP = yes to get the billing to work for a DID. I checked and mine is set to yes. If I set it to no then the DID no longer forwards to my SIP/504 phone.

How do I realize a deduction of the balance of the card 9250? Must I send it to a a2b SIP friend in order for the billing to work? My system is not configured to do so right now. It makes no sense that would be required otherwise there would be no reason to ask for the card number in the DID/Destination.

Please analyze my setup once again and let me know why my customer card is not being billed.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 1:23 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
Voip calls are not rated!! they don't pass thru the rate-engine.


If you look in your log file assuming you have debugging turned on you should see the following entry with:
- answeredtime=, dialstatus=, cost=

What does the cost say?? chances are it says 0.0

So if it does say 0.0 it means that you cannot use VOIP type DID in order to get the call rated.

you have to make it "non voip" VOIP=no inorder to get the call rated ...

test it to prove my point: set the DID to a regular destination that is reachable thru one of your rate cards set voip=no call the DID and it should call the number and bill based on the rate you have defined and called thru the trunk you defined for that number ...

here is what I woukd do to get the call to your SIP friend to be rated:

in a2b
1. create a trunk to handle looback calls
2. create a rate card for SIP numbers with loopback trunk
3. add rates for SIP numbers to the rate card
4. add rate card to your tariff group
5. set the destination in the DiD to your SIp number
6. Set voip=no

in your asterisk sip configuration
1. define trunk to handle loopack with context to handle loopback calls

in your asterisk extensions configuration
1. create context that dials the sip number it was passed

Are you using freepbx (trixbox)? [if so most of it can be done via gui]
how many DIDs do you have to setup? [if you have lots of DIDs you might not want to use gui method to set up extensions context]

if most of this makes little sense to you or you have limited asterisk knowledge PM me and I will try and find sometime to do it for you or walk you through the process


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 1:34 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
Voip calls are not rated!! they don't pass thru the rate-engine.


If you look in your log file assuming you have debugging turned on you should see the following entry with:
- answeredtime=, dialstatus=, cost=

What does the cost say?? chances are it says 0.0

So if it does say 0.0 it means that you cannot use VOIP type DID in order to get the call rated.

you have to make it "non voip" VOIP=no inorder to get the call rated ...

test it to prove my point: set the DID to a regular destination that is reachable thru one of your rate cards set voip=no call the DID and it should call the number and bill based on the rate you have defined and called thru the trunk you defined for that number ...

here is what I woukd do to get the call to your SIP friend to be rated:

in a2b
1. create a trunk to handle looback calls
2. create a rate card for SIP numbers with loopback trunk
3. add rates for SIP numbers to the rate card
4. add rate card to your tariff group
5. set the destination in the DiD to your SIp number
6. Set voip=no

in your asterisk sip configuration
1. define trunk to handle loopack with context to handle loopback calls

in your asterisk extensions configuration
1. create context that dials the sip number it was passed

Are you using freepbx (trixbox)? [if so most of it can be done via gui]
how many DIDs do you have to setup? [if you have lots of DIDs you might not want to use gui method to set up extensions context]

if most of this makes little sense to you or you have limited asterisk knowledge PM me and I will try and find sometime to do it for you or walk you through the process


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 
Auto Dialer Software


All times are UTC


Who is online

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