[asterisk-commits] murf: branch group/CDRfix5 r88435 - in /team/group/CDRfix5: ./ channels/ conf...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 3 08:58:43 CDT 2007


Author: murf
Date: Sat Nov  3 08:58:42 2007
New Revision: 88435

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88435
Log:
Merged revisions 88367-88368,88370-88371,88376,88408-88409 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r88367 | file | 2007-11-02 14:51:53 -0600 (Fri, 02 Nov 2007) | 12 lines

Merged revisions 88366 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88366 | file | 2007-11-02 17:49:45 -0300 (Fri, 02 Nov 2007) | 4 lines

Make subscribecontext behave as advertised. It will now look for the presence of a hint in the given context (be it subscribecontext or context).
(closes issue #10702)
Reported by: slavon

........

................
r88368 | russell | 2007-11-02 14:56:12 -0600 (Fri, 02 Nov 2007) | 13 lines

Merge the code from asterisk/team/group/chan_unistim:

This introduces a new channel driver, chan_unistim, that supports the Unistim
VoIP protocol for Nortel phones.  The following models have been confirmed 
to work: i2002, i2004 and i2050.

(closes issue #8864)
Reported by: c_hans
Patches: 
      chan_unistim.patch uploaded by c (license 304)
      ustm_no_conf.diff uploaded by junky (license 177)
Tested by: c_hans, dbowerman, math, junky, loloski

................
r88370 | russell | 2007-11-02 15:25:55 -0600 (Fri, 02 Nov 2007) | 3 lines

Show the channel unique ID in the "show channel concise" output
(closes issue #11148, requested by falves11, patched by me)

................
r88371 | russell | 2007-11-02 15:36:37 -0600 (Fri, 02 Nov 2007) | 2 lines

Don't kill asterisk if extensions.lua is not present.

................
r88376 | russell | 2007-11-02 15:39:36 -0600 (Fri, 02 Nov 2007) | 2 lines

propagate the DECLINE return value back to the loader

................
r88408 | russell | 2007-11-02 16:08:15 -0600 (Fri, 02 Nov 2007) | 2 lines

Convert the CLI commands to the new format

................
r88409 | russell | 2007-11-02 16:36:30 -0600 (Fri, 02 Nov 2007) | 1 line

fix some issues with crashing on unload, when it didn't completely load cleanly
................

Added:
    team/group/CDRfix5/channels/chan_unistim.c
      - copied unchanged from r88409, trunk/channels/chan_unistim.c
    team/group/CDRfix5/configs/unistim.conf.sample
      - copied unchanged from r88409, trunk/configs/unistim.conf.sample
    team/group/CDRfix5/doc/unistim.txt
      - copied unchanged from r88409, trunk/doc/unistim.txt
Modified:
    team/group/CDRfix5/   (props changed)
    team/group/CDRfix5/CHANGES
    team/group/CDRfix5/CREDITS
    team/group/CDRfix5/channels/chan_sip.c
    team/group/CDRfix5/main/cli.c
    team/group/CDRfix5/pbx/pbx_lua.c

Propchange: team/group/CDRfix5/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/CDRfix5/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Nov  3 08:58:42 2007
@@ -1,1 +1,1 @@
-/trunk:1-88341
+/trunk:1-88421

Modified: team/group/CDRfix5/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/CHANGES?view=diff&rev=88435&r1=88434&r2=88435
==============================================================================
--- team/group/CDRfix5/CHANGES (original)
+++ team/group/CDRfix5/CHANGES Sat Nov  3 08:58:42 2007
@@ -305,6 +305,9 @@
      It allows you to configure a prefix for auto-monitor recordings.
   * Added support for running your dialplan by writing one in lua.  See
      configs/extensions.lua.sample for examples of how to do this.
+ * Added a new channel driver, chan_unistim.  See doc/unistim.txt and
+    configs/unistim.conf.sample for details.  This new channel driver allows
+	you to use Nortel i2002, i2004, and i2050 phones with Asterisk.
 
 CDR changes
 -----------
@@ -332,4 +335,3 @@
     The bridge CDR is then posted to the backend. The channel cdr start time is updated 
     to the end time of the bridge. Hangup routines are called, and then the channel 
     is destroyed.
-

Modified: team/group/CDRfix5/CREDITS
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/CREDITS?view=diff&rev=88435&r1=88434&r2=88435
==============================================================================
--- team/group/CDRfix5/CREDITS (original)
+++ team/group/CDRfix5/CREDITS Sat Nov  3 08:58:42 2007
@@ -163,6 +163,10 @@
 Voop AS - Financial support for a lot of work with the SIP driver and the IAX
 	trunk MTU patch
 
+Cedric Hans - Development of chan_unistim
+  cedric.hans(AT)mlkj.net
+
+
 === OTHER CONTRIBUTIONS ===
 John Todd - Monkey sounds and associated teletorture prompt
 Michael Jerris - bug marshaling

Modified: team/group/CDRfix5/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/channels/chan_sip.c?view=diff&rev=88435&r1=88434&r2=88435
==============================================================================
--- team/group/CDRfix5/channels/chan_sip.c (original)
+++ team/group/CDRfix5/channels/chan_sip.c Sat Nov  3 08:58:42 2007
@@ -9560,17 +9560,27 @@
 			ast_string_field_set(p, context, domain_context);
 	}
 
+	/* If the request coming in is a subscription and subscribecontext has been specified use it */
+	if (req->method == SIP_SUBSCRIBE && !ast_strlen_zero(p->subscribecontext))
+		ast_string_field_set(p, context, p->subscribecontext);
+
 	if (sip_debug_test_pvt(p))
 		ast_verbose("Looking for %s in %s (domain %s)\n", uri, p->context, p->domain);
 
-	/* Check the dialplan for the username part of the request URI,
-	   the domain will be stored in the SIPDOMAIN variable
-		Return 0 if we have a matching extension */
-	if (ast_exists_extension(NULL, p->context, uri, 1, from) ||
-		!strcmp(uri, ast_pickup_ext())) {
-		if (!oreq)
-			ast_string_field_set(p, exten, uri);
-		return 0;
+	/* If this is a subscription we actually just need to see if a hint exists for the extension */
+	if (req->method == SIP_SUBSCRIBE) {
+		char hint[AST_MAX_EXTENSION];
+		return (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, p->context, p->exten) ? 0 : -1);
+	} else {
+		/* Check the dialplan for the username part of the request URI,
+		   the domain will be stored in the SIPDOMAIN variable
+		   Return 0 if we have a matching extension */
+		if (ast_exists_extension(NULL, p->context, uri, 1, from) ||
+		    !strcmp(uri, ast_pickup_ext())) {
+			if (!oreq)
+				ast_string_field_set(p, exten, uri);
+			return 0;
+		}
 	}
 
 	/* Return 1 for pickup extension or overlap dialling support (if we support it) */
@@ -15923,16 +15933,6 @@
 	/* Get destination right away */
 	gotdest = get_destination(p, NULL);
 
-	/* Initialize the context if it hasn't been already;
-	   note this is done _after_ handling any domain lookups,
-	   because the context specified there is for calls, not
-	   subscriptions
-	*/
-	if (!ast_strlen_zero(p->subscribecontext))
-		ast_string_field_set(p, context, p->subscribecontext);
-	else if (ast_strlen_zero(p->context))
-		ast_string_field_set(p, context, default_context);
-
 	/* Get full contact header - this needs to be used as a request URI in NOTIFY's */
 	parse_ok_contact(p, req);
 

Modified: team/group/CDRfix5/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/main/cli.c?view=diff&rev=88435&r1=88434&r2=88435
==============================================================================
--- team/group/CDRfix5/main/cli.c (original)
+++ team/group/CDRfix5/main/cli.c Sat Nov  3 08:58:42 2007
@@ -578,7 +578,7 @@
 {
 #define FORMAT_STRING  "%-20.20s %-20.20s %-7.7s %-30.30s\n"
 #define FORMAT_STRING2 "%-20.20s %-20.20s %-7.7s %-30.30s\n"
-#define CONCISE_FORMAT_STRING  "%s!%s!%s!%d!%s!%s!%s!%s!%s!%d!%s!%s\n"
+#define CONCISE_FORMAT_STRING  "%s!%s!%s!%d!%s!%s!%s!%s!%s!%d!%s!%s!%s\n"
 #define VERBOSE_FORMAT_STRING  "%-20.20s %-20.20s %-16.16s %4d %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-20.20s\n"
 #define VERBOSE_FORMAT_STRING2 "%-20.20s %-20.20s %-16.16s %-4.4s %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-20.20s\n"
 
@@ -650,7 +650,8 @@
 					S_OR(c->accountcode, ""),
 					c->amaflags, 
 					durbuf,
-					bc ? bc->name : "(None)");
+					bc ? bc->name : "(None)",
+					c->uniqueid);
 			} else if (verbose) {
 				ast_cli(fd, VERBOSE_FORMAT_STRING, c->name, c->context, c->exten, c->priority, ast_state2str(c->_state),
 					c->appl ? c->appl : "(None)",

Modified: team/group/CDRfix5/pbx/pbx_lua.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/pbx/pbx_lua.c?view=diff&rev=88435&r1=88434&r2=88435
==============================================================================
--- team/group/CDRfix5/pbx/pbx_lua.c (original)
+++ team/group/CDRfix5/pbx/pbx_lua.c Sat Nov  3 08:58:42 2007
@@ -1277,13 +1277,13 @@
 	lua_State *L = luaL_newstate();
 	if (!L) {
 		ast_log(LOG_ERROR, "Error allocating lua_State, no memory\n");
-		return AST_MODULE_LOAD_FAILURE;
+		return AST_MODULE_LOAD_DECLINE;
 	}
 
 	if (lua_reload_extensions(L)) {
 		const char *error = lua_tostring(L, -1);
 		ast_log(LOG_ERROR, "Error loading extensions.lua: %s\n", error);
-		res = AST_MODULE_LOAD_FAILURE;
+		res = AST_MODULE_LOAD_DECLINE;
 	}
 
 	lua_close(L);
@@ -1304,12 +1304,14 @@
 
 static int load_module(void)
 {
-	if (load_or_reload_lua_stuff())
-		return AST_MODULE_LOAD_FAILURE;
+	int res;
+
+	if ((res = load_or_reload_lua_stuff()))
+		return res;
 
 	if (ast_register_switch(&lua_switch)) {
 		ast_log(LOG_ERROR, "Unable to register LUA PBX switch\n");
-		return AST_MODULE_LOAD_FAILURE;
+		return AST_MODULE_LOAD_DECLINE;
 	}
 
 	return AST_MODULE_LOAD_SUCCESS;




More information about the asterisk-commits mailing list