At 7:16 AM on 17 Sep 2009, Patrick wrote:

> I've one SIP trunk that support multiple DID. Only the trunk is
> documented in sip.conf (called DID is taken from the sip-header in
> real time).
> I would like to limit the number of simultaneous calls on each DID. Is
> there a way to achieve this ?

I think you could use GROUP() and GROUPCOUNT() for that.  I do that for
Queue calls currently, so each agent only gets one call at a time.  It
would go something like this (entirely untested):

[incoming]
exten => _X.,1,Set(DID=${EXTEN})
exten => _X.,n,GotoIf($[GROUP_COUNT(${DID})=0]?accept)
exten => _X.,n,Busy()

exten => _X.,n(accept),Set(GROUP()=${DID})
; Now let the call through as usual...
exten => _X.,n,Goto(mainmenu,s,1)

That puts each call into a group named by the DID, and returns Busy
if there is another call on the same DID.

-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to