Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 4:46 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Prompt for PIN if CID is not in the database
PostPosted: Mon Sep 17, 2012 3:18 pm 
Offline

Joined: Wed May 26, 2010 5:39 pm
Posts: 30
Hi,

1) In my callback configuration, if a users CID is in the database, everything works fine except the phone keeps ringing. User does not get a hang-up. He has to hangup himself before callback is triggered. How can I fix this?

2) Also, if the user's CID is not in the database I want A2B to callback, ask for the PIN number (only once) and add the CID to the PIN for future CID authentication. I see these features in the agi conf but I just can't get it work.

In the agi conf I have :

auto_setcallerid =yes
cid_sanitize =no
cid_enable =yes
cid_askpincode_ifnot_callerid =yes
cid_auto_assign_card_to_cid =yes
callerid_authentication_over_cardnumber=no

Any help?


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Tue Sep 18, 2012 7:58 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Callback works differently to calling cards, so some of the features are not relavent.

The ringing issue may be something to do with your origination provider as they try different carriers to pass the call. You could construct the dialplan to ring three times, then issue a hangup and see if that helps.

There are two types of callback relavant here, all-callback will callback whether or not the caller ID is in A2Billing, then prompt for PIN, CID-Callback will only callback if the the CID is in the database.

You should create a signup procedure to ensure that the CID is in the database before allowing callback. One of the ways of doing this is to set up a calling card access number that the customer has to call first (and once only) to register their CID to their PIN.

Joe


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Fri Sep 21, 2012 6:02 pm 
Offline

Joined: Wed May 26, 2010 5:39 pm
Posts: 30
Quote:
You should create a signup procedure to ensure that the CID is in the database before allowing callback. One of the ways of doing this is to set up a calling card access number that the customer has to call first (and once only) to register their CID to their PIN.


Hi Joe,

Can you give me some tips on how to do this. Is it straightforward by using an agiconfig such as the the one I use for the calling card?

Burak


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Fri Sep 21, 2012 6:07 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Quote:
Is it straightforward by using an agiconfig such as the the one I use for the calling card?

Yes, exactly the same.

Joe


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Sat Sep 22, 2012 11:27 pm 
Offline

Joined: Wed May 26, 2010 5:39 pm
Posts: 30
Hi Joe,

I have worked on 2 scenarios:

1) I have used a seperate access number and created an agi config for CID registraion. Only once, card user will call this number for CID registration. If CID is present, it hangs up. If not, it asks for the PIN number, records the CID to that PIN and hangs up. Works nicely. After registration, now the user must call the CID callback trigger number. If the caller ID is registered, system will call back, if not, it does not. This was what you suggested.

2) I have created an agi config for allcallback. I also selected the parameters so that when a user calls, whether or not the cid is present, system will call back (hence all callback). When the system calls back, it ALWAYS asks for PIN, no matter if the CID is already in there. I also selected for the CID ıf the user to be stored to the entered PIN, but it is not stored. The user has to enter the PIN every time. There is no CID authentication.

I understand that this is the nornal operation. In other words, cid_enable , cid_askpincode_ifnot_callerid and cid_auto_assign_card_to_cid seem to be irrelevant with All Callback. Is this correct?

What I am trying to accomplish is:

Everyone who calls the callback access number gets called back, if CID is present, system will directly ask for destination. If CID is not present, it will prompt for PIN, Authenticate and bind the CID, then ask for the destination. Next time the user calls, it will be authenticated automatically from the caller ID.

As far as I understand, I can't get it to work that way.

Please advise.

Thanks,

Burak


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Fri Sep 28, 2012 9:26 am 
Offline

Joined: Fri Dec 17, 2010 12:17 pm
Posts: 20
Hello

I get what you want to do working by verifying in the dialplan if the CID is in the database.
If the database request find the CID we go to a2billing-all-callback context, if not we go to a2billing-cid-callback context:

Code:
;### We test if CID is in the database or not :
exten => 05xxxxxxxxxx,n,MYSQL(Connect connid 127.0.0.1 a2billinguser a2b_password a2b_database)
exten => 05xxxxxxxxxx,n,MYSQL(Query resultid ${connid} SELECT cc_callerid.cid FROM cc_callerid WHERE cc_callerid.cid = ${CALLERID(number)})
exten => 05xxxxxxxxxx,n,MYSQL(Fetch fetchid ${resultid} callernumber)
exten => 05xxxxxxxxxx,n,MYSQL(Clear ${resultid})
exten => 05xxxxxxxxxx,n,MYSQL(Disconnect ${connid})
exten => 05xxxxxxxxxx,n,GotoIf($["${CALLERID(number)}" = "${callernumber}"]?cidcall:allcall)

