Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 11:36 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Please help Callbacks not working
PostPosted: Wed Dec 17, 2008 4:26 am 
Offline

Joined: Sun Nov 23, 2008 2:39 pm
Posts: 45
I have been trying for over two days to get my call backs working without success. I have been searching through this forum over and over again and have read the information in the /Doc folder and I am stuck.

This is what is happening:

Web Callback

From the customer interface I enter the two numbers, click submit then I get the message "Your callback request has been queued correctly!"

The system calls me on 441212121212 but disconnects when I answer the call but it should be calling the second number which is 447596xxxxxx.:

From the Asterisk CLI I get the below messages:

== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'myasterisk' logged on from 127.0.0.1
[Dec 16 17:58:42] NOTICE[31258]: rtp.c:788 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 1.2.3.4
> Channel SIP/M-Xtra-08586c20 was answered.
-- Executing [447596xxxxxx@a2billing-callback:1] Answer("SIP/M-Xtra-08586c20", "") in new stack
-- Executing [447596xxxxxx@a2billing-callback:2] Set("SIP/M-Xtra-08586c20", "CALLERID(num)=44123456") in new stack
-- Executing [447596xxxxxx@a2billing-callback:3] DeadAGI("SIP/M-Xtra-08586c20", "a2billing.php|4|callback") in new stack
[Dec 16 17:58:48] WARNING[31259]: res_agi.c:2129 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
== Manager 'myasterisk' logged off from 127.0.0.1
-- AGI Script a2billing.php completed, returning 0
c1213s02*CLI>

CID Callback

If I try using the cid-callback I get:

-- Executing [44161xxxxxxx@a2billing:1] Goto("SIP/213.x.x.x-085a7f08", "a2billing-cid-callback|44161xxxxxxx|1") in new stack
-- Goto (a2billing-cid-callback,44161xxxxxxx,1)
-- Executing [44161xxxxxxx@a2billing-cid-callback:1] Ringing("SIP/213.x.x.x-085a7f08", "") in new stack
-- Executing [44161xxxxxxx@a2billing-cid-callback:2] Set("SIP/213.x.x.x-085a7f08", "CALLERID(num)=441212121212") in new stack
-- Executing [44161xxxxxxx@a2billing-cid-callback:3] Wait("SIP/213.x.x.x-085a7f08", "10") in new stack
-- Executing [44161xxxxxxx@a2billing-cid-callback:4] DeadAGI("SIP/213.x.x.x-085a7f08", "a2billing.php|4|cid-callback|44") in new stack
[Dec 16 18:17:14] WARNING[31511]: res_agi.c:2129 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
-- AGI Script a2billing.php completed, returning 0
c1213s02*CLI>


Here are my settings:

from a2billing.conf -

; MANAGER CONNECTION PARAMETERS
manager_host = localhost
manager_username = myasterisk
manager_secret = mycode


; CALL-BACK
[callback]
; When web call-back is enabled this is the context to sent the call.
context_callback = a2billing-callback

; this is the Extension to redirect the call when the web callback is returned
extension = 1000

; this is the number of seconds to wait before initiating the call back.
sec_wait_before_callback = 10

;Number of seconds before the call-back can be re-initiated from the web page
; to prevent repeated and unwanted calls.
sec_avoid_repeate = 30

; if the callback doesnt succeed within the value below, then the call is deemed to have failed.
timeout = 20

; if we want to manage the answer on the call
; Disabling this for callback trigger numbers makes it ring not hang up.
answer_call = no

