You would have to make a separate agi.conf for the DiD that you wants to send to the 2nd a2billing server.
it shoud look something like this, you should adjust accordingly.
important keys are:
answer_call = NO
play_audio = NO
say_goodbye = NO
use_dnid = YESIn your DID you then pass the call to the CARD Number that will be the username/password on a2billing server 2.
and then on that server, you create the DID again, and forward it to the end user.
Code:
[agi-conf4]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;2003.03.08 --> Last updated
;AGI for DID sold to Resellers
; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug = 3
asterisk_version = 1_4
answer_call = NO
play_audio = NO
say_goodbye = NO
play_menulanguage = NO
force_language = EN
intro_prompt =
min_credit_2call = 0
min_duration_2bill = 0
notenoughcredit_cardnumber = NO
notenoughcredit_assign_newcardnumber_cid = NO
use_dnid = YES
no_auth_dnid = 2400,2300
number_try = 1
force_callplan_id = 5
say_balance_after_auth = NO
say_balance_after_call = NO
say_rateinitial = NO
say_timetocall = NO
auto_setcallerid = NO
force_callerid = NO
cid_sanitize = NO
cid_enable = YES
cid_askpincode_ifnot_callerid = YES
cid_auto_assign_card_to_cid = NO
cid_auto_create_card = NO
cid_auto_create_card_len = 10
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
callerid_authentication_over_cardnumber = NO
sip_iax_friends = NO
sip_iax_pstn_direct_call_prefix = 55
sip_iax_pstn_direct_call = NO
ivr_voucher = NO
ivr_voucher_prefix =
jump_voucher_if_min_credit = YES
extracharge_did = 1888xxx,349008xxxx
extracharge_fee = 0.035,0.035
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 = "|180|(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend = "|60|HRgiL(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 = YES
failover_recursive_limit = 0
maxtime_tocall_negatif_free_route = 5400
send_reminder = YES
record_call = NO
monitor_formatfile = gsm
agi_force_currency =
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit
file_conf_enter_destination = prepaid-enter-dest
file_conf_enter_menulang = prepaid-menulang2
callback_bill_1stleg_ifcall_notconnected = YES