[Asterisk-Users] ASTCC: How to reset "in-use" flag automatically ?
JP Carballo
lists at netfone2x.com
Fri Apr 7 10:13:49 MST 2006
Ronald Wiplinger wrote:
> #
> # At this point we have a valid card and pin number.
> #
>
> if ($phoneno eq "RESET_INUSE") {
> &setinuse($carddata->{number}, 0);
> exit(0);
> }
>
> &checkexpired($carddata->{number});
> &checkinuse($carddata->{number});
> &setinuse($carddata->{number}, 1);
>
>
> I put this into 682 in the extensions.conf
> exten => 681,1,DeadAGI(astcc.agi,${CALLERID(num)},BALANCE,1)
> exten => 681,2,Hangup
> exten => 682,1,DeadAGI(astcc.agi,${CALLERID(num)},RESET_INUSE,2)
> exten => 682,2,Hangup
>
> As soon the flag is set, 682 will also tell you: The card number is in
> use, try later !!!!!
>
> What do I miss?
>
There could be a call to checkinuse() before the RESET_INUSE routine.
If the RESET_INUSE flag is set, the routine should exit and not proceed
to the following calls to
&checkexpired()
&checkinuse() and
&setinuse()
I suggest you check that the callerid you are using matches a card in
the astcc db.
--
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.
More information about the asterisk-users
mailing list