[Asterisk-Users] Hunting S(n)IPs

willy at yponeinc.com willy at yponeinc.com
Mon Apr 12 16:42:34 MST 2004


Hi Akk,
If this has been discussed/done then apologies be-4-hand.  I
did not find it in the Wiki or the Archives.  Here's the
question.
We have incoming PRI lines, all on the same main number.  An
attendant is supposed to handle all incoming calls.  Now,
let's say I have a multi-line SIP phone.  For argument's
sake (and to keep it simple) say I only have two lines.
We'll call them SIP/att-0 and SIP/att-1. Here's the desired
behavior:
Call comes in.  Gets to Dial(SIP/att-0)
Other call comes in b4 first one is answered.  Gets to
Dial(SIP/att-1)
Or, if Line-0 is busy (however) I still want to ring line-1.
Kinda-like a hunt group. The problem I am having is that I
cannot find out (real-time - in the dial plan) whether a
particular channel is already in use.  Otherwise a GotIf()
might do the trick. I tried to set a parameter in the DB to
indicate that a chan is in use, e.g. 
exten => s,1,DBPut(inuse/chan${ARG1}=1)
exten => s,2,Dial(SIP/att-${ARG1})
however, I do not seem to be able to catch the event wich
releases the channel in order to reset the DB variable. 
exten => h,1,DCPut(inuse/chan${ARG1}=0)  ; this never gets
executed

Any ideas?
Cheers,
WW

Willy Wouters
ypOne Publishing




More information about the asterisk-users mailing list