[Asterisk-cvs] asterisk-addons/res_perl AstAPIBase.c, 1.2, 1.3 Makefile, 1.1, 1.2

anthm at lists.digium.com anthm at lists.digium.com
Sun Sep 26 14:11:15 CDT 2004


Update of /usr/cvsroot/asterisk-addons/res_perl
In directory mongoose.digium.com:/tmp/cvs-serv26905

Modified Files:
	AstAPIBase.c Makefile 
Log Message:
minor update

Index: AstAPIBase.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/res_perl/AstAPIBase.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- AstAPIBase.c	24 Sep 2004 22:13:37 -0000	1.2
+++ AstAPIBase.c	26 Sep 2004 18:13:54 -0000	1.3
@@ -4,6 +4,7 @@
 #include <sys/ioctl.h>
 #define CONF_SIZE 160
 
+
 AST_MUTEX_DEFINE_STATIC(modlock);
 
 #ifdef POST_10
@@ -52,8 +53,8 @@
 
 int asterisk_chanlist(int fd)
 {
-#define FORMAT_STRING  "%15s  (%-10s %-12s %-4d) %7s %-12s	%-15s\n"
-#define FORMAT_STRING2 "%15s  (%-10s %-12s %-4s) %7s %-12s	%-15s\n"
+#define FORMAT_STRING  "%15s  (%-10s %-12s %-4d) %7s %-12s  %-15s\n"
+#define FORMAT_STRING2 "%15s  (%-10s %-12s %-4s) %7s %-12s  %-15s\n"
 	struct ast_channel *c=NULL;
 	int numchans = 0;
 	c = ast_channel_walk_locked(NULL);
@@ -268,7 +269,7 @@
 	}
 
 
-	return	ast_say_number(chan, num,AST_DIGIT_ANY, chan->language,(char *) NULL);
+	return  ast_say_number(chan, num,AST_DIGIT_ANY, chan->language,(char *) NULL);
 }
 
 int asterisk_saydigits(struct ast_channel *chan,char *data) {
@@ -347,11 +348,11 @@
 	int res = 0;
 	int ms=timeout;	
 
-	struct ast_dsp *sildet=NULL;		 /* silence detector dsp */
+	struct ast_dsp *sildet=NULL;         /* silence detector dsp */
 	int totalsilence = 0;
 	int dspsilence = 0;
 
-	int gotsilence = 0;				/* did we timeout for silence? */
+	int gotsilence = 0;             /* did we timeout for silence? */
 
 	int rfmt=0;
 
@@ -675,6 +676,31 @@
 }
 
 
+
+int asterisk_bridge_call_long(struct ast_channel *chan, struct ast_channel *peer, int allowredir_in, int allowredir_out, int allowdisconnect_in, int allowdisconnect_out,long timelimit,long play_warning,long warning_freq,char *warning_sound,char *end_sound,char *start_sound) {
+	struct ast_bridge_config config;
+  
+	if(!chan || !peer) {
+		ast_log(LOG_WARNING, "No Channel!\n");
+		return -1;
+	}
+  
+	memset(&config,0,sizeof(struct ast_bridge_config));
+	config.allowredirect_in = allowredir_in;
+	config.allowredirect_out = allowredir_out;
+	config.allowdisconnect_in = allowdisconnect_in;
+	config.allowdisconnect_out = allowdisconnect_out;
+	config.timelimit = timelimit;
+	config.play_warning = play_warning;
+	config.warning_freq = warning_freq;
+	config.warning_sound = warning_sound;
+	config.end_sound = end_sound;
+	config.start_sound = start_sound;
+	return ast_bridge_call(chan,peer,&config);
+	
+}
+
+
 struct ast_channel *asterisk_request_and_dial(char *type,char *data,int format,char *callerid, int timeout) {
 	int reason;
 	struct ast_channel *chan;

Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/res_perl/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Makefile	23 Sep 2004 17:49:42 -0000	1.1
+++ Makefile	26 Sep 2004 18:13:54 -0000	1.2
@@ -67,8 +67,10 @@
 	/bin/rm -fr $(ASTETCDIR)/perl
 
 AstAPI_wrap.c:
-	swig -DMULTIPLICITY -perl5 -module AstAPIBase AstAPIBase.c
-
+	/bin/cat AstAPIBase.c | grep -v AST_MUTEX_DEFINE_STATIC > AstAPIBase2.c
+	swig -DMULTIPLICITY -perl5 -module AstAPIBase AstAPIBase2.c
+	/bin/rm AstAPIBase2.c
+	/bin/mv AstAPIBase2_wrap.c AstAPIBase_wrap.c
 perlxsi.c:
 	perl -MExtUtils::Embed -e xsinit
 




More information about the svn-commits mailing list