[agi-conf4]
;
; This is the Call-Back configuration
;
debug = 0
asterisk_version = 1_4
answer_call = YES
play_audio = YES
say_goodbye = NO
play_menulanguage = NO
force_language =
intro_prompt = prepaid-callback_intro
min_credit_2call = 0
min_duration_2bill = 0
notenoughcredit_cardnumber = YEs
notenoughcredit_assign_newcardnumber_cid = YES
use_dnid = NO
no_auth_dnid = 2400,2300
number_try = 1
force_callplan_id =
say_balance_after_auth = YES
say_balance_after_call = NO
say_rateinitial = NO
say_timetocall = YES
auto_setcallerid = YES
force_callerid =
cid_sanitize = NO
cid_enable = YES
cid_askpincode_ifnot_callerid = YES
cid_auto_assign_card_to_cid = YES
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 = 555
sip_iax_pstn_direct_call = NO
ivr_voucher = NO
ivr_voucher_prefix = 8
jump_voucher_if_min_credit = NO
extracharge_did =
extracharge_fee =
dialcommand_param = "|60|HL(%timeout%:61000:30000)"
dialcommand_param_sipiax_friend = "|60|HL(3600000:61000:30000)"
switchdialcommand = NO
failover_recursive_limit = 2
maxtime_tocall_negatif_free_route = 5400
send_reminder = NO
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

My extensions.conf


[a2billing]
;
; access-numbers
; for calling card and call back applications
;
exten => 44203xxxxxxx,1,Goto(a2billing-cc,${EXTEN},1)
exten => 44161xxxxxxx,1,Goto(a2billing-cid-callback,${EXTEN},1)
;
; Customers DIDs
;
exten => 44121xxxxxxx,1,Goto(a2billing-did,${EXTEN},1)
;
;
exten => _X.,1,Answer
exten => _X.,n,Wait,3
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Wait,3
exten => _X.,n,Hangup
;
;
[a2billing-cc]
; *** CallingCard application for PINLESS dialling
; *** from Landlines and Mobiles using agi-conf1
;
exten => _X.,1,NoOp,${CALLERID(all)}
exten => _X.,n,Answer
exten => _X.,n,Wait(2)
exten => _X.,n,DeadAGI(a2billing.php|2)
exten => _X.,n,Wait(2)
exten => _X.,n,Hangup
;
;
[a2billing-callback]
exten => _X.,1,Answer
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,DeadAGI(a2billing.php|4|callback)
exten => _X.,n,Hangup

[a2billing-cid-callback]
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,Wait(10)
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback|44) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-all-callback]
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback|44) ;last parameter is the callback area code
exten => _X.,n,Wait(10)
exten => _X.,n,Hangup
;

I would be grateful if anyone can help me out here.

regards,

Sammy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2008 4:08 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
In future please attach lengthy logs and configurations as a .txt file, rather than posting them in-line.
You've got 'debug = 0' in a2billing.conf, so it's not providing any information to help debug this issue. Try increasing it to 'debug = 3' and try again.
Given the information available, my guess is that A2B can't find a route to either or both of the numbers in question. Are you sure you need the CLI rewrite lines in your Asterisk dialplan? By default they are commented out, and serve only as an example of how you could rewrite the CLI if you really need to.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2008 4:53 pm 
Offline

Joined: Sun Nov 23, 2008 2:39 pm
Posts: 45
stavros wrote:
In future please attach lengthy logs and configurations as a .txt file, rather than posting them in-line.

My apologies for that! See attached log for the Web Callback.

Quote:
You've got 'debug = 0' in a2billing.conf, so it's not providing any information to help debug this issue. Try increasing it to 'debug = 3' and try again.

Forgot the most important bit for troubleshooting.

Quote:
Given the information available, my guess is that A2B can't find a route to either or both of the numbers in question.

The system dials my landline "441212121212" but for some reason it just disconnects the calls within a couple seconds of me answering.

Quote:
Are you sure you need the CLI rewrite lines in your Asterisk dialplan? By default they are commented out, and serve only as an example of how you could rewrite the CLI if you really need to.

The callerId comes in from Magrathea as 01 or 02 so I just thought it would have been easier to use e164 format for all numbers.

Also, when I click on "Show Callbacks" in the Admin Interface the Callback is listed there. I clicked edit so you can see the detail in the screenshot below.

regards,

Sammy


Attachments:
callback-sreen.jpg
callback-sreen.jpg [ 64.66 KiB | Viewed 8422 times ]
call-back-log.txt [12.61 KiB]
Downloaded 452 times
Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2008 5:11 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Quote:
a2billing.php|4|callback: file:a2billing.php - line:713 - [CALLBACK]:[NO ANSWER CALL]
I'm not certain, but I think this might not be helping you. Try setting 'answer_call = yes' instead.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2008 5:23 pm 
Offline

