[Pkg-voip-commits] r5764 - in /asterisk/trunk/debian: changelog patches/bristuff/xagi

paravoid at alioth.debian.org paravoid at alioth.debian.org
Wed May 21 11:12:49 UTC 2008


Author: paravoid
Date: Wed May 21 11:12:49 2008
New Revision: 5764

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5764
Log:
* Update to bristuff-0.4.0-RC1:
  - Revert API changes to res_agi (xagi).

Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/patches/bristuff/xagi

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=5764&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Wed May 21 11:12:49 2008
@@ -13,7 +13,11 @@
   * Provide /usr/include/asterisk.h as well (through a symlink).
   * Remove {,} bashism from debian/rules (Closes: #478361). 
 
- -- Faidon Liambotis <paravoid at debian.org>  Wed, 21 May 2008 14:04:59 +0300
+  [ Faidon Liambotis ]
+  * Update to bristuff-0.4.0-RC1:
+    - Revert API changes to res_agi (xagi).
+
+ -- Faidon Liambotis <paravoid at debian.org>  Wed, 21 May 2008 14:11:36 +0300
 
 asterisk (1:1.4.19.1~dfsg-1) unstable; urgency=low
 

Modified: asterisk/trunk/debian/patches/bristuff/xagi
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/xagi?rev=5764&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/xagi (original)
+++ asterisk/trunk/debian/patches/bristuff/xagi Wed May 21 11:12:49 2008
@@ -1,11 +1,9 @@
 --- a/include/asterisk/agi.h
 +++ b/include/asterisk/agi.h
-@@ -29,7 +29,8 @@ extern "C" {
- 
+@@ -30,6 +30,7 @@ extern "C" {
  typedef struct agi_state {
  	int fd;		/* FD for general output */
--	int audio;	/* FD for audio output */
-+	int audio_out;	/* FD for audio output */
+ 	int audio;	/* FD for audio output */
 +	int audio_in;	/* FD for audio output */
  	int ctrl;	/* FD for input control */
  	unsigned int fast:1; /* flag for fast agi or not */
@@ -153,87 +151,6 @@
  
  	/* User information */
  	fdprintf(fd, "agi_accountcode: %s\n", chan->accountcode ? chan->accountcode : "");
-@@ -421,7 +469,7 @@ static int handle_waitfordigit(struct as
- 		return RESULT_SHOWUSAGE;
- 	if (sscanf(argv[3], "%d", &to) != 1)
- 		return RESULT_SHOWUSAGE;
--	res = ast_waitfordigit_full(chan, to, agi->audio, agi->ctrl);
-+	res = ast_waitfordigit_full(chan, to, agi->audio_out, agi->ctrl);
- 	fdprintf(agi->fd, "200 result=%d\n", res);
- 	return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;
- }
-@@ -596,7 +644,7 @@ static int handle_streamfile(struct ast_
- 	if (vfs)
- 		ast_playstream(vfs);
- 	
--	res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl);
-+	res = ast_waitstream_full(chan, argv[3], agi->audio_out, agi->ctrl);
- 	/* this is to check for if ast_waitstream closed the stream, we probably are at
- 	 * the end of the stream, return that amount, else check for the amount */
- 	sample_offset = (chan->stream) ? ast_tellstream(fs) : max_length;
-@@ -657,7 +705,7 @@ static int handle_getoption(struct ast_c
- 	if (vfs)
- 		ast_playstream(vfs);
- 
--	res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl);
-+	res = ast_waitstream_full(chan, argv[3], agi->audio_out, agi->ctrl);
- 	/* this is to check for if ast_waitstream closed the stream, we probably are at
- 	 * the end of the stream, return that amount, else check for the amount */
- 	sample_offset = (chan->stream)?ast_tellstream(fs):max_length;
-@@ -669,7 +717,7 @@ static int handle_getoption(struct ast_c
- 
- 	/* If the user didnt press a key, wait for digitTimeout*/
- 	if (res == 0 ) {
--		res = ast_waitfordigit_full(chan, timeout, agi->audio, agi->ctrl);
-+		res = ast_waitfordigit_full(chan, timeout, agi->audio_out, agi->ctrl);
- 		/* Make sure the new result is in the escape digits of the GET OPTION */
- 		if ( !strchr(edigits,res) )
- 			res=0;
-@@ -693,7 +741,7 @@ static int handle_saynumber(struct ast_c
- 		return RESULT_SHOWUSAGE;
- 	if (sscanf(argv[2], "%d", &num) != 1)
- 		return RESULT_SHOWUSAGE;
--	res = ast_say_number_full(chan, num, argv[3], chan->language, (char *) NULL, agi->audio, agi->ctrl);
-+	res = ast_say_number_full(chan, num, argv[3], chan->language, (char *) NULL, agi->audio_out, agi->ctrl);
- 	if (res == 1)
- 		return RESULT_SUCCESS;
- 	fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -710,7 +758,7 @@ static int handle_saydigits(struct ast_c
- 	if (sscanf(argv[2], "%d", &num) != 1)
- 		return RESULT_SHOWUSAGE;
- 
--	res = ast_say_digit_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
-+	res = ast_say_digit_str_full(chan, argv[2], argv[3], chan->language, agi->audio_out, agi->ctrl);
- 	if (res == 1) /* New command */
- 		return RESULT_SUCCESS;
- 	fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -724,7 +772,7 @@ static int handle_sayalpha(struct ast_ch
- 	if (argc != 4)
- 		return RESULT_SHOWUSAGE;
- 
--	res = ast_say_character_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
-+	res = ast_say_character_str_full(chan, argv[2], argv[3], chan->language, agi->audio_out, agi->ctrl);
- 	if (res == 1) /* New command */
- 		return RESULT_SUCCESS;
- 	fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -802,7 +850,7 @@ static int handle_sayphonetic(struct ast
- 	if (argc != 4)
- 		return RESULT_SHOWUSAGE;
- 
--	res = ast_say_phonetic_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
-+	res = ast_say_phonetic_str_full(chan, argv[2], argv[3], chan->language, agi->audio_out, agi->ctrl);
- 	if (res == 1) /* New command */
- 		return RESULT_SUCCESS;
- 	fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -826,7 +874,7 @@ static int handle_getdata(struct ast_cha
- 		max = atoi(argv[4]); 
- 	else
- 		max = 1024;
--	res = ast_app_getdata_full(chan, argv[2], data, max, timeout, agi->audio, agi->ctrl);
-+	res = ast_app_getdata_full(chan, argv[2], data, max, timeout, agi->audio_out, agi->ctrl);
- 	if (res == 2)			/* New command */
- 		return RESULT_SUCCESS;
- 	else if (res == 1)
 @@ -1833,8 +1881,13 @@ static enum agi_result run_agi(struct as
  	int ms;
  	enum agi_result returnstatus = AGI_RESULT_SUCCESS;
@@ -253,7 +170,7 @@
  	}
  	setlinebuf(readf);
 -	setup_env(chan, request, agi->fd, (agi->audio > -1));
-+	if (agi->audio_out > -1) {
++	if (agi->audio > -1) {
 +	    enhanced = 1;
 +	}
 +	if (agi->audio_in > -1) {
@@ -273,16 +190,7 @@
  		if (c) {
  			retry = AGI_NANDFS_RETRY;
  			/* Idle the channel until we get a command */
-@@ -1862,13 +1927,23 @@ static enum agi_result run_agi(struct as
- 				break;
- 			} else {
- 				/* If it's voice, write it to the audio pipe */
--				if ((agi->audio > -1) && (f->frametype == AST_FRAME_VOICE)) {
-+				if ((agi->audio_out > -1) && (f->frametype == AST_FRAME_VOICE)) {
- 					/* Write, ignoring errors */
--					write(agi->audio, f->data, f->datalen);
-+					write(agi->audio_out, f->data, f->datalen);
- 				}
+@@ -1869,6 +1934,16 @@ static enum agi_result run_agi(struct as
  				ast_frfree(f);
  			}
  		} else if (outfd > -1) {
@@ -325,8 +233,7 @@
  		int status = 0;
  		agi.fd = fds[1];
  		agi.ctrl = fds[0];
--		agi.audio = efd;
-+		agi.audio_out = efd;
+ 		agi.audio = efd;
 +		agi.audio_in = efd2;
  		agi.fast = (res == AGI_RESULT_SUCCESS_FAST) ? 1 : 0;
  		res = run_agi(chan, argv[0], &agi, pid, &status, dead);




More information about the Pkg-voip-commits mailing list