asterisk2billing.org
http://forum.asterisk2billing.org/

A2billing prompt unavailale number -Rate Simulator bug
http://forum.asterisk2billing.org/viewtopic.php?f=16&t=7104
Page 1 of 1

Author:  chrisxiao [ Mon Feb 15, 2010 3:50 pm ]
Post subject:  A2billing prompt unavailale number -Rate Simulator bug

Elastix 1.6-12 works fine. Then I configure A2billing on extension 225:
In the beginning of /etc/asterisk/extensions_custom.conf
I add under [from-internal-custom]
; begin a2billing
exten => 225, 1, Answer
exten => 225, 2, Wait, 2
exten => 225, 3, DeadAGI,a2billing.php
exten => 225, 4, Wait, 2
exten => 225, Hangup
; end of a2billing


I create calling plan, rate card, rate and trunks.
I use SoftPhone to dial 225 via IVR. Eventually I would like to use outside
phone to dial the PBX, provide pin, and dial another international number.
1) Create pin and use Rate Simulator to test. Got "Card Error!!!". I found that CC_entity_sim_ratecard.php has a bug in its SQL statement when it check the card number(pin): select * from cc_card where id=$id_cc_card
this should really be
select * from cc_card where username=$id_cc_card.

2) I move on to use the pin for dialing, a2billing/elastix prompts my balance and available miminutes and dial the given number, but prompt:
The number you dialed is unavailable.

Any one can give me help? I just cannot believe the latest Elsastix installation won't work with a2billing.


The log is long, I include the part that is after the pin is validated:
elastix*CLI> ssss




No such command 'ssss' (type 'help ssss' for other possible commands)
AGI Tx >> 200 result=17323188334
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:663 - RES DTMF : 17323188334" 1
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : 17323188334
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:681 - DESTINATION ::> 17323188334" 1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> 17323188334
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> 17323188334" 1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> 17323188334
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:721 - OK - RESFINDRATE::> 1" 1
a2billing.php: file:Class.A2Billing.php - line:721 - OK - RESFINDRATE::> 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:743 - RES_ALL_CALCULTIMEOUT ::> 1" 1
a2billing.php: file:Class.A2Billing.php - line:743 - RES_ALL_CALCULTIMEOUT ::> 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.A2Billing.php - line:760 - TIMEOUT::> 60000 : minutes=1000 - seconds=0" 1
a2billing.php: file:Class.A2Billing.php - line:760 - TIMEOUT::> 60000 : minutes=1000 - seconds=0
AGI Tx >> 200 result=1
AGI Rx << STREAM FILE prepaid-you-have "#" 0
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=9440
AGI Rx << SAY NUMBER 1000 ""
-- <SIP/302-09ca5940> Playing 'digits/1' (language 'en'
-- <SIP/302-09ca5940> Playing 'digits/thousand' (language 'en'
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE prepaid-minutes "#" 0
-- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=6240
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:960 - app_callingcard: Dialing 'ZAP/1/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'." 1
a2billing.php: file:Class.RateEngine.php - line:960 - app_callingcard: Dialing 'ZAP/1/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'.
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "" 1
a2billing.php:
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:985 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'." 1
a2billing.php: file:Class.RateEngine.php - line:985 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
AGI Tx >> 200 result=1
AGI Rx << EXEC Dial ZAP/1/17323188334|60|HRrL(60000000:61000:30000)
-- AGI Script Executing Application: (Dial) Options: (ZAP/1/17323188334|60|HRrL(60000000:61000:30000))
-- Limit Data for this call:
> timelimit = 60000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
== Everyone is busy/congested at this time (1:0/0/1)AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ANSWEREDTIME
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CHANUNAVAIL)
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]AGI Tx >> 200 result=1AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'." 1
a2billing.php: file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'.
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "" 1
a2billing.php:
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)
-- AGI Script Executing Application: (DIAL) Options: (ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000))
-- Limit Data for this call:
> timelimit = 60000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
== Everyone is busy/congested at this time (1:0/0/1)
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ANSWEREDTIME
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CHANUNAVAIL)
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/1/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'." 1
a2billing.php: file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/1/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'.
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "" 1
a2billing.php:
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL ZAP/1/17323188334|60|HRrL(60000000:61000:30000)
-- AGI Script Executing Application: (DIAL) Options: (ZAP/1/17323188334|60|HRrL(60000000:61000:30000))
-- Limit Data for this call:
> timelimit = 60000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
== Everyone is busy/congested at this time (1:0/0/1)
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ANSWEREDTIME
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CHANUNAVAIL)
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1013 - [K=0]:[ANSWEREDTIME=0-DIALSTATUS=CHANUNAVAIL]
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'." 1
a2billing.php: file:Class.RateEngine.php - line:1053 - FAILOVER app_callingcard: Dialing 'ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)' with timeout of '60000'.
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "" 1
a2billing.php:
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000)
-- AGI Script Executing Application: (DIAL) Options: (ZAP/ZAP/3/17323188334|60|HRrL(60000000:61000:30000))
-- Limit Data for this call:
> timelimit = 60000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
== Everyone is busy/congested at this time (1:0/0/1)
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ANSWEREDTIME
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CHANUNAVAIL)
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]" 1
a2billing.php: file:Class.RateEngine.php - line:1063 - [FAILOVER K=0]:[ANSTIME=-DIALSTATUS=CHANUNAVAIL]
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "file:Class.RateEngine.php - line:1095 - [USEDRATECARD - FAIL =0]" 1
a2billing.php: file:Class.RateEngine.php - line:1095 - [USEDRATECARD - FAIL =0]
AGI Tx >> 200 result=1
AGI Rx << STREAM FILE prepaid-dest-unreachable "#" 0
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
elastix*CLI>

Author:  jroper [ Tue Feb 16, 2010 7:11 am ]
Post subject:  Re: A2billing prompt unavailale number -Rate Simulator bug

Hi

The system is clearly trying to dial which would suggest an issue with your ZAP trunks.

In the trunk in A2Billing, you should have technology type as either ZAP or Dahdi depending on which you are using in Asterisk, then in the trunk you can with have a channel number such as a "1" to use channel 1, or something like g0 or G0 to use a previously configured group of lines.

Joe

Author:  chrisxiao [ Thu Feb 25, 2010 5:05 am ]
Post subject:  Re: A2billing prompt unavailale number -Rate Simulator bug

Joe, you are right about the trunk setup in A2Billing. I create two trunks with technology:ZAP, channel 1 and 3. I change to use DAHDI. It dial out sucessfully.

But I just wonder. In Asterisk/FreePBX, I set the trunk to ZAP/1, and ZAP/3. They can accept phone calls and dial out OK. Should I also use DAHDI/1 and DAHDI/3 instead? I do have problem that after a DISA call, my PBX does not hangup the line.
Thanks. A very big step forward!

Author:  jroper [ Thu Feb 25, 2010 8:32 am ]
Post subject:  Re: A2billing prompt unavailale number -Rate Simulator bug

FreePBX does the conversion from Zap to dahdi

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/