Joined: Sun Nov 23, 2008 2:39 pm
Posts: 45
stavros wrote:
Quote:
a2billing.php|4|callback: file:a2billing.php - line:713 - [CALLBACK]:[NO ANSWER CALL]
I'm not certain, but I think this might not be helping you. Try setting 'answer_call = yes' instead.


hmmm this is strange...answer_call is already set to YES!

It's also in my original post with agi_conf4.

regards,

Sammy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2008 5:25 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
See your [callback] section.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2008 5:59 pm 
Offline

Joined: Sun Nov 23, 2008 2:39 pm
Posts: 45
stavros wrote:
See your [callback] section.


Thanks for that...I overlooked that setting and the Web Callback is now working fine. I had to tweak the dialplan plan slightly as well here:

[a2billing-callback]
exten => _X.,1,Answer
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,DeadAGI(a2billing.php|4|callback)
exten => _X.,n,Hangup


CID Callback

I have made further progress with the CID callback. What happens now is that I would dial into the system. I get the call back and the prompt to enter my destination number, after entering my destination number the call just disconnects.

I have again tried to search for the solution on the forum and got some info from this post but I didn't want to go back too far since the A2billing may have changed alot during the last year.

My contexts are here:

[a2billing-cid-callback]
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,Wait(3)
exten => _X.,n,DeadAGI(a2billing.php|4|cid-callback|)
exten => _X.,n,Wait(60)

[a2billing-all-callback]
exten => _X.,1,Ringing()
exten => _X.,n,Set(CALLERID(num)=44${IF($[${CALLERID(num):0:1}=0]?${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,n,DeadAGI(a2billing.php|4|all-callback|)
exten => _X.,n,Wait(60)

I have attached my log again.

regards,

Sammy


Attachments:
File comment: log for CID Callback
callback_log2.txt [5.63 KiB]
Downloaded 600 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2008 7:57 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
sammy wrote:
I didn't want to go back too far since the A2billing may have changed alot during the last year.
v1.3.x are intentionally very similar; we try to introduce as few new bugs after the initial release as possible. The real changes come with major releases, such as the forthcoming v1.4.0.
Quote:
I have attached my log again.
With 'debug = 0' again possibly? Or, if I remember correctly, one leg of the callback doesn't give any debug information at all at the Asterisk console. Try looking in a2billing_agi.log as well.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 9:18 am 
Offline

Joined: Sun Nov 23, 2008 2:39 pm
Posts: 45
stavros wrote:
sammy wrote:
I didn't want to go back too far since the A2billing may have changed alot during the last year.
v1.3.x are intentionally very similar; we try to introduce as few new bugs after the initial release as possible. The real changes come with major releases, such as the forthcoming v1.4.0.

Ok...that's great, I also have a few recommendations on improving what is already a great product based on my experience with other systems which I will post in the appropriate forum.
stavros wrote:
Quote:
I have attached my log again.
With 'debug = 0' again possibly? Or, if I remember correctly, one leg of the callback doesn't give any debug information at all at the Asterisk console. Try looking in a2billing_agi.log as well.

My debug was set to 3 here but the CLI didn't give much more info.

After spending my night sifting through the forums I managed to get the CID Callback working. The problem appeared to be a DTMF problem.

I have a few remaining questions and I hope they haven't been covered elsewhere. If they are I apologise in advance:

1. If I dial a number and it is unavailable I just get the message below and the call abruptly disconnects.

== Everyone is busy/congested at this time (1:0/1/0)
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
-- AGI Script a2billing.php completed, returning 0

I tried to set number_try = 3 in my agi_conf4 so that the system would at least prompt for destination number again but that didn't work. I also enabled Say_Goodbye = Yes also and that doesn't seem to work either. I restarted Asterisk and that didn't help.

2. How to I set the caller Id to be the actual CallerId of the caller instead of the default 44123456 which shows up in every callback?

3. When I go into the Admin Interface to Show Calbacks all of the Callbacks are listed there including the successful ones. I could understand the failed ones remaining in there but the successful ones are still showing as "AGI PROCESSING". Is this correct?

Thanks for all your help

Sammy


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group