[Asterisk-Users] ASTCC: How to reset "in-use" flag automatically ?

JP Carballo lists at netfone2x.com
Wed Apr 5 00:16:59 MST 2006


Ronald Wiplinger wrote:

>> Insert this in astcc.agi; anywhere after the calls for it to load and 
>> connect to the db.
>>
>> if ($phoneno eq "RESET_INUSE") {
>>    &setinuse($carddata->{number}, 0);
>>    exit(0);
>> }
>>
>> And this in extensions.conf:
>>
>> exten => s,n,DeadAGI(astcc.agi,${CARDNO},RESET_INUSE,2)
>>
>> I leave it to you to capture ${CARDNO} :)
>>
>> I don't enable this in the IVR unless the person has entered a valid 
>> account number, for obvious reasons.
>>
>
> Wouldn't that totally disable inuse??? It would be possible that a 
> user uses two or more soft phones and make phone calls on multiple 
> places!
>
Nope. I don't want that to happen either.
Because the 2nd argument is normally the phone number to call, the test 
will be false and the routine will be skipped if the customer intends to 
call.
Besides, if the routine does evaluate to true, it will exit the agi and 
not process any calls anyway.

Set this up as a separate extension that you can call if an account is 
locked in use.
I've only ever used this when testing new trunks because an account with 
the inuse flag set means the previous call ended prematurely.

In my case, I want customers to make one and only one call at a time so 
I left the inuse handling mostly intact.
I want it to be anal.
If a customer complains about it, I'm more worried about a trunk failing 
than a cheating caller.

-- 
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