I have not used astcc with pin codes so far, since I set-up the phone number as card number. Some of my users want now to dial in to the system and than use their card, which is their phone number. For that I would need a way of authentication, like a pin. I want to use something like: What is your card number: <user keys in the number> Enter your pin: <user enter a long pin> Enter your destination phone number: <user enters the destination phone number> Is there a code snip available for that? Keyin needs always more time, we need to allow longer spaces between the digits, therefore we need to allow the # to finish the dialstring faster. I wonder if we can use one dialstring for all: cardnumber*pin*destination-number How can a user end the call and dial a new number, without hanging up? The user has usually a desk phone (=card number), and this dialin should work parallel, but of course it assumes still that only one card is in use. bye Ronald Wiplinger
Ronald Wiplinger wrote:> I have not used astcc with pin codes so far, since I set-up the phone > number as card number. > > Some of my users want now to dial in to the system and than use their > card, which is their phone number. > For that I would need a way of authentication, like a pin. > > I want to use something like: > What is your card number: <user keys in the number> > Enter your pin: <user enter a long pin> > Enter your destination phone number: <user enters the destination > phone number> > > Is there a code snip available for that? > > Keyin needs always more time, we need to allow longer spaces between > the digits, therefore we need to allow the # to finish the dialstring > faster. I wonder if we can use one dialstring for all: > cardnumber*pin*destination-number > > How can a user end the call and dial a new number, without hanging up? > > The user has usually a desk phone (=card number), and this dialin > should work parallel, but of course it assumes still that only one > card is in use. > > > bye > > Ronald WiplingerI tried now the examples in the wiki, but they do not fit!!! If I use in configure Require Pins Yes then everyone needs a pin code! If I use in configure Require Pins NO then calling in people will just need to know a valid card number!!! How can I overcome this? How can I re-write: exten => _77.,1,Answer exten => _77.,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN:2},3) exten => _77.,3,Hangup sothat the dialstring: 77*123456789012*159753*011886939775516 would be splitted into: ${CARDNUM}=123456789012 ${PIN}=159753 ${DESTINATION}=0118869397755516 with a mysql lookup of the cardnum in astcc get the pin and compare to the given pin. If all is ok, than use the dial command ???? bye Ronald Wiplinger
Ronald Wiplinger wrote:> I want to use something like: > What is your card number: <user keys in the number> > Enter your pin: <user enter a long pin> > Enter your destination phone number: <user enters the destination > phone number> > > Is there a code snip available for that?Not that I know of. Just juggle the way the routines are called. Everything you need (or most of them anyway) is in the code.> > Keyin needs always more time, we need to allow longer spaces between > the digits, therefore we need to allow the # to finish the dialstring > faster. I wonder if we can use one dialstring for all: > cardnumber*pin*destination-numberIf you need a partial *anything*, be it a pin or a card number, you can use the perl routine substr() to retrieve as many characters of the string as you need.> > How can a user end the call and dial a new number, without hanging up? >In my system, the user just presses "*" and they get dumped back into the IVR. Since the current cardnumber is stored in a variable, it does not need to be entered again to make another call.> The user has usually a desk phone (=card number), and this dialin > should work parallel, but of course it assumes still that only one > card is in use.-- JP Carballo http://www.netfone2x.com Bringing the world closer. It might look like I'm doing nothing, but at the cellular level, I'm really quite busy.
> > [paygo-forward] > > exten => _1NXXNXXXXXX,1,Set(CALLERID(all)=${CALLING}) > > exten => _1NXXNXXXXXX,2,Playback(pls-hold-while-try) > > exten => _1NXXNXXXXXX,3,DeadAGI(astcc.agi,${CARDNO},${TEMP},4) > > exten => _1NXXNXXXXXX,4,Hangup > > ${CALLING},${CARDNO},${TEMP} are coming from an inbound context > > In my case they don't always. If it is an call from my system, local or > remote phone, I have the caller-id, but if the user call into the system > via PSTN, than I do not get the caller-id!You can control then from the dialplan: [from-pstn] ; full interrogation exten => 1231231234,1,DeadAGI(astcc-disa.agi) exten => 1231231234,2,Hangup [from-internal-outbound] exten => _1NXXNXXXXXX,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4); or 5 exten => _1NXXNXXXXXX,2,Hangup> My idea was not to check if PIN=YES, but the name of the agi. > if the astcc.agi is used, than treat it as PIN=NO > if the astcc-disa is used, than treat it as PIN=YESSee above> I have added in my astcc.agi different rates according to the card number. > I would need to do this twice! My solution does not need me to make it > twice.In the astcc.agi I would use my $sth = $dbh->prepare("SELECT * FROM routes WHERE " . $dbh->quote($number) . " RLIKE pattern ORDER BY LENGTH(pattern) DESC"); I'd create a table routes_special with the same scheme as routes and put my special prices there. Then in astcc-disa.agi my $sth = $dbh->prepare("SELECT * FROM routes_special WHERE " . $dbh->quote($number) . " RLIKE pattern ORDER BY LENGTH(pattern) DESC"); Cheers, Benchev