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

JP Carballo lists at netfone2x.com
Tue Apr 4 22:48:24 MST 2006


Ronald Wiplinger wrote:

> I have some troubles with ASTCC. TOOOOO often the "in-use" flag 
> remains set.
>
> I would like to find a solution, where astcc.agi checks automatically 
> if THIS user is in a call rather than to check the flag.
>
> If that is not possible, I would like to have an extension to dial to, 
> and it will after hang up, reset the flag!
>
> The in-use flag remains set, if the caller hang up before the gateway 
> gets the call.


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.

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