[asterisk-users] Call limit per sip account user.
Alex Balashov
abalashov at evaristesys.com
Wed May 23 13:46:02 MST 2007
Hi Jonson,
On Wed, 23 May 2007, Jonson Player said something to this effect:
> Hello, I want to limit calls per sip account user. How may I realize this
> setting? For example I want to limit to 10 min all possible calls from an
> account or to limit external calls to 10 min and local call remain
> unlimited. Thank you for support guys.
Take a look at the 'L' option to the Dial() application:
http://www.voip-info.org/wiki-Asterisk+cmd+Dial
---
# L(x[:y][:z]): Limit the call to 'x' ms, warning when 'y' ms are left,
repeated every 'z' ms) Only 'x' is required, 'y' and 'z' are optional. The
following special variables are optional for limit calls: (pasted from
app_dial.c)
* LIMIT_PLAYAUDIO_CALLER - yes|no (default yes) - Play sounds to
the caller.
* LIMIT_PLAYAUDIO_CALLEE - yes|no - Play sounds to the callee.
* LIMIT_TIMEOUT_FILE - File to play when time is up.
* LIMIT_CONNECT_FILE - File to play when call begins.
* LIMIT_WARNING_FILE - File to play as warning if 'y' is defined. If
LIMIT_WARNING_FILE is not defined, then the default behaviour is to
announce ("You have [XX minutes] YY seconds").
---
You can use this for inbound and outbound calls, I imagine, because
even calls that get internally routed are so routed by means of the
Dial() command, which means you can set the limit on an inbound leg.
Hope that helps.
-- Alex
--
Alex Balashov <sasha at presidium.org>
More information about the asterisk-users
mailing list