Hi All,
I am having problems with DID routing to A2B-SIP Extension. When I dial the DID that points to the particular extension, the extension rings. As soon as the extension answers the call is disconnected. Does anyone have any idea what is going on?
DEBUG
-- Executing NoOp("SIP/64.34.170.149-09ad3a00", "Received incoming SIP connection from unknown peer to 2393449563") in new stack
-- Executing Set("SIP/64.34.170.149-09ad3a00", "DID=2393449563") in new stack
-- Executing Goto("SIP/64.34.170.149-09ad3a00", "s|1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing Ringing("SIP/64.34.170.149-09ad3a00", "") in new stack
-- Executing GotoIf("SIP/64.34.170.149-09ad3a00", "1?from-trunk|2393449563|1") in new stack
-- Goto (from-trunk,2393449563,1)
-- Executing Set("SIP/64.34.170.149-09ad3a00", "__FROM_DID=2393449563") in new stack
-- Executing Gosub("SIP/64.34.170.149-09ad3a00", "app-blacklist-check|s|1") in new stack
-- Executing LookupBlacklist("SIP/64.34.170.149-09ad3a00", "") in new stack
-- Executing GotoIf("SIP/64.34.170.149-09ad3a00", "0?blacklisted") in new stack
-- Executing Return("SIP/64.34.170.149-09ad3a00", "") in new stack
-- Executing Goto("SIP/64.34.170.149-09ad3a00", "a2billing-did|2393449563|1") in new stack
-- Goto (a2billing-did,2393449563,1)
-- Executing NoOp("SIP/64.34.170.149-09ad3a00", ""2396455991" <2396455991>") in new stack
-- Executing DeadAGI("SIP/64.34.170.149-09ad3a00", "a2billing.php|20|did") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|20|did: A2Billing AGI internal configuration:
a2billing.php|20|did: Array
a2billing.php|20|did: (
a2billing.php|20|did: [debug] => 3
a2billing.php|20|did: [answer_call] =>
a2billing.php|20|did: [logger_enable] => 1
a2billing.php|20|did: [log_file] => /tmp/a2billing.log
a2billing.php|20|did: [say_goodbye] =>
a2billing.php|20|did: [play_menulanguage] =>
a2billing.php|20|did: [force_language] =>
a2billing.php|20|did: [intro_prompt] =>
a2billing.php|20|did: [len_cardnumber] => 6
a2billing.php|20|did: [len_aliasnumber] => 6
a2billing.php|20|did: [len_voucher] => 15
a2billing.php|20|did: [min_credit_2call] => 0
a2billing.php|20|did: [min_duration_2bill] => 0
a2billing.php|20|did: [notenoughcredit_cardnumber] =>
a2billing.php|20|did: [notenoughcredit_assign_newcardnumber_cid] =>
a2billing.php|20|did: [use_dnid] => 1
a2billing.php|20|did: [no_auth_dnid] => Array
a2billing.php|20|did: (
a2billing.php|20|did: [0] => 2400
a2billing.php|20|did: [1] => 2300
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: [number_try] => 3
a2billing.php|20|did: [say_balance_after_auth] =>
a2billing.php|20|did: [say_balance_after_call] =>
a2billing.php|20|did: [say_rateinitial] =>
a2billing.php|20|did: [say_timetocall] => 1
a2billing.php|20|did: [auto_setcallerid] =>
a2billing.php|20|did: [force_callerid] =>
a2billing.php|20|did: [cid_sanitize] => DID
a2billing.php|20|did: [cid_enable] => 1
a2billing.php|20|did: [cid_askpincode_ifnot_callerid] =>
a2billing.php|20|did: [cid_auto_create_card] =>
a2billing.php|20|did: [cid_auto_assign_card_to_cid] =>
a2billing.php|20|did: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|20|did: [cid_auto_create_card_credit] => 0
a2billing.php|20|did: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|20|did: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|20|did: [callerid_authentication_over_cardnumber] =>
a2billing.php|20|did: [sip_iax_friends] =>
a2billing.php|20|did: [sip_iax_pstn_direct_call_prefix] => 9
a2billing.php|20|did: [sip_iax_pstn_direct_call] =>
a2billing.php|20|did: [extracharge_did] => Array
a2billing.php|20|did: (
a2billing.php|20|did: [0] =>
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: [extracharge_fee] => Array
a2billing.php|20|did: (
a2billing.php|20|did: [0] =>
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: [dialcommand_param] => |30|HrL(%timeout%:61000:30000)
a2billing.php|20|did: [dialcommand_param_sipiax_friend] => |30|HrL(3600000:61000:30000)
a2billing.php|20|did: [switchdialcommand] => 1
a2billing.php|20|did: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|20|did: [send_reminder] =>
a2billing.php|20|did: [record_call] =>
a2billing.php|20|did: [monitor_formatfile] => gsm
a2billing.php|20|did: [base_currency] => usd
a2billing.php|20|did: [agi_force_currency] =>
a2billing.php|20|did: [currency_association] => Array
a2billing.php|20|did: (
a2billing.php|20|did: [0] => usd:prepaid-dollar
a2billing.php|20|did: [1] => mxn:pesos
a2billing.php|20|did: [2] => eur:euro
a2billing.php|20|did: [3] => all:credit
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|20|did: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|20|did: [play_audio] => 1
a2billing.php|20|did: [cid_auto_create_card_len] => 10
a2billing.php|20|did: [failover_recursive_limit] => 1
a2billing.php|20|did: [currency_association_internal] => Array
a2billing.php|20|did: (
a2billing.php|20|did: [usd] => prepaid-dollar
a2billing.php|20|did: [mxn] => pesos
a2billing.php|20|did: [eur] => euro
a2billing.php|20|did: [all] => credit
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: [ivr_voucher] => 0
a2billing.php|20|did: [ivr_voucher_prefixe] => 8
a2billing.php|20|did: [jump_voucher_if_min_credit] => 0
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: file:a2billing.php - line:76 - IDCONFIG : 20
a2billing.php|20|did: file:a2billing.php - line:77 - MODE : did
a2billing.php|20|did: file:a2billing.php - line:89 - AGI Request:
a2billing.php|20|did: file:a2billing.php - line:90 - Array
a2billing.php|20|did: (
a2billing.php|20|did: [agi_request] => a2billing.php
a2billing.php|20|did: [agi_channel] => SIP/64.34.170.149-09ad3a00
a2billing.php|20|did: [agi_language] => en
a2billing.php|20|did: [agi_type] => SIP
a2billing.php|20|did: [agi_uniqueid] => 1198879072.1250
a2billing.php|20|did: [agi_callerid] => 2396455991
a2billing.php|20|did: [agi_calleridname] => 2396455991
a2billing.php|20|did: [agi_callingpres] => 0
a2billing.php|20|did: [agi_callingani2] => 0
a2billing.php|20|did: [agi_callington] => 0
a2billing.php|20|did: [agi_callingtns] => 0
a2billing.php|20|did: [agi_dnid] => 2393449563
a2billing.php|20|did: [agi_rdnis] => unknown
a2billing.php|20|did: [agi_context] => a2billing-did
a2billing.php|20|did: [agi_extension] => 2393449563
a2billing.php|20|did: [agi_priority] => 2
a2billing.php|20|did: [agi_enhanced] => 0.0
a2billing.php|20|did: [agi_accountcode] =>
a2billing.php|20|did: )
a2billing.php|20|did:
a2billing.php|20|did: file:Class.A2Billing.php - line:614 - get_agi_request_parameter = 2396455991 ; SIP/64.34.170.149-09ad3a00 ; 1198879072.1250 ; ; 2393449563
a2billing.php|20|did: file:a2billing.php - line:332 - [NO ANSWER CALL]
a2billing.php|20|did: file:a2billing.php - line:344 - [DID CALL - [CallerID=2396455991]:[DID=2393449563]
a2billing.php|20|did: file:a2billing.php - line:356 - 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='2393449563' AND cc_did.startingdate<= CURRENT_TIMESTAMP AND (cc_did.expirationdate > CURRENT_TIMESTAMP OR cc_did.expirationdate IS NULL OR cc_did.expirationdate = '0000-00-00 00:00:00') ORDER BY priority ASC
a2billing.php|20|did: file:a2billing.php - line:358 - Array
a2billing.php|20|did: file:Class.A2Billing.php - line:971 - [A2Billing] DID call friend: FOLLOWME=1 (cardnumber:10962537|destination:SIP/10962537|tariff:6)
a2billing.php|20|did:
a2billing.php|20|did: file:Class.A2Billing.php - line:1638 - 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='10962537'
a2billing.php|20|did: file:Class.A2Billing.php - line:1712 - [SET CHANNEL(language) en]
a2billing.php|20|did: file:Class.A2Billing.php - line:647 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='10962537']
a2billing.php|20|did: file:Class.A2Billing.php - line:999 - [A2Billing] DID call friend: Dialing 'SIP/10962537|30|HrL(3600000:61000:30000)' Friend.
a2billing.php|20|did:
-- AGI Script Executing Application: (DIAL) Options: (SIP/10962537|30|HrL(3600000:61000:30000))
-- Limit Data for this call:
-- - timelimit = 3600000
-- - play_warning = 61000
-- - play_to_caller= yes
-- - play_to_callee= no
-- - warning_freq = 30000
-- - start_sound = UNDEF
-- - warning_sound = timeleft
-- - end_sound = UNDEF
-- Called 10962537
-- SIP/10962537-09e5c6b0 is ringing
-- SIP/10962537-09e5c6b0 answered SIP/64.34.170.149-09ad3a00
a2billing.php|20|did: file:Class.A2Billing.php - line:1037 - [A2Billing] DID call friend: dialstatus : ANSWER, answered time is 0
a2billing.php|20|did:
a2billing.php|20|did: file:Class.A2Billing.php - line:647 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='10962537']
-- AGI Script a2billing.php completed, returning 0
asterisk1*CLI>
AGI-CONF
[agi-conf20]
; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug=3
; Manage the answer on the call
answer_call=no
; Activate application logging
; logging is optimized to write all the logs at once Very Happy
logger_enable=YES
; File to log
log_file=/tmp/a2billing.log
; play the goodbye message when the user has finished.
say_goodbye=NO
; enable the menu to choose the language
; press 1 for English, pulsa 2 para el espa�ol, Pressez 3 pour Fran�ais
play_menulanguage=NO
; force the use of a language, if you dont want to use it leave the option empty
; Values : ES, EN, FR, etc... (according to the audio you have installed)
force_language=
; Introduction prompt : to specify an additional prompt to play at the beginning of the application
; parlezplus-intro_013centimes
intro_prompt=
; length of the cardnumber (number of of digits)
len_cardnumber=6
; Alias-Card length
len_aliasnumber = 6
; Voucher length
len_voucher = 15
; Minimum amount of credit to use the application
min_credit_2call=0
; this is the minimum duration in seconds of a call in order to be billed
; any call with a length less than min_duration_2bill will have a 0 cost
; useful not to charge callers for system errors when a call was answered but it actually didn't connect
min_duration_2bill=0
; if user doesn't have enough credit to call a destination, prompt him to enter another cardnumber
notenoughcredit_cardnumber=NO
; if notenoughcredit_cardnumber = YES then assign the CallerID to the new cardnumber
notenoughcredit_assign_newcardnumber_cid=NO
; if YES it will use the DNID and try to dial out, without asking for the phonenumber to call
; value : YES, NO
use_dnid=YES
; list the dnid on which you want to avoid the use of the previous option "use_dnid"
no_auth_dnid=2400,2300
;number of times the user can dial different number
number_try=3
; Play the balance to the user after the authentication (values : yes - no)
say_balance_after_auth=NO
; Play the balance to the user after the call (values : yes - no)
say_balance_after_call=NO
; Play the initial cost of the route (values : yes - no)
say_rateinitial=NO
; Play the amount of time that the user can call (values : yes - no)
say_timetocall=YES
; enable the presentation of a callerID number
auto_setcallerid=No
; If set, and auto_setcallerid is enabled, the number is sent as
always
force_callerid=
; If force_callerid is not set, then this ensures that CID is set to one of the ccard's configured caller IDs or blank if none available.
; NO - disable this feature, caller ID can be anything.
; CID - Caller ID must be one of the customers caller IDs
; DID - Caller ID must be one of the customers DID nos.
; BOTH - Caller ID must be one of the above two items.
cid_sanitize=DID
; enable the callerid authentication
; if this option is active the CC system will check the CID of caller
cid_enable=YES
; if the CID does not exist, you can then ask for a cardnumber from the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=No
; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=No
; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=NO
; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid=POSTPAY
; amount of credit of the new card
cid_auto_create_card_credit=0
; if postpay, define the credit limit for the card
cid_auto_create_card_credit_limit=1000
; the tariffgroup to use for the new card (this is the ID that you can find on the admin web interface)
cid_auto_create_card_tariffgroup=6
; if we want to check the callerID over the cardnumber authentication (to guard against spoofing)
callerid_authentication_over_cardnumber=NO
; 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=9
; 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=NO
; Extracharge DIDs, multiple numbers and fees must be separated by comma
;extracharge_did=1800XXXXXXX,1888XXXXXXX
extracharge_did=
;extracharge_fee=0.02,0.03
extracharge_fee=
; 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
; 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="|30|HrL(%timeout%:61000:30000)"
; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend="|30|HrL(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
; For free calls, limit the duration: amount in seconds
maxtime_tocall_negatif_free_route = 5400
; Send a reminder email to the user when they are under min_credit_2call
send_reminder=NO
; enable to monitor the call (to record all the conversations)
; value : YES - NO
record_call=NO
; format of the recorded monitor file
monitor_formatfile=gsm
;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = usd
; Force to play the balance to the caller in a predefined currency, to use the currency set for by the customer leave this field empty
agi_force_currency =
; CURRENCY SECTION
; Define all the audio (without file extensions) that you want to play according to currency (use , to separate, ie "usd:prepaid-dollar,mxn:pesos,eur:Euro,all:credit")
currency_association = usd:prepaid-dollar,mxn:pesos,eur:euro,all:credit
; Please enter the file name you want to play when we prompt the calling party to enter the destination number
; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011
file_conf_enter_destination = prepaid-enter-dest
; Please enter the file name you want to play when we prompt the calling party to choose the prefered language
; file_conf_enter_menulang = prepaid-menulang
file_conf_enter_menulang = prepaid-menulang2
Any Help Would Be Greatly Appreciated!