Hi Joe,
It should but it doesn't do it. I've debugged the AGI configurations and I see that A2B is not using as DNID the 1 + NXXXXXXXXX number but the number -without- the 1.
I tried dialing 3057781080 and it had to be passed as 13057781080
Here's the A2Billing Debug for AGI-CONF 4
0
-- AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/7006-b6310878", "OUTNUM=130
57781080") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/7006-b6310878", "custom=AM"
) in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/7006-b6310878", "1|Set|D
IAL_TRUNK_OPTIONS=M(setmusic^christmas)t") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/7006-b6310878", "dialout-
trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] GotoIf("SIP/7006-b631087
8", "1?custom-freepbx-a2billing|13057781080|1:2") in new stack
-- Goto (custom-freepbx-a2billing,13057781080,1)
== Channel 'SIP/7006-b6310878' jumping out of macro 'dialout-trunk-predial-hoo
k'
== Channel 'SIP/7006-b6310878' jumping out of macro 'dialout-trunk'
-- Executing [13057781080@custom-freepbx-a2billing:1] DeadAGI("SIP/7006-b631
0878", "a2billing.php|4") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|4: file:Class.A2Billing.php - line:594 - uniqueid: - A2Billing A
GI internal configuration: ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:595 - uniqueid: - Array
a2billing.php|4: (
a2billing.php|4: [callerid_update] => 0
a2billing.php|4: [dialcommand_param_call_2did] => |60|HiL(%timeout%:61000:
30000)
a2billing.php|4: [description] => agi-config
a2billing.php|4: [asterisk_version] => 1_4
a2billing.php|4: [answer_call] => 1
a2billing.php|4: [play_audio] => 1
a2billing.php|4: [say_goodbye] => 1
a2billing.php|4: [play_menulanguage] => 0
a2billing.php|4: [force_language] =>
a2billing.php|4: [intro_prompt] =>
a2billing.php|4: [min_credit_2call] => 0.25
a2billing.php|4: [min_duration_2bill] => 6
a2billing.php|4: [notenoughcredit_cardnumber] => 0
a2billing.php|4: [notenoughcredit_assign_newcardnumber_cid] => 0
a2billing.php|4: [use_dnid] => 1
a2billing.php|4: [no_auth_dnid] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 2400
a2billing.php|4: [1] => 2300
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [number_try] => 10
a2billing.php|4: [force_callplan_id] =>
a2billing.php|4: [say_balance_after_auth] => 0
a2billing.php|4: [say_balance_after_call] => 0
a2billing.php|4: [say_rateinitial] => 0
a2billing.php|4: [say_timetocall] => 0
a2billing.php|4: [auto_setcallerid] => 1
a2billing.php|4: [force_callerid] =>
a2billing.php|4: [cid_sanitize] => NO
a2billing.php|4: [cid_enable] => 1
a2billing.php|4: [cid_askpincode_ifnot_callerid] => 0
a2billing.php|4: [failover_lc_prefix] => 0
a2billing.php|4: [cid_auto_assign_card_to_cid] => 0
a2billing.php|4: [callerid_authentication_over_cardnumber] => 0
a2billing.php|4: [sip_iax_friends] => 0
a2billing.php|4: [sip_iax_pstn_direct_call_prefix] => 22
a2billing.php|4: [sip_iax_pstn_direct_call] => 0
a2billing.php|4: [ivr_voucher] => 0
a2billing.php|4: [ivr_voucher_prefix] => 8
a2billing.php|4: [jump_voucher_if_min_credit] => 0
a2billing.php|4: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php|4: [dialcommand_param_sipiax_friend] => |60|HiL(3600000:6100
0:30000)
a2billing.php|4: [switchdialcommand] => 0
a2billing.php|4: [failover_recursive_limit] => 2
a2billing.php|4: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|4: [send_reminder] => 0
a2billing.php|4: [record_call] => 0
a2billing.php|4: [monitor_formatfile] => gsm
a2billing.php|4: [agi_force_currency] =>
a2billing.php|4: [currency_association] => Array
a2billing.php|4: (
a2billing.php|4: [0] => usd:dollars
a2billing.php|4: [1] => mxn:pesos
a2billing.php|4: [2] => eur:euros
a2billing.php|4: [3] => all:credit
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [local_dialing_addcountryprefix] => 0
a2billing.php|4: [max_call_call_2_did] => 3600
a2billing.php|4: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|4: [conf_order_menulang] => en:fr:es
a2billing.php|4: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|4: [international_prefixes] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 011
a2billing.php|4: [1] => 00
a2billing.php|4: [2] => 09
a2billing.php|4: [3] => 1
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [extracharge_did] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 1800
a2billing.php|4: [1] => 1866
a2billing.php|4: [2] => 1877
a2billing.php|4: [3] => 1888
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [extracharge_fee] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 0.06
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [extracharge_buyfee] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 0
a2billing.php|4: [1] => 0
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [maxtime_tounlimited_calls] => 5400
a2billing.php|4: [maxtime_tofree_calls] => 5400
a2billing.php|4: [callplan_deck_minute_threshold] =>
a2billing.php|4: [disable_announcement_seconds] => 0
a2billing.php|4: [verbosity_level] => 4
a2billing.php|4: [logging_level] => 3
a2billing.php|4: [dial_balance_reservation] => 0.25
a2billing.php|4: [cid_auto_create_card] => 0
a2billing.php|4: [cid_auto_create_card_len] => 10
a2billing.php|4: [cid_auto_create_card_typepaid] => PREPAID
a2billing.php|4: [cid_auto_create_card_credit] => 0
a2billing.php|4: [cid_auto_create_card_credit_limit] => 0
a2billing.php|4: [cid_auto_create_card_tariffgroup] => 1
a2billing.php|4: [logger_enable] => 1
a2billing.php|4: [log_file] => /var/log/a2billing/a2billing.log
a2billing.php|4: [currency_association_internal] => Array
a2billing.php|4: (
a2billing.php|4: [usd] => dollars
a2billing.php|4: [mxn] => pesos
a2billing.php|4: [eur] => euros
a2billing.php|4: [all] => credit
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: [file_conf_enter_menulang] => prepaid-menulang
a2billing.php|4: [ivr_voucher_prefixe] => 8
a2billing.php|4: [cheat_on_announcement_time] => 0
a2billing.php|4: )
a2billing.php|4: ::> 4
a2billing.php|4: file:a2billing.php - line:102 - uniqueid: - IDCONFIG : 4 ::>
3
a2billing.php|4: file:a2billing.php - line:103 - uniqueid: - MODE : standard :
:> 3
a2billing.php|4: file:a2billing.php - line:120 - uniqueid: - AGI Request:
a2billing.php|4: Array
a2billing.php|4: (
a2billing.php|4: [agi_request] => a2billing.php
a2billing.php|4: [agi_channel] => SIP/7006-b6310878
a2billing.php|4: [agi_language] => es
a2billing.php|4: [agi_type] => SIP
a2billing.php|4: [agi_uniqueid] => 1261326643.1723
a2billing.php|4: [agi_callerid] => 3053567631
a2billing.php|4: [agi_calleridname] => unknown
a2billing.php|4: [agi_callingpres] => 0
a2billing.php|4: [agi_callingani2] => 0
a2billing.php|4: [agi_callington] => 0
a2billing.php|4: [agi_callingtns] => 0
a2billing.php|4: [agi_dnid] => 3057781080
a2billing.php|4: [agi_rdnis] => unknown
a2billing.php|4: [agi_context] => custom-freepbx-a2billing
a2billing.php|4: [agi_extension] => 13057781080
a2billing.php|4: [agi_priority] => 1
a2billing.php|4: [agi_enhanced] => 0.0
a2billing.php|4: [agi_accountcode] => 2499219172
a2billing.php|4: )
a2billing.php|4: ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:708 - uniqueid:1261326643.172
3 - get_agi_request_parameter = 3053567631 ; SIP/7006-b6310878 ; 1261326643.172
3 ; 2499219172 ; 13057781080 ::> 3
a2billing.php|4: file:a2billing.php - line:157 - uniqueid:1261326643.1723 - [A
NSWER CALL] ::> 3
a2billing.php|4: file:Class.A2Billing.php - line:2340 - uniqueid:1261326643.17
23 - [CID_ENABLE - CID_CONTROL - CID:3053567631] ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:2355 - uniqueid:1261326643.17
23 - Array
a2billing.php|4: (
a2billing.php|4: [0] => Array
a2billing.php|4: (
a2billing.php|4: [0] => 3053567631
a2billing.php|4: [cid] => 3053567631
a2billing.php|4: [1] => 3
a2billing.php|4: [id_cc_card] => 3
a2billing.php|4: [2] => t
a2billing.php|4: [activated] => t
a2billing.php|4: [3] => 27.64216
a2billing.php|4: [credit] => 27.64216
a2billing.php|4: [4] => 1
a2billing.php|4: [tariff] => 1
a2billing.php|4: [5] => t
a2billing.php|4: [6] => 0
a2billing.php|4: [inuse] => 0
a2billing.php|4: [7] => 0
a2billing.php|4: [simultaccess] => 0
a2billing.php|4: [8] => 0
a2billing.php|4: [typepaid] => 0
a2billing.php|4: [9] => 500
a2billing.php|4: [creditlimit] => 500
a2billing.php|4: [10] => fr
a2billing.php|4: [language] => fr
a2billing.php|4: [11] => 2499219172
a2billing.php|4: [username] => 2499219172
a2billing.php|4: [12] => 0
a2billing.php|4: [removeinterprefix] => 0
a2billing.php|4: [13] => 3057781080
a2billing.php|4: [redial] => 3057781080
a2billing.php|4: [14] => 0
a2billing.php|4: [enableexpire] => 0
a2billing.php|4: [15] => 1558077737
a2billing.php|4: [UNIX_TIMESTAMP(expirationdate)] => 1558077737
a2billing.php|4: [16] => 0
a2billing.php|4: [expiredays] => 0
a2billing.php|4: [17] => 167
a2billing.php|4: [nbused] => 167
a2billing.php|4: [18] => 1246318456
a2billing.php|4: [UNIX_TIMESTAMP(firstusedate)] => 1246318456
a2billing.php|4: [19] => 1242545229
a2billing.php|4: [UNIX_TIMESTAMP(cc_card.creationdate)] => 1242545
229
a2billing.php|4: [20] => USD
a2billing.php|4: [currency] => USD
a2billing.php|4: [21] => FABRE
a2billing.php|4: [lastname] => FABRE
a2billing.php|4: [22] => PAUL
a2billing.php|4: [firstname] => PAUL
a2billing.php|4: [23] =>
[email protected] a2billing.php|4: [email] =>
[email protected] a2billing.php|4: [24] => 7878
a2billing.php|4: [uipass] => 7878
a2billing.php|4: [25] => -1
a2billing.php|4: [id_campaign] => -1
a2billing.php|4: [26] => 3
a2billing.php|4: [id] => 3
a2billing.php|4: [27] => 3057781080
a2billing.php|4: [useralias] => 3057781080
a2billing.php|4: [28] => 1
a2billing.php|4: [status] => 1
a2billing.php|4: [29] => 0
a2billing.php|4: [voicemail_permitted] => 0
a2billing.php|4: [30] => 0
a2billing.php|4: [voicemail_activated] => 0
a2billing.php|4: [31] => 0
a2billing.php|4: [restriction] => 0
a2billing.php|4: [32] => 1
a2billing.php|4: [countryprefix] => 1
a2billing.php|4: )
a2billing.php|4:
a2billing.php|4: )
a2billing.php|4: ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:2550 - uniqueid:1261326643.17
23 - - Account code - 2499219172 ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:740 - uniqueid:1261326643.172
3 - [CARD STATUS UPDATE] ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:749 - uniqueid:1261326643.172
3 - [QUERY USING CARD UPDATE::> UPDATE cc_card SET inuse=inuse+1, credit=credit-
0.25 WHERE username='2499219172'] ::> 4
a2billing.php|4: file:a2billing.php - line:173 - uniqueid:1261326643.1723 - [T
RY : callingcard_ivr_authenticate] ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:2237 - uniqueid:1261326643.17
23 - [AUTO SetCallerID] ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:2243 - uniqueid:1261326643.17
23 - [REQUESTED SetCallerID : 3053567631] ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:2255 - uniqueid:1261326643.17
23 - [EXEC SetCallerID : 3053567631] ::> 4
a2billing.php|4: file:a2billing.php - line:188 - uniqueid:1261326643.1723 - [C
HANNEL STATUS : 6 = Line is up]
a2billing.php|4: [CREDIT : 27.64216][CREDIT MIN_CREDIT_2CALL : 0.25] ::> 3
a2billing.php|4: file:a2billing.php - line:217 - uniqueid:1261326643.1723 - TA
RIFF ID -> 1 ::> 3
a2billing.php|4: file:Class.A2Billing.php - line:798 - uniqueid:1261326643.172
3 - 1 && && 10&& 0 ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:864 - uniqueid:1261326643.172
3 - SELECT cc_did.id,iduser FROM cc_did, cc_card WHERE cc_card.status=1 and cc
_card.id=iduser and cc_did.activated=1 and did='3057781080' AND cc_did.startin
gdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_d
id.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00') ::>
4
a2billing.php|4: file:Class.A2Billing.php - line:870 - uniqueid:1261326643.172
3 - DESTINATION ::> 3057781080 ::> 3
a2billing.php|4: file:Class.A2Billing.php - line:877 - uniqueid:1261326643.172
3 - RULES APPLY ON DESTINATION ::> 3057781080 ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:3380 - uniqueid:1261326643.17
23 - [SAVING DESTINATION FOR REDIAL: SQL: UPDATE cc_card SET redial = '305778108
0' WHERE username='2499219172']:[result: 1] ::> 4
a2billing.php|4: file:Class.RateEngine.php - line:98 - uniqueid:1261326643.172
3 - [CC_asterisk_rate-engine: (1, 3057781080)] ::> 4
a2billing.php|4: file:Class.RateEngine.php - line:119 - uniqueid:1261326643.17
23 - [CC_asterisk_rate-engine: CALLERID]
a2billing.php|4: 3053567631
a2billing.php|4: ::> 4
a2billing.php|4: file:Class.A2Billing.php - line:992 - uniqueid:1261326643.172
3 - ERROR ::> RateEngine didnt succeed to match the dialed number over the ratec
ard (Please check : id the ratecard is well create ; if the removeInter_Prefix i
s set according to your prefix in the ratecard ; if you hooked the ratecard to t
he Call Plan) ::> 1
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
masterpbx*CLI>
Oodly, for some reason, the [agi_dnid] captures 3057781080 but [agi_extension] captures 13057781080 which has to be the right DNID to call....... is there a way to tell A2B to use 1305 and no 305 ?
Thank you!
Paul