Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 7:58 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: CID Callback not calling back
PostPosted: Tue Jun 03, 2008 12:50 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Hi,
I have problem with CID callback but web UI callback is working. I read other thread but I can't find an answer for my case.

My scenario: I want customer (CID 416XXXXXXX) to call 403XXXXXXX and they get busy signal then A2Billing call back the 416XXXXXXX and start calling card process.

The number 403XXXXXXX is belong to SIP/11278XXXXX trunk.

My inbound route (FreePBX) for 403XXXXXXX go to a2billing-cid-callback,${EXTEN},1

My extension_a2billing.conf
Code:
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup

[a2billing-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|callback)
exten => _X.,n,Hangup

[a2billing-cid-callback
exten => _X.,1,DeadAGI(a2billing.php|1|cid-callback|1) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-all-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|all-callback|1) ;last parameter is the callback area code
exten => _X.,n,Hangup   

[a2billing-predictivedialer]
exten => _X.,1,DeadAGI(a2billing.php|1|predictivedialer)   
exten => _X.,n,Hangup

[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php|1|did)
exten => _X.,2,Hangup

[a2billing-voucher]
exten => _X.,1,DeadAGI(a2billing.php|1|voucher)
;exten => _X.,1,DeadAGI(a2billing.php|1|voucher|44) ; will add 44 in front of the callerID for the CID authentication
exten => _X.,n,Hangup


And Asterisk Log file:
Code:
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Executing [4034566260@from-trunk:1] Set("SIP/11278XXXXX-08e1b5f0", "__FROM_DID=403XXXXXXX") in new stack
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Executing [4034566260@from-trunk:2] GotoIf("SIP/11278XXXXX-08e1b5f0", "1 ?cidok") in new stack
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Goto (from-trunk,403XXXXXXX,4)
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Executing [403XXXXXXX@from-trunk:4] NoOp("SIP/11278XXXXX-08e1b5f0", "CallerID is "Toronto,ON" <1416XXXXXXX>") in new stack
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Executing [403XXXXXXX@from-trunk:5] Goto("SIP/11278XXXXX-08e1b5f0", "a2billing-cid-callback|403XXXXXXX|1") in new stack
[Jun 2 18:20:42] VERBOSE[21245] logger.c: -- Goto (a2billing-cid-callback,403XXXXXXX,1)
[Jun 2 18:20:42] WARNING[21245] pbx.c: Channel 'SIP/11278XXXXX-08e1b5f0' sent into invalid extension '403XXXXXXX' in context 'a2billing-cid-callback', but no invalid handler
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Executing [403XXXXXXX@from-trunk:1] Set("SIP/11278XXXXX-08e237d0", "__FROM_DID=403XXXXXXX") in new stack
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Executing [403XXXXXXX@from-trunk:2] GotoIf("SIP/11278XXXXX-08e237d0", "1 ?cidok") in new stack
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Goto (from-trunk,403XXXXXXX,4)
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Executing [403XXXXXXX@from-trunk:4] NoOp("SIP/11278XXXXX-08e237d0", "CallerID is "Toronto,ON" <1416XXXXXXX>") in new stack
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Executing [403XXXXXXX@from-trunk:5] Goto("SIP/11278XXXXX-08e237d0", "a2billing-cid-callback|403XXXXXXX|1") in new stack
[Jun 2 18:20:43] VERBOSE[21246] logger.c: -- Goto (a2billing-cid-callback,403XXXXXXX,1)
[Jun 2 18:20:43] WARNING[21246] pbx.c: Channel 'SIP/11278XXXXX-08e237d0' sent into invalid extension '403XXXXXXX' in context 'a2billing-cid-callback', but no invalid handler


Thank you,
Sukasem


Top
 Profile  
 
 Post subject: Re: CID Callback not calling back
