Here is a small piece of dialplan which incorporates something like you want
to do. This would presumably be in your incoming context as early as
possible. 

Yours will be more complex because you want to constrain it by source. Of
course, if you just have different contexts for each, then it would be the
same in each context. 

Hope this helps. Watch out for the auto-linewrap compliments of Outlook on
line 4. 

rb

[IncomingCallPrep]
; called by each trunk on incoming call. checks a variety of incoming
; call setup functions, like max_trunk count, blacklist  etc.
exten =>
_X.,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(number)})}?blacklisted,s,
;
exten = _X.,n,Set(GROUP()=maxtrunks)
exten = _X.,n,NoOp(GROUP_COUNT is ${GROUP_COUNT(maxtrunks)})
exten = _X.,n,GotoIf($[${GROUP_COUNT(maxtrunks)} > ${MAX-TRUNKS}]?not-ok:ok)
;
; if more than Max_trunks in use, send to configured general mailbox
exten = _X.,n(not-ok),Voicemail(${GEN-MAILBOX},u)
exten = _X.,n,Hangup
exten = _X.,n,Return()
;
exten = _X.,n(ok),NoOp(anything else?)
exten = _X.,n,Return()

 
Ron Byer Jr.
NetWeave Integrated Solutions, Inc.
+1.732.786.8830 x120
 

-----Original Message-----
From: Damien Hull [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 6:06 PM
To: [EMAIL PROTECTED]; AstLinux Users Mailing List
Subject: Re: [Astlinux-users] Can I limit the number of incoming sip calls?

Looks like I need to get my self on an asterisk mailing list. Anyway, here's
more info.

1. I want to limit the number of concurrent incoming calls. 
2. One from the voip service or old school phone. 
3. One from a sip phone.


----- Original Message -----
From: "David Kerr" <[EMAIL PROTECTED]>
To: "AstLinux Users Mailing List" <astlinux-users@lists.sourceforge.net>
Sent: Wednesday, October 29, 2008 6:09:45 AM GMT -09:00 Alaska
Subject: Re: [Astlinux-users] Can I limit the number of incoming sip calls?


What are you assuming at the client? a softphone like X-Lite or something
embedded in the browser? 


Also, when you say limit number of incoming calls, do you mean simultaneous
channels, or total number over a period of time (like, max 10 a day)? 


If the client has a SIP softphone then it is easy to have it connect to your
astlinux box. I believe that it is also possible to limit the number of
simultaneous channels. 


David 


On Wed, Oct 29, 2008 at 4:25 AM, Damien Hull < [EMAIL PROTECTED] >
wrote: 


I have an AstLinux box with an incoming phone number. I would also like the
world to call me over the internet. Here's what I would like to do. 

1. Allow people on the net to call me on the AstLinux box 
2. Limit the number of incoming sip calls 
3. Send the incoming sip call to an IVR menu 

Can someone point me in the right direction? 

NOTE 
1. I can call the box 
2. I have a short IVR menu working 


------------------------------------------------------------------------- 
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge

Build the coolest Linux based applications with Moblin SDK & win great
prizes 
Grand prize is a trip for two to an Open Source event anywhere in the world 
http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
_______________________________________________ 
Astlinux-users mailing list 
Astlinux-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/astlinux-users 

Donations to support AstLinux are graciously accepted via PayPal to
[EMAIL PROTECTED] . 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to
[EMAIL PROTECTED]

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.549 / Virus Database: 270.8.4/1753 - Release Date: 10/28/2008
9:20 PM
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to