diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 09:10:56 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 09:10:56 +0000 |
commit | 762e166239d313a081568fca41f02f5788fd65e2 (patch) | |
tree | 1fad5d3d2470503e4f8ccea8567f7fb9b0886517 | |
parent | 27f789a6796f326105c5a8b1d72716bb30401ad5 (diff) |
- Remove "incominglimit" as a configuration option in sip.conf
- Add documentation on call-limit, explaining that there's two counters
for a type="friend".
- Document the removval of "incominglimit" in UPGRADE.txt
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7775 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | UPGRADE.txt | 3 | ||||
-rw-r--r-- | channels/chan_sip.c | 13 | ||||
-rw-r--r-- | configs/sip.conf.sample | 10 |
3 files changed, 21 insertions, 5 deletions
diff --git a/UPGRADE.txt b/UPGRADE.txt index 27c9a0cb8..a0b81f800 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -26,3 +26,6 @@ Variables: functions. You are encouraged to move towards the associated dialplan function, as these variables will be removed in a future release. +The SIP channel: + +* The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf. diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ba433e922..782a952ae 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2177,8 +2177,15 @@ static void __sip_destroy(struct sip_pvt *p, int lockowner) } /*! \brief update_call_counter: Handle call_limit for SIP users - * Note: This is going to be replaced by app_groupcount - * Thought: For realtime, we should propably update storage with inuse counter... */ + * Setting a call-limit will cause calls above the limit not to be accepted. + * + * Remember that for a type=friend, there's one limit for the user and + * another for the peer, not a combined call limit. + * This will cause unexpected behaviour in subscriptions, since a "friend" + * is *two* devices in Asterisk, not one. + * + * Thought: For realtime, we should propably update storage with inuse counter... + */ static int update_call_counter(struct sip_pvt *fup, int event) { char name[256]; @@ -11888,7 +11895,7 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, int ast_copy_string(user->musicclass, v->value, sizeof(user->musicclass)); } else if (!strcasecmp(v->name, "accountcode")) { ast_copy_string(user->accountcode, v->value, sizeof(user->accountcode)); - } else if (!strcasecmp(v->name, "call-limit") || !strcasecmp(v->name, "incominglimit")) { + } else if (!strcasecmp(v->name, "call-limit")) { user->call_limit = atoi(v->value); if (user->call_limit < 0) user->call_limit = 0; diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample index e063cdcfb..3452b77f6 100644 --- a/configs/sip.conf.sample +++ b/configs/sip.conf.sample @@ -348,9 +348,15 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone ;call-limit=1 ; permit only 1 outgoing call and 1 incoming call at a time ; from the phone to asterisk - ; (1 for the explicit peer, 1 for the explicit user, + ; 1 for the explicit peer, 1 for the explicit user, ; remember that a friend equals 1 peer and 1 user in - ; memory) + ; memory + ; This will affect your subscriptions as well. + ; There is no combined call counter for a "friend" + ; so there's currently no way in sip.conf to limit + ; to one inbound or outbound call per phone. Use + ; the group counters in the dial plan for that. + ; ;mailbox=1234@default ; mailbox 1234 in voicemail context "default" ;disallow=all ; need to disallow=all before we can use allow= ;allow=ulaw ; Note: In user sections the order of codecs |