Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat Apr 27, 2024 4:10 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Internal calls not working
PostPosted: Wed Aug 22, 2007 4:45 am 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
Hi everybody, and thanks Areski for A2Billing.
I recently install trixbox 2.0 with A2Billing V1.3.
Everything is working fine but I can not make calls between two customers or card numbers. I dont know what number I have to dial, crad number or card alias. In my case, I changed username and password to match with existents customer`s accounts, but I tried with two new cards customers and one card can not make the calls to the other one.
I tested on Sipura, Lynjksis, Xlite, etc and no change, also I can see in Asterisk log calls are maded but are passing through my previously default trunk and provider dont handle call because number doesnt exist.
Any clue what changes should I try ?
Thanks in advanced.

Regards, :roll:

Aldo


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 22, 2007 6:27 am 
Offline

Joined: Wed Jul 25, 2007 4:42 am
Posts: 21
I think it may be related to the context

if you are using trixbox, all the extension (your customer's account) should be using context = from-internal

when you create sip friend using a2billing, then the context by default is a2billing.

I suggest to double check the context settings.

in order to have the internal calling work properly, you should use context=from-internal


Top
 Profile  
 
 Post subject: Here is my Asterisk CLI
PostPosted: Wed Aug 22, 2007 8:47 pm 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
Hi Howard,
Thanks for your help.
I modified context aditional_a2billing_sip.conf. I changed context from a2billing to from-internal and worst, I couldnt make any type of calls. So I return to a2billing context and I can make regular calls again but internals still not works. Come back to zero point.
There is any other file to set up context?
How is the right way to modify context ?
Thanks in advanced.
Regards,

Aldo

Added after 2 hours 25 minutes:

-- Executing Answer("SIP/71467-0843dbe8", "") in new stack
-- Executing Wait("SIP/71467-0843dbe8", "1") in new stack
-- Executing DeadAGI("SIP/71467-0843dbe8", "a2billing.php|1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|1: A2Billing AGI internal configuration:
a2billing.php|1: Array
a2billing.php|1: (
a2billing.php|1: [debug] => 1
a2billing.php|1: [asterisk_version] => 1_2
a2billing.php|1: [answer_call] => 1
a2billing.php|1: [play_audio] => 1
a2billing.php|1: [say_goodbye] =>
a2billing.php|1: [play_menulanguage] =>
a2billing.php|1: [force_language] =>
a2billing.php|1: [intro_prompt] =>
a2billing.php|1: [min_credit_2call] => 0
a2billing.php|1: [min_duration_2bill] => 0
a2billing.php|1: [notenoughcredit_cardnumber] => 1
a2billing.php|1: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php|1: [use_dnid] => 1
a2billing.php|1: [no_auth_dnid] => Array
a2billing.php|1: (
a2billing.php|1: [0] => 2400
a2billing.php|1: [1] => 2300
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [number_try] => 3
a2billing.php|1: [force_callplan_id] =>
a2billing.php|1: [say_balance_after_auth] =>
a2billing.php|1: [say_balance_after_call] =>
a2billing.php|1: [say_rateinitial] =>
a2billing.php|1: [say_timetocall] =>
a2billing.php|1: [auto_setcallerid] => 1
a2billing.php|1: [force_callerid] =>
a2billing.php|1: [cid_sanitize] =>
a2billing.php|1: [cid_enable] =>
a2billing.php|1: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|1: [cid_auto_assign_card_to_cid] => 1
a2billing.php|1: [cid_auto_create_card] =>
a2billing.php|1: [cid_auto_create_card_len] => 10
a2billing.php|1: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|1: [cid_auto_create_card_credit] => 0
a2billing.php|1: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|1: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|1: [callerid_authentication_over_cardnumber] =>
a2billing.php|1: [sip_iax_friends] =>
a2billing.php|1: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php|1: [sip_iax_pstn_direct_call] =>
a2billing.php|1: [ivr_voucher] =>
a2billing.php|1: [ivr_voucher_prefix] => 8
a2billing.php|1: [jump_voucher_if_min_credit] =>
a2billing.php|1: [extracharge_did] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [extracharge_fee] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php|1: [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000)
a2billing.php|1: [switchdialcommand] =>
a2billing.php|1: [failover_recursive_limit] => 2
a2billing.php|1: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|1: [send_reminder] =>
a2billing.php|1: [record_call] =>
a2billing.php|1: [monitor_formatfile] => gsm
a2billing.php|1: [agi_force_currency] =>
a2billing.php|1: [currency_association] => Array
a2billing.php|1: (
a2billing.php|1: [0] => usd:dollars
a2billing.php|1: [1] => mxn:pesos
a2billing.php|1: [2] => eur:euros
a2billing.php|1: [3] => all:credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|1: [logger_enable] => 1
a2billing.php|1: [log_file] => /tmp/a2billing.log
a2billing.php|1: [currency_association_internal] => Array
a2billing.php|1: (
a2billing.php|1: [usd] => dollars
a2billing.php|1: [mxn] => pesos
a2billing.php|1: [eur] => euros
a2billing.php|1: [all] => credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [ivr_voucher_prefixe] => 8
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: file:a2billing.php - line:75 - IDCONFIG : 1
a2billing.php|1: file:a2billing.php - line:76 - MODE : standard
a2billing.php|1: file:a2billing.php - line:88 - AGI Request:
a2billing.php|1: file:a2billing.php - line:89 - Array
a2billing.php|1: (
a2billing.php|1: [agi_request] => a2billing.php
a2billing.php|1: [agi_channel] => SIP/71467-0843dbe8
a2billing.php|1: [agi_language] => en
a2billing.php|1: [agi_type] => SIP
a2billing.php|1: [agi_uniqueid] => 1187815523.2
a2billing.php|1: [agi_callerid] => 71467
a2billing.php|1: [agi_calleridname] => xlite
a2billing.php|1: [agi_callingpres] => 0
a2billing.php|1: [agi_callingani2] => 0
a2billing.php|1: [agi_callington] => 0
a2billing.php|1: [agi_callingtns] => 0
a2billing.php|1: [agi_dnid] => 71468
a2billing.php|1: [agi_rdnis] => unknown
a2billing.php|1: [agi_context] => a2billing
a2billing.php|1: [agi_extension] => 71468
a2billing.php|1: [agi_priority] => 3
a2billing.php|1: [agi_enhanced] => 0.0
a2billing.php|1: [agi_accountcode] => 9162875993
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: file:Class.A2Billing.php - line:602 - get_agi_request_parameter = 71467 ; SIP/71467-0843dbe8 ; 1187815523.2 ; 9162875993 ; 71468
a2billing.php|1: file:a2billing.php - line:138 - [ANSWER CALL]
a2billing.php|1: file:Class.A2Billing.php - line:1669 - SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate), UNIX_TIMESTAMP(cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='9162875993'
a2billing.php|1: file:Class.A2Billing.php - line:1743 - [SET LANGUAGE() es]
a2billing.php|1: file:Class.A2Billing.php - line:635 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='9162875993']
a2billing.php|1: file:Class.A2Billing.php - line:1428 - [AUTO SetCallerID]
a2billing.php|1: file:Class.A2Billing.php - line:1434 - [REQUESTED SetCallerID : 71467]
a2billing.php|1: file:Class.A2Billing.php - line:1445 - [EXEC SetCallerID : 71467]
a2billing.php|1: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php|1: file:a2billing.php - line:170 - [CREDIT : 10.23660][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php|1: file:Class.A2Billing.php - line:657 - 1 && && 5&& 0
a2billing.php|1: file:Class.A2Billing.php - line:682 - DESTINATION ::> 71468
a2billing.php|1: file:Class.A2Billing.php - line:684 - RULES APPLY ON DESTINATION ::> 71468
a2billing.php|1: file:Class.A2Billing.php - line:722 - OK - RESFINDRATE::> 1
a2billing.php|1: file:Class.A2Billing.php - line:744 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php|1: file:Class.A2Billing.php - line:761 - TIMEOUT::> 6900 : minutes=115 - seconds=0
a2billing.php|1: file:Class.RateEngine.php - line:961 - app_callingcard: Dialing 'SIP/sipdiscount/71468|60|HRrL(6900000:61000:30000)' with timeout of '6900'.
a2billing.php|1:
a2billing.php|1: file:Class.RateEngine.php - line:986 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (SIP/sipdiscount/71468|60|HRrL(6900000:61000:30000))
-- Limit Data for this call:
-- - timelimit = 6900000
-- - play_warning = 61000
-- - play_to_caller= yes
-- - play_to_callee= no
-- - warning_freq = 30000
-- - start_sound = UNDEF
-- - warning_sound = timeleft
-- - end_sound = UNDEF
-- Called sipdiscount/71468
-- SIP/sipdiscount-084556a0 is making progress passing it to SIP/71467-0843dbe8
-- Got SIP response 480 "Temporarily not available" back from 194.120.0.198
-- SIP/sipdiscount-084556a0 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
a2billing.php|1: file:Class.RateEngine.php - line:1096 - [USEDRATECARD - FAIL =0]
a2billing.php|1: file:Class.RateEngine.php - line:849 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1187815523.2', 'SIP/71467-0843dbe8', '9162875993', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '71468', 'CONGESTION', now(), '0.0889', '-0', '', '', 'Russian Federation', '1', '1', '1120', '2', '71467', '0', '0.01', '0', '0')]
a2billing.php|1: file:Class.RateEngine.php - line:852 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php|1: file:a2billing.php - line:309 - [a2billing account stop]
a2billing.php|1: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php|1: file:a2billing.php - line:170 - [CREDIT : 10.23660][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php|1: file:Class.A2Billing.php - line:657 - 0 && && 5&& 1
-- Playing 'prepaid-enter-dest' (language 'es')
a2billing.php|1: file:Class.A2Billing.php - line:664 - RES DTMF : -1
a2billing.php|1: file:Class.A2Billing.php - line:682 - DESTINATION ::> -1
a2billing.php|1: file:Class.A2Billing.php - line:684 - RULES APPLY ON DESTINATION ::> -1
== Spawn extension (a2billing, 71468, 3) exited non-zero on 'SIP/71467-0843dbe8'
asterisk1*CLI>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 8:59 am 
Offline

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

There is an option to call SIP and IAX friends for free in the agi-conf section.

By default it looks like this: -
; 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


The number you dial is the cardalias - so as to protect the customer account number, which of course is used for authentication.

Joe


Top
 Profile  
 
 Post subject: Still not works
PostPosted: Thu Aug 23, 2007 10:27 pm 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
I set up values in agi conf in yes and I set up a prefix 999 to dont match any country code and the result is extension unavailable. Asterisk cli says rateengine.php could not find any match for the code, and of ocurse if I set up for example 1, that would be a call to USA.
I dont want the IVR either, I just want to dial another card alias and make a free internal user call.
How can I do that ?
I realize, if I change context and create both accounts as extensions in free pbx, both can call between each other, but that call is out of a2billing and all cals maded to pstn will not being charged. So I change context to a2billing again, but can not make internal calls.
Also I tried to set up a diferent string in a2billing context where all my card alias (_7XXXX) supose to call or answer the call as a reguilar extension and not to pass through a2billing.php, but doesnt work either.
the call still is handled by php script, which goes to rateengine.php after validation.
I know this solution might be very simple, but I can not figure out how to handle internal calls in a2billing yet.
Please Areski or anybody ¡¡¡ help ¡¡¡
rgds


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 12:18 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
follow the insructions jroper gave you in previous posting


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

; 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


set those parameter in the a2billing.conf agi-conf section

then dial 555+cardalias


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 2:32 am 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
Hi Gue
Sorry, but as I said before, it is not work¡¡¡
I have two extension 71467 and 71468
I set up sip_iax_friends=yes and then I try to dial an extension, 71468
An IVR said "if you want to call to a sip or iax friend, press 9. So I dial 71468 again. Rate engine handle call to Russia¡¡¡
Then I dial 55571468, IVR again, so I press 9 and I dial again 55571468. This time Rate Engine send the call to Brazil.
Everything else is working great, but this issue is driving me crazy.
This feature is absolutely necesary in any voip system, I mean users have to be able to call between each other for free.
Any clue ? Please advice me
Thanks in advanced.
Rgds


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 3:10 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
start from the begining:

1. cardalias is what you dial. it is a value you set in the customer record it is not your card number and it must be numeric

2. make sure your you are using the same agi-conf that is specified in the call to a2billing.php

3. in that agi-conf these 3 parameters are to be set exactly the way i have them


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

; 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 = YES



4. dial 555+card alias


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 3:25 am 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
I solved it.
Well, after set up sip matters in a2billing.conf as Gue and Jroper posted, I still can not make internal calls.
My problem was I changed default account numbers. So I went to database and cc_card table still have the original value so, I changed to the same card alias=username=accountcode=reg extension and voila, it is works.
Certainly everything should work if I dont change default accounts.
Thanks Gue an Jroper for your help.
Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 4:02 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
now that you have it working choose a card-alias that is NOT your card number. You don't wnat those numbers to be the same. making it the same as giving out your number would be the same as giving out the pin number for your account


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 5:14 am 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
Yes, I understand your point.
Now I have a diferent problem.
I´m running a platform based on asterisk and Astbill. I found A2Billing which is more flexible and have much more features so I want to change. The problem is all my customers have predefined account originally created on astbill. Those accounts have 7XXXX format, so I dont want to visit each one to change sip settings, and not all of them can give remote acces, so I tried to match Astbill accounts in my new a2billing.
The problem is: if i changed settings to match account in 7XXXX format, a2billing lost validation and prompt me for my pin number. Many of my customers are call shops, and they dont want to validate pin numbers in each call they make.
So, my question is: there is a way to match this format in order to keep my custiomers sip settings and not to create new a2billing accounts ?
Thanks again.
Rgds


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 1:47 pm 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
You can most anything:

in a2b you can austhenticate by PIN and by accountcode
accountcode is the same as PIN but accountcode can be carried in the SIP.conf.

For your callshop you want to use the accountcode feature but you should use a different agi-conf for these clients. creae and use one where you are not authenticating by callerid. this way it will authenticate by accountcode. So when the callshop access your server they will not be prompted for PIN

For you clients who are calling in via access numbers creeate a agi-conf that authenticate with callerid or PIN if no callerid is presented

You users who already have accounts where there "username" was in the 7xxxxx range you should use the import feature for the customer record.
generate csv file with 7xxxx as the customer card number and then import the file into a2b ... it is like moving one set of accounts from one sytem to a2b.

Asterisk is authenticating your sip client on username and secret so you have to make sure you can import all that relevent stuff into the appropriate tables

ia2b is authenticating on PIN, accountcode or callerid

In a2b remember that cardalias is what you dial and also the same as username to log in the customer UI so you have to think thru what features you wnat to use that requires these variable.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 3:39 am 
Offline

Joined: Wed Aug 22, 2007 4:36 am
Posts: 97
Thanks Gue¡¡¡
I understand better how its works.
I really apreciate your help.
Regards,


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


All times are UTC


Who is online

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