Sbj; astcc.agi prepaid app allows numeric accounts, fails on alphanumeric accounts
Hello:
I have running Asterisk s/w pbx and astcc, a prepaid phone cards application available to work with it. In basic case, a phone or phone line on a zap channel, or an ip phone call will go through. Things function normally, even in CallerIdNumber based authentication for a call, when that account number is completely numeric and has the full configured length (number of digits).
The calls Fail, however, in a situation I want to use. First, the account number, caller ?number? part of caller id, username, account code, are computer keyboard alpha-numeric characters. Usually, software ip phones or other Asterisk servers can send these while regular telephone keypad input can not. Second, the number of characters may be less than as the account number length set in ?/var/lib/astcc/astcc-config.conf?.
Data base ?select? queries thru command line access to mysql, of the table for Cards, under these conditions, returns the requested info for the correct row. The column titled ?name? is Character(45) for its Mysql data type, not a integer / numeric data type.
The call attempt fails, with message ?your Card is Invalid - - Goodbye? ivr message from astcc.agi, though. This is so, despite Asterisk console output, started with asterisk -cgvvvvvvvvvvvv level of verbosity, showing that the ?card number? is both that which was sent as well as that which is defined on the corresponding row of database table.
In extensions.conf . . .
[thiscntx]
exten => _1X.,1,deadagi(${CALLERIDNUM}, ${EXTEN}, 0)
exten => _1X.,2,Hangup
Query
mysql > use astcc;
mysql > select number, length(number) from cards;
Example cases . . .
number . . . length(number)
15029876543 . . . 15
19372345678 . . . 15
bobntoms . . . . . . . 8
It is the last case which fails, while the first 2 succeed. How can things be set (configurations, or agi code patches) for the third case to also work?
Thank you in advance for assistance.
- - octimotor - - 3/17/2006;