;### ALL-CALLBACK
exten => 05xxxxxxxxxx,n(allcall),Goto(a2billing-all-callback,${CALLERID(num)},1)
exten => 05xxxxxxxxxx,n,Hangup(38)

;### CID-CALLBACK
exten => 05xxxxxxxxxx,n(cidcall),Goto(a2billing-cid-callback,${CALLERID(num)},1)
exten => 05xxxxxxxxxx,n,Wait(8)
exten => 05xxxxxxxxxx,n,Hangup(38)


By the way can you tell me how do you set up the seperate access number and create an agi config for CID registraion ?
Thanks,

chab


Top
 Profile  
 
 Post subject: Re: Prompt for PIN if CID is not in the database
PostPosted: Fri Sep 28, 2012 8:10 pm 
Offline

Joined: Wed May 26, 2010 5:39 pm
Posts: 30
Hi chab,

Here is what I have been able to work out with the code you suggested (modified).

Code:
[custom-a2billing-cid-callback-tr]
;### Inbound callback scenario (menu language TR)
;### We normalize the CallerID to the standard form (countrycode-areacode-phonenumber).
;### In case we receive a national call (starting with one zero), we add the country code "90"
exten => _X.,1,Set(CALLERID(num)=${IF($[${CALLERID(num):0:2}=00]?${CALLERID(num):2}:${CALLERID(num)})})
exten => _X.,2,Set(CALLERID(num)=${IF($[${CALLERID(num):0:1}=0]?90${CALLERID(num):1}:${CALLERID(num)})})
exten => _X.,3,Set(CALLERID(num)=${IF($[${LEN(${CALLERID(num)})}=7]?90216${CALLERID(num):1}:${CALLERID(num)})})

;### We test if CID is in the database or not :
exten => _X.,n,MYSQL(Connect connid 127.0.0.1 user pass database)
exten => _X.,n,MYSQL(Query resultid ${connid} SELECT cc_callerid.cid FROM cc_callerid WHERE cc_callerid.cid = ${CALLERID(num)})
exten => _X.,n,MYSQL(Fetch fetchid ${resultid} callernumber)
exten => _X.,n,MYSQL(Clear ${resultid})
exten => _X.,n,MYSQL(Disconnect ${connid})
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "${callernumber}"]?cidcallback:cidregister)

;### CID REGISTER
exten => _X.,n(cidregister),Answer
exten => _X.,n,Wait(1)
exten => _x.,n,DeadAgi(a2billing.php|11)
exten => _x.,n,Hangup

;### CID CALLBACK
exten => _X.,n(cidcallback),DeadAgi(a2billing.php|8|cid-callback|)
exten => _X.,n,Hangup


In this scenario, we have 3 cid callback trigger did's set as inbound routes with 3 different agiconf's with 3 menu languages.
agi-conf8 is a CID-Callback agi, with menu language TR.
agi-conf11 is a Callthrough agi.

Here is what happens:
The trigger DID for CID Callback in menu language TR receives a call,
The call passes to custom destination: custom-a2billing-cid-callback-tr
I choose to normalize all numbers to standard form.
Then I test if CID is in the database or not.
- If the number is there, I start a cid callback by calling DeadAgi(a2billing.php|8|cid-callback|) and exit.
- If the number is not there, I prompt for the card number and store the CID in the database by calling DeadAgi(a2billing.php|11) and exit.

In this way, when our cid callback did's are called, we either
- pass the call to cid registration, let the user dial the card number, register the callerid to the card and hang-up (next time user can start a cid callback without having to re-enter the card number).
- or check that cid exists in the database, skip registration and initiate a cid callback directly.

This saves us a seperate number for cid registration (the trigger did's are used both for registration and callback), but initial registration and then first callback call are two seperate calls.

It would have been lovely to start the callback call immediately after the registration on the first call though. Any suggestions how I can do that? In other words, I'd like to continue with

;### CID CALLBACK
after ;### CID REGISTER without hanging up.

or do something like:

exten => _x.,n,DeadAgi(a2billing.php|11)
exten => _X.,n,DeadAgi(a2billing.php|8|cid-callback|)
exten => _X.,n,Hangup

Would this be possible at all?

By the way, with your code, if CID is in the database, we do a CID callback, but if CID is not there, we do ALL callback, asking for the PIN. However, ALL callback does not support entering the PIN in the database when the user is authenticated, so if the CID is not initially in the database, it will never be there unless entered by an operator manually, right?


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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