Patrick
2009-Sep-17 05:16 UTC
[asterisk-users] limit concurrent calls on trunk supporting multiple DID
Hello guys, 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 ? My understanding is that the SIP configuration parameter "limitonpeers" will limit at the trunk level, right ? Thanks in advance Patrick
Alex Balashov
2009-Sep-17 05:51 UTC
[asterisk-users] limit concurrent calls on trunk supporting multiple DID
You can set some kind of counter in the dial plan, call an AGI script, use func_odbc to make database calls, or otherwise achieve this programatically. -- Sent from mobile device On Sep 17, 2009, at 1:16 AM, Patrick <asterisk-users at ict-synergy.be> wrote:> Hello guys, > > 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 ? > My understanding is that the SIP configuration parameter > "limitonpeers" will limit at the trunk level, right ? > > Thanks in advance > Patrick > > _______________________________________________ > -- 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
C. Chad Wallace
2009-Sep-18 00:11 UTC
[asterisk-users] limit concurrent calls on trunk supporting multiple DID
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090917/d414b9a8/attachment.pgp