[asterisk-commits] dvossel: branch dvossel/gtalk_fixup r291108 - in /team/dvossel/gtalk_fixup: c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 11 12:43:10 CDT 2010


Author: dvossel
Date: Mon Oct 11 12:43:08 2010
New Revision: 291108

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291108
Log:
add externip option to gtalk.conf 

Modified:
    team/dvossel/gtalk_fixup/channels/chan_gtalk.c
    team/dvossel/gtalk_fixup/configs/gtalk.conf.sample

Modified: team/dvossel/gtalk_fixup/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/gtalk_fixup/channels/chan_gtalk.c?view=diff&rev=291108&r1=291107&r2=291108
==============================================================================
--- team/dvossel/gtalk_fixup/channels/chan_gtalk.c (original)
+++ team/dvossel/gtalk_fixup/channels/chan_gtalk.c Mon Oct 11 12:43:08 2010
@@ -862,8 +862,6 @@
 
 	if (!ast_strlen_zero(externip)) {
 		/* XXX We should really stun for this one not just go with externip XXX */
-		snprintf(user, sizeof(user), "%08lx%08lx", ast_random(), ast_random());
-		snprintf(pass, sizeof(pass), "%08lx%08lx", ast_random(), ast_random());
 		ast_copy_string(ours2->username, user, sizeof(ours2->username));
 		ast_copy_string(ours2->password, pass, sizeof(ours2->password));
 		ast_copy_string(ours2->ip, externip, sizeof(ours2->ip));
@@ -1892,6 +1890,7 @@
 		return NULL;
 	}
 
+	/* XXX TODO it doesn't work, why would you lie to us like this. */
 	ast_verbose("IT DOES WORK!\n");
 	return CLI_SUCCESS;
 }
@@ -2079,6 +2078,8 @@
 			ast_parse_allow_disallow(&prefs, &global_capability, var->value, 1);
 		else if (!strcasecmp(var->name, "context"))
 			ast_copy_string(context, var->value, sizeof(context));
+		else if (!strcasecmp(var->name, "externip"))
+			ast_copy_string(externip, var->value, sizeof(externip));
 		else if (!strcasecmp(var->name, "parkinglot"))
 			ast_copy_string(parkinglot, var->value, sizeof(parkinglot));
 		else if (!strcasecmp(var->name, "bindaddr")) {

Modified: team/dvossel/gtalk_fixup/configs/gtalk.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/gtalk_fixup/configs/gtalk.conf.sample?view=diff&rev=291108&r1=291107&r2=291108
==============================================================================
--- team/dvossel/gtalk_fixup/configs/gtalk.conf.sample (original)
+++ team/dvossel/gtalk_fixup/configs/gtalk.conf.sample Mon Oct 11 12:43:08 2010
@@ -1,20 +1,21 @@
 ;[general]
-;context=default		;;Context to dump call into
-;bindaddr=0.0.0.0		;;Address to bind to
+;context=default        ;;Context to dump call into
+;bindaddr=0.0.0.0       ;;Address to bind to
+;externip=127.0.0.1     ;;Set your external ip if you are behind a NAT.
 ;allowguest=yes			;;Allow calls from people not in
-				;;list of peers
+                        ;;list of peers
 ;
-;[guest]			;;special account for options on guest account
+;[guest]          ;;special account for options on guest account
 ;disallow=all
 ;allow=ulaw
 ;context=guest
 ;
 ;[ogorman]
-;username=ogorman at gmail.com	;;username of the peer your
-				;;calling or accepting calls from
+;username=ogorman at gmail.com ;;username of the peer your
+                            ;;calling or accepting calls from
 ;disallow=all
 ;allow=ulaw
 ;context=default
-;connection=asterisk		;;client or component in jabber.conf
-				;;for the call to leave on.
+;connection=asterisk        ;;client or component in jabber.conf
+                            ;;for the call to leave on.
 ;




More information about the asterisk-commits mailing list