[Asterisk-Users] ASTCC: How to reset "in-use" flag automatically ?
Ronald Wiplinger
ronald at elmit.com
Wed Apr 5 06:29:41 MST 2006
JP Carballo wrote:
> Ronald Wiplinger wrote:
>
>>> Insert this in astcc.agi; anywhere after the calls for it to load
>>> and connect to the db.
I tried now many places to put these lines in. The system still
announces "This card number is in use".
Can you give me a place where to put it in?
bye
Ronald Wiplinger
>>>
>>> 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.
>
More information about the asterisk-users
mailing list