[asterisk-commits] trunk - r7775 in /trunk: UPGRADE.txt channels/chan_sip.c configs/sip.conf.sample

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 4 03:10:59 CST 2006


Author: oej
Date: Wed Jan  4 03:10:56 2006
New Revision: 7775

URL: http://svn.digium.com/view/asterisk?rev=7775&view=rev
Log:
- 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


Modified:
    trunk/UPGRADE.txt
    trunk/channels/chan_sip.c
    trunk/configs/sip.conf.sample

Modified: trunk/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/trunk/UPGRADE.txt?rev=7775&r1=7774&r2=7775&view=diff
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Wed Jan  4 03:10:56 2006
@@ -26,3 +26,6 @@
   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.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=7775&r1=7774&r2=7775&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan  4 03:10:56 2006
@@ -2177,8 +2177,15 @@
 }
 
 /*! \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 @@
 			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;

Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?rev=7775&r1=7774&r2=7775&view=diff
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Wed Jan  4 03:10:56 2006
@@ -348,9 +348,15 @@
 ;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 at 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



More information about the asterisk-commits mailing list