PostPosted: Tue Jun 03, 2008 1:09 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
sukasem wrote:
[a2billing-cid-callback
You're missing a ] at the end of this line.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 1:25 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Thank you Stavros,

I add that but still the same. Do I have to restart the system or just reload in freepbx?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 2:13 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I'm not intimate with FreePBX, but from what I understand a reload should suffice.
Perhaps carefully reading the Asterisk console output might point to other problems. In particular check that it's actually loading your a2billing-* contexts:
Code:
# asterisk -r
asterisk*CLI> core set verbose 15
asterisk*CLI> dialplan reload
Are you sure exactly the same error is causing the callback to fail? I can see that you're adding 1 to the received CLI when launching A2B so you'll need to add both 416 and 1416 CLIs to the customer's account.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 3:02 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
It seems asterisk did not load a2billing-* context. So, I cut & paste them in the extensions.conf and restart computer.

It doesn't produce the same error now but still NO CALLBACK.

I also run "service a2billing-callback-daemon start" and got status OK but still have no luck.

Thank again Stavros,

EDIT: REMOVED


Last edited by sukasem on Tue Jun 03, 2008 3:37 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 3:12 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
If you need to show us lengthy debug logs please attach them as .txt files in future, as the thread rapidly becomes difficult to read with huge messages.

What you posted shows that the callback was successfully queued. The "Manager 'admin' logged in" might be standard FreePBX/Trixbox stuff, or it might mean that the callback was attempted but failed.

See the Callback section of the Admin interface to see the status of the queued callbacks, and also the digits they will dial to your carrier.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 3:42 am 
Offline

Joined: Tue Jun 03, 2008 12:26 am
Posts: 29
Sorry about that,

Here is a2billing_agi.log
Code:
[02/06/2008 20:55:36]:[file:a2billing.php - line:429]:[CallerID:4036711190]:[CN:5879110864]:[[TRY : callingcard_ivr_authenticate]]
[02/06/2008 20:55:36]:[file:a2billing.php - line:440]:[CallerID:4036711190]:[CN:5879110864]:[[destination: - 14036711190]]
[02/06/2008 20:55:36]:[file:Class.RateEngine.php - line:73]:[CallerID:4036711190]:[CN:5879110864]:[[CC_asterisk_rate-engine: (1, 14036711190)]]
[02/06/2008 20:55:36]:[file:Class.RateEngine.php - line:122]:[CallerID:4036711190]:[CN:5879110864]:[[CC_asterisk_rate-engine: CALLERID]
4036711190
]
[02/06/2008 20:55:36]:[file:Class.RateEngine.php - line:136]:[CallerID:4036711190]:[CN:5879110864]:[[CALLERID_QUERY]
SELECT count(calleridprefix) FROM cc_tariffplan RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=1 WHERE calleridprefix=SUBSTRING('4036711190',1,length(calleridprefix))
[RESULT]Array
(
[0] => Array
(
[0] => 0
[count(calleridprefix)] => 0
)
)
]
[02/06/2008 20:55:36]:[file:Class.RateEngine.php - line:184]:[CallerID:4036711190]:[CN:5879110864]:[[RATE ENGINE QUERY]
SELECT
tariffgroupname, lcrtype, idtariffgroup, cc_tariffgroup_plan.idtariffplan, tariffname, destination,
cc_ratecard.id,   dialprefix, destination, buyrate, buyrateinitblock, buyrateincrement, rateinitial, initblock, billingblock,
connectcharge, disconnectcharge, stepchargea, chargea, timechargea, billingblocka, stepchargeb, chargeb,
timechargeb, billingblockb, stepchargec, chargec, timechargec, billingblockc,
cc_tariffplan.id_trunk AS tp_id_trunk, tp_trunk.trunkprefix AS tp_trunk, tp_trunk.providertech AS tp_providertech,
tp_trunk.providerip AS tp_providerip, tp_trunk.removeprefix AS tp_removeprefix,
cc_ratecard.id_trunk AS rc_id_trunk, rt_trunk.trunkprefix AS rc_trunkprefix, rt_trunk.providertech AS rc_providertech,
rt_trunk.providerip AS rc_providerip, rt_trunk.removeprefix AS rc_removeprefix, musiconhold,
tp_trunk.failover_trunk AS tp_failover_trunk, rt_trunk.failover_trunk AS rt_failover_trunk,
tp_trunk.addparameter AS tp_addparameter_trunk, rt_trunk.addparameter AS rt_addparameter_trunk, id_outbound_cidgroup,
freetimetocall_package_offer, freetimetocall, packagetype, billingtype, startday, id_cc_package_offer
FROM cc_tariffgroup
RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=cc_tariffgroup.id
INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan )
LEFT JOIN cc_ratecard ON cc_ratecard.idtariffplan=cc_tariffplan.id
LEFT JOIN cc_trunk AS rt_trunk ON cc_ratecard.id_trunk=rt_trunk.id_trunk
LEFT JOIN cc_trunk AS tp_trunk ON cc_tariffplan.id_trunk=tp_trunk.id_trunk
LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer
WHERE cc_tariffgroup.id=1 AND (dialprefix='14036711190' OR dialprefix='1403671119' OR dialprefix='140367111' OR dialprefix='14036711' OR dialprefix='1403671' OR dialprefix='140367' OR dialprefix='14036' OR dialprefix='1403' OR dialprefix='140' OR dialprefix='14' OR dialprefix='1' OR dialprefix='defaultprefix')
AND startingdate<= CURRENT_TIMESTAMP AND (expirationdate > CURRENT_TIMESTAMP OR expirationdate IS NULL OR LENGTH(expirationdate)<5)
AND startdate<= CURRENT_TIMESTAMP AND (stopdate > CURRENT_TIMESTAMP OR stopdate IS NULL OR LENGTH(stopdate)<5)
AND (starttime <= 1255 AND endtime >=1255)
AND idtariffgroup='1'
AND ( dnidprefix=SUBSTRING('14036711190',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = 0))
AND ( calleridprefix=SUBSTRING('4036711190',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = 0))
ORDER BY LENGTH(dialprefix) DESC
]
[02/06/2008 20:55:36]:[file:a2billing.php - line:444]:[CallerID:4036711190]:[CN:5879110864]:[[resfindrate: - 0]]
[02/06/2008 20:55:36]:[file:a2billing.php - line:547]:[CallerID:4036711190]:[CN:5879110864]:[[CALLBACK-CALLERID : CALLED=14036711190 | Error : There is no route to call back your phonenumber !!!]]
[02/06/2008 20:55:36]:[file:Class.A2Billing.php - line:654]:[CallerID:4036711190]:[CN:5879110864]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='5879110864']]
[02/06/2008 20:55:36]:[CallerID:4036711190]:[CN:5879110864]:[[exit]]


It said no route to call 14036711190. Hmmm, I have outbound route for 1|NXXNXXXXXX. Oh I goto Callback section in WebUI but no pending callback shown. there has only the one that I test web callback.

Thank you,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 12:47 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
sukasem wrote:
It said no route to call 14036711190. Hmmm, I have outbound route for 1|NXXNXXXXXX.
That looks very much like a FreePBX thing; it immaterial. Your A2Billing ratecards must match the destination in question, which they currently don't.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 10:56 pm 
Offline

Joined: Tue Feb 19, 2008 8:45 pm
Posts: 31
i try to add dtmfmode=RFC2833 to the asterisk configuration
but it doesnt get better...

what could i do to fix this problem...

i have a lack of ideas...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 11:10 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Use a better carrier.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
Auto Dialer Software


All times are UTC


Who is online

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