[asterisk-commits] murf: branch group/newcdr r164483 - in /team/group/newcdr: ./ apps/ cdr/ chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 15 15:06:00 CST 2008


Author: murf
Date: Mon Dec 15 15:05:59 2008
New Revision: 164483

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164483
Log:
Merged revisions 164257,164268,164270,164272,164309,164312,164344,164349,164351,164415,164417,164419,164423,164428 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r164257 | file | 2008-12-15 08:41:22 -0700 (Mon, 15 Dec 2008) | 4 lines

Make app_fax compatible with newer versions of spandsp. This remains backwards compatible with earlier versions though so do not fret.
(closes issue #14073)
Reported by: seandarcy

................
r164268 | mmichelson | 2008-12-15 09:10:43 -0700 (Mon, 15 Dec 2008) | 17 lines

Fix up a few issues with regards to queues

* Fix reference counting used in the __queues_show function
* Add code to be sure that the "queue show" command does not
  print information for a realtime queue which has been deleted
  from the backend
* Add a missing unref to the realtime queue loading function for
  the case where a queue is in the module's container but has been
  deleted from the realtime backend

(closes issue #14033)
Reported by: cristiandimache
Patches:
      14033.patch uploaded by putnopvut (license 60)
Tested by: cristiandimache


................
r164270 | mmichelson | 2008-12-15 09:16:47 -0700 (Mon, 15 Dec 2008) | 4 lines

Fix a compile warning and a logic error that could have been bad
for non-realtime queues


................
r164272 | russell | 2008-12-15 09:17:55 -0700 (Mon, 15 Dec 2008) | 8 lines

When a reload is issued, always process the configuration for dundi.conf.

The reason is that a reload can be used to refresh DNS lookups for defined peers.
Even if the config file hasn't changed, we want to process it for that purpose.

(closes issue #13776)
Reported by: kombjuder

................
r164309 | russell | 2008-12-15 10:21:38 -0700 (Mon, 15 Dec 2008) | 2 lines

Fix a couple more build issues related to ast_str_opaque

................
r164312 | file | 2008-12-15 10:24:28 -0700 (Mon, 15 Dec 2008) | 4 lines

Use ast_seekstream to return the file stream back to the beginning instead of directly seeking to zero. This is because some audio formats have headers at the front that need to be skipped, which will be done by the format module.
(closes issue #14079)
Reported by: elguero

................
r164344 | file | 2008-12-15 10:46:32 -0700 (Mon, 15 Dec 2008) | 10 lines

Blocked revisions 164343 via svnmerge

........
  r164343 | file | 2008-12-15 13:43:59 -0400 (Mon, 15 Dec 2008) | 4 lines
  
  Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
  (closes issue #13838)
  Reported by: ano
........

................
r164349 | tilghman | 2008-12-15 11:09:58 -0700 (Mon, 15 Dec 2008) | 4 lines

When querying for the structure of the CDR table, remove the schema, if it
exists.
(Closes issue #14058)

................
r164351 | file | 2008-12-15 11:12:24 -0700 (Mon, 15 Dec 2008) | 13 lines

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

........
  r164350 | file | 2008-12-15 14:11:21 -0400 (Mon, 15 Dec 2008) | 6 lines
  
  Do not try to unlock a non-existant channel if the transfer fails.
  (closes issue #13800)
  Reported by: dwagner
  Patches:
        asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608)
........

................
r164415 | murf | 2008-12-15 12:42:05 -0700 (Mon, 15 Dec 2008) | 16 lines

I was getting this warning during a compile
on a 64-bit machine running ubuntu server 8.10, 
and gcc-4.3.2:

   [CXXi] chan_vpb.ii -> chan_vpb.oo
cc1plus: warnings being treated as errors
In file included from /home/murf/asterisk/trunk/include/asterisk/utils.h:671,
                 from chan_vpb.cc:46:
/home/murf/asterisk/trunk/include/asterisk/strings.h: In function ‘char* ast_str_truncate(ast_str*, ssize_t)’:
/home/murf/asterisk/trunk/include/asterisk/strings.h:479: error: comparison between signed and unsigned integer expressions
make[1]: *** [chan_vpb.oo] Error 1
make: *** [channels] Error 2

which this fix silences


................
r164417 | tilghman | 2008-12-15 12:48:02 -0700 (Mon, 15 Dec 2008) | 3 lines

Revert ast_str opacity in chan_sip for now, since something wasn't quite right
in the merge.

................
r164419 | mmichelson | 2008-12-15 12:51:24 -0700 (Mon, 15 Dec 2008) | 12 lines

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

........
r164416 | mmichelson | 2008-12-15 13:45:07 -0600 (Mon, 15 Dec 2008) | 4 lines

Add notes to autoservice and pbx doxygen regarding a potential
deadlock scenario so that it is avoided in the future


........

................
r164423 | mmichelson | 2008-12-15 12:53:29 -0700 (Mon, 15 Dec 2008) | 11 lines

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

........
r164422 | mmichelson | 2008-12-15 13:53:08 -0600 (Mon, 15 Dec 2008) | 3 lines

Add the deadlock note to ast_spawn_extension as well


........

................
r164428 | mmichelson | 2008-12-15 13:07:03 -0700 (Mon, 15 Dec 2008) | 11 lines

Add an 'i' option to app_page. This option works the same as
the 'i' options for app_dial and app_queue, in that they will ignore
any attempts by phones to forward the call.

(closes issue #13977)
Reported by: putnopvut
Patches:
      page_ignore_forwards.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, acunningham


................

Modified:
    team/group/newcdr/   (props changed)
    team/group/newcdr/apps/app_fax.c
    team/group/newcdr/apps/app_page.c
    team/group/newcdr/apps/app_queue.c
    team/group/newcdr/cdr/cdr_pgsql.c
    team/group/newcdr/channels/chan_sip.c
    team/group/newcdr/channels/h323/ast_h323.cxx
    team/group/newcdr/configure
    team/group/newcdr/configure.ac
    team/group/newcdr/include/asterisk/autoconfig.h.in
    team/group/newcdr/include/asterisk/channel.h
    team/group/newcdr/include/asterisk/pbx.h
    team/group/newcdr/include/asterisk/strings.h
    team/group/newcdr/main/file.c
    team/group/newcdr/pbx/pbx_dundi.c

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

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

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Dec 15 15:05:59 2008
@@ -1,1 +1,1 @@
-/trunk:1-164222
+/trunk:1-164482

Modified: team/group/newcdr/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_fax.c?view=diff&rev=164483&r1=164482&r2=164483
==============================================================================
--- team/group/newcdr/apps/app_fax.c (original)
+++ team/group/newcdr/apps/app_fax.c Mon Dec 15 15:05:59 2008
@@ -29,6 +29,9 @@
 #include <tiffio.h>
 
 #include <spandsp.h>
+#ifdef HAVE_SPANDSP_EXPOSE_H
+#include <spandsp/expose.h>
+#endif
 #include <spandsp/version.h>
 
 #include "asterisk/lock.h"

Modified: team/group/newcdr/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_page.c?view=diff&rev=164483&r1=164482&r2=164483
==============================================================================
--- team/group/newcdr/apps/app_page.c (original)
+++ team/group/newcdr/apps/app_page.c Mon Dec 15 15:05:59 2008
@@ -68,6 +68,9 @@
 					<option name="d">
 						<para>Full duplex audio</para>
 					</option>
+					<option name="i">
+						<para>Ignore attempts to forward the call</para>
+					</option>
 					<option name="q">
 						<para>Quiet, do not play beep to caller</para>
 					</option>
@@ -103,6 +106,7 @@
 	PAGE_QUIET = (1 << 1),
 	PAGE_RECORD = (1 << 2),
 	PAGE_SKIP = (1 << 3),
+	PAGE_IGNORE_FORWARDS = (1 << 4),
 } page_opt_flags;
 
 AST_APP_OPTIONS(page_opts, {
@@ -110,6 +114,7 @@
 	AST_APP_OPTION('q', PAGE_QUIET),
 	AST_APP_OPTION('r', PAGE_RECORD),
 	AST_APP_OPTION('s', PAGE_SKIP),
+	AST_APP_OPTION('i', PAGE_IGNORE_FORWARDS),
 });
 
 #define MAX_DIALS 128
@@ -209,6 +214,10 @@
 			ast_dial_set_global_timeout(dial, timeout * 1000);
 		}
 
+		if (ast_test_flag(&flags, PAGE_IGNORE_FORWARDS)) {
+			ast_dial_option_global_enable(dial, AST_DIAL_OPTION_DISABLE_CALL_FORWARDING, NULL);
+		}
+
 		/* Run this dial in async mode */
 		ast_dial_run(dial, chan, 1);
 

Modified: team/group/newcdr/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_queue.c?view=diff&rev=164483&r1=164482&r2=164483
==============================================================================
--- team/group/newcdr/apps/app_queue.c (original)
+++ team/group/newcdr/apps/app_queue.c Mon Dec 15 15:05:59 2008
@@ -1691,6 +1691,7 @@
 			/* Delete if unused (else will be deleted when last caller leaves). */
 			ao2_unlink(queues, q);
 			ao2_unlock(q);
+			queue_unref(q);
 		}
 		return NULL;
 	}
@@ -5700,14 +5701,20 @@
 		return CLI_SHOWUSAGE;
 
 	if (argc == 3)	{ /* specific queue */
-		load_realtime_queue(argv[2]);
-	}
-	else if (ast_check_realtime("queues")) {
+		if ((q = load_realtime_queue(argv[2]))) {
+			queue_unref(q);
+		}
+	} else if (ast_check_realtime("queues")) {
+		/* This block is to find any queues which are defined in realtime but
+		 * which have not yet been added to the in-core container
+		 */
 		struct ast_config *cfg = ast_load_realtime_multientry("queues", "name LIKE", "%", SENTINEL);
 		char *queuename;
 		if (cfg) {
 			for (queuename = ast_category_browse(cfg, NULL); !ast_strlen_zero(queuename); queuename = ast_category_browse(cfg, queuename)) {
-				load_realtime_queue(queuename);
+				if ((q = load_realtime_queue(queuename))) {
+					queue_unref(q);
+				}
 			}
 			ast_config_destroy(cfg);
 		}
@@ -5717,8 +5724,20 @@
 	ao2_lock(queues);
 	while ((q = ao2_iterator_next(&queue_iter))) {
 		float sl;
+		struct call_queue *realtime_queue = NULL;
 
 		ao2_lock(q);
+		/* This check is to make sure we don't print information for realtime
+		 * queues which have been deleted from realtime but which have not yet
+		 * been deleted from the in-core container
+		 */
+		if (q->realtime && !(realtime_queue = load_realtime_queue(q->name))) {
+			ao2_unlock(q);
+			queue_unref(q);
+			continue;
+		} else if (q->realtime) {
+			queue_unref(realtime_queue);
+		}
 		if (argc == 3 && strcasecmp(q->name, argv[2])) {
 			ao2_unlock(q);
 			queue_unref(q);
@@ -5782,14 +5801,6 @@
 		}
 		do_print(s, fd, "");	/* blank line between entries */
 		ao2_unlock(q);
-		if (q->realtime || argc == 3) {
-			/* If a queue is realtime, then that means we used load_realtime_queue() above
-			 * to get its information. This means we have an extra reference we need to
-			 * remove at this point. If a specific queue was requested, then it also needs
-			 * to be unreffed here even if it is not a realtime queue.
-			 */
-			queue_unref(q);
-		}
 		queue_unref(q); /* Unref the iterator's reference */
 	}
 	ao2_unlock(queues);

Modified: team/group/newcdr/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/cdr/cdr_pgsql.c?view=diff&rev=164483&r1=164482&r2=164483
==============================================================================
--- team/group/newcdr/cdr/cdr_pgsql.c (original)
+++ team/group/newcdr/cdr/cdr_pgsql.c Mon Dec 15 15:05:59 2008
@@ -469,12 +469,20 @@
 	if (PQstatus(conn) != CONNECTION_BAD) {
 		char sqlcmd[512];
 		char *fname, *ftype, *flen, *fnotnull, *fdef;
+		char *tableptr;
 		int i, rows;
 		ast_debug(1, "Successfully connected to PostgreSQL database.\n");
 		connected = 1;
 
+		/* Remove any schema name from the table */
+		if ((tableptr = strrchr(table, '.'))) {
+			tableptr++;
+		} else {
+			tableptr = table;
+		}
+
 		/* Query the columns */
-		snprintf(sqlcmd, sizeof(sqlcmd), "select a.attname, t.typname, a.attlen, a.attnotnull, d.adsrc from pg_class c, pg_type t, pg_attribute a left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum where c.oid = a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = '%s' order by c.relname, attnum", table);
+		snprintf(sqlcmd, sizeof(sqlcmd), "select a.attname, t.typname, a.attlen, a.attnotnull, d.adsrc from pg_class c, pg_type t, pg_attribute a left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum where c.oid = a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = '%s' order by c.relname, attnum", tableptr);
 		result = PQexec(conn, sqlcmd);
 		if (PQresultStatus(result) != PGRES_TUPLES_OK) {
 			pgerror = PQresultErrorMessage(result);

Modified: team/group/newcdr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_sip.c?view=diff&rev=164483&r1=164482&r2=164483
==============================================================================
--- team/group/newcdr/channels/chan_sip.c (original)
+++ team/group/newcdr/channels/chan_sip.c Mon Dec 15 15:05:59 2008
@@ -508,7 +508,7 @@
 
 #define SIP_MAX_HEADERS              64               /*!< Max amount of SIP headers to read */
 #define SIP_MAX_LINES                64               /*!< Max amount of lines in SIP attachment (like SDP) */
-#define SIP_MIN_PACKET               1024             /*!< Initialize size of memory to allocate for packets */
+#define SIP_MIN_PACKET               4096             /*!< Initialize size of memory to allocate for packets */
 
 #define INITIAL_CSEQ                 101              /*!< Our initial sip sequence number */
 
@@ -2031,8 +2031,6 @@
 
 /*! \brief A per-thread temporary pvt structure */
 AST_THREADSTORAGE_CUSTOM(ts_temp_pvt, temp_pvt_init, temp_pvt_cleanup);
-AST_THREADSTORAGE(transmit_state_buffer);
-AST_THREADSTORAGE(mailbox_buffer);
 
 #ifdef LOW_MEMORY
 static void ts_ast_rtp_destroy(void *);
@@ -2263,7 +2261,7 @@
 static int expire_register(const void *data);
 static void *do_monitor(void *data);
 static int restart_monitor(void);
-static char *peer_mailboxes_to_str(struct ast_str **mailbox_str, struct sip_peer *peer);
+static void peer_mailboxes_to_str(struct ast_str **mailbox_str, struct sip_peer *peer);
 /* static int sip_addrcmp(char *name, struct sockaddr_in *sin);	Support for peer matching */
 static int sip_refer_allocate(struct sip_pvt *p);
 static void ast_quiet_chan(struct ast_channel *chan);
@@ -2709,7 +2707,7 @@
 		}
 
 		/* Read in headers one line at a time */
-		while (req.len < 4 || strncmp(ast_str_buffer(req.data) + req.len - 4, "\r\n\r\n", 4)) {
+		while (req.len < 4 || strncmp((char *)&req.data->str + req.len - 4, "\r\n\r\n", 4)) {
 			ast_mutex_lock(&tcptls_session->lock);
 			if (!fgets(buf, sizeof(buf), tcptls_session->f)) {
 				ast_mutex_unlock(&tcptls_session->lock);
@@ -2718,8 +2716,8 @@
 			ast_mutex_unlock(&tcptls_session->lock);
 			if (me->stop) 
 				 goto cleanup;
-			ast_str_append(&req.data, -1, "%s", buf);
-			req.len = ast_str_strlen(req.data);
+			ast_str_append(&req.data, 0, "%s", buf);
+			req.len = req.data->used;
 		}
 		copy_request(&reqcpy, &req);
 		parse_request(&reqcpy);
@@ -2735,8 +2733,8 @@
 				if (me->stop)
 					goto cleanup;
 				cl -= strlen(buf);
-				ast_str_append(&req.data, -1, "%s", buf);
-				req.len = ast_str_strlen(req.data);
+				ast_str_append(&req.data, 0, "%s", buf);
+				req.len = req.data->used;
 			}
 		}
 		/*! \todo XXX If there's no Content-Length or if the content-length and what
@@ -3165,24 +3163,21 @@
 	int res = 0;
 	const struct sockaddr_in *dst = sip_real_dst(p);
 
-	ast_debug(2, "Trying to put '%.10s' onto %s socket destined for %s:%d\n", ast_str_buffer(data), get_transport_pvt(p), ast_inet_ntoa(dst->sin_addr), htons(dst->sin_port));
-
-	if (sip_prepare_socket(p) < 0) {
+	ast_debug(2, "Trying to put '%.10s' onto %s socket destined for %s:%d\n", data->str, get_transport_pvt(p), ast_inet_ntoa(dst->sin_addr), htons(dst->sin_port));
+
+	if (sip_prepare_socket(p) < 0)
 		return XMIT_ERROR;
-	}
-
-	if (p->socket.tcptls_session) {
+
+	if (p->socket.tcptls_session)
 		ast_mutex_lock(&p->socket.tcptls_session->lock);
-	}
-
-	if (p->socket.type & SIP_TRANSPORT_UDP) {
-		res = sendto(p->socket.fd, ast_str_buffer(data), len, 0, (const struct sockaddr *)dst, sizeof(struct sockaddr_in));
-	} else {
-		if (p->socket.tcptls_session->f) {
-			res = ast_tcptls_server_write(p->socket.tcptls_session, ast_str_buffer(data), len);
-		} else {
+
+	if (p->socket.type & SIP_TRANSPORT_UDP) 
+		res = sendto(p->socket.fd, data->str, len, 0, (const struct sockaddr *)dst, sizeof(struct sockaddr_in));
+	else {
+		if (p->socket.tcptls_session->f) 
+			res = ast_tcptls_server_write(p->socket.tcptls_session, data->str, len);
+		else
 			ast_debug(2, "No p->socket.tcptls_session->f len=%d\n", len);
-		}
 	} 
 
 	if (p->socket.tcptls_session)
@@ -3198,9 +3193,8 @@
 			res = XMIT_ERROR;	/* Don't bother with trying to transmit again */
 		}
 	}
-	if (res != len) {
+	if (res != len)
 		ast_log(LOG_WARNING, "sip_xmit of %p (len %d) to %s:%d returned %d: %s\n", data, len, ast_inet_ntoa(dst->sin_addr), ntohs(dst->sin_port), res, strerror(errno));
-	}
 
 	return res;
 }
@@ -3360,10 +3354,10 @@
 			ast_verbose("Retransmitting #%d (%s) to %s:%d:\n%s\n---\n",
 				pkt->retrans, sip_nat_mode(pkt->owner),
 				ast_inet_ntoa(dst->sin_addr),
-				ntohs(dst->sin_port), ast_str_buffer(pkt->data));
-		}
-
-		append_history(pkt->owner, "ReTx", "%d %s", reschedule, ast_str_buffer(pkt->data));
+				ntohs(dst->sin_port), pkt->data->str);
+		}
+
+		append_history(pkt->owner, "ReTx", "%d %s", reschedule, pkt->data->str);
 		xmitres = __sip_xmit(pkt->owner, pkt->data, pkt->packetlen);
 		sip_pvt_unlock(pkt->owner);
 		if (xmitres == XMIT_ERROR)
@@ -3478,7 +3472,7 @@
 		ast_free(pkt);
 		return AST_FAILURE;
 	}
-	ast_str_set(&pkt->data, 0, "%s", ast_str_buffer(data));
+	ast_str_set(&pkt->data, 0, "%s%s", data->str, "\0");
 	pkt->packetlen = len;
 	/* copy other parameters from the caller */
 	pkt->method = sipmethod;
@@ -3680,7 +3674,7 @@
 			return;
 		}
 		cur = p->packets;
-		method = (cur->method) ? cur->method : find_sip_method(ast_str_buffer(cur->data));
+		method = (cur->method) ? cur->method : find_sip_method(cur->data->str);
 		__sip_ack(p, cur->seqno, cur->is_resp, method);
 	}
 }
@@ -3693,7 +3687,7 @@
 
 	for (cur = p->packets; cur; cur = cur->next) {
 		if (cur->seqno == seqno && cur->is_resp == resp &&
-			(cur->is_resp || method_match(sipmethod, ast_str_buffer(cur->data)))) {
+			(cur->is_resp || method_match(sipmethod, cur->data->str))) {
 			/* this is our baby */
 			if (cur->retransid > -1) {
 				if (sipdebug)
@@ -3722,7 +3716,7 @@
 	if (!req->lines) {
 		/* Add extra empty return. add_header() reserves 4 bytes so cannot be truncated */
 		ast_str_append(&req->data, 0, "\r\n");
-		req->len = ast_str_strlen(req->data);
+		req->len = req->data->used;
 	}
 }
 
@@ -3738,12 +3732,12 @@
 		ast_verbose("\n<--- %sTransmitting (%s) to %s:%d --->\n%s\n<------------>\n",
 			reliable ? "Reliably " : "", sip_nat_mode(p),
 			ast_inet_ntoa(dst->sin_addr),
-			ntohs(dst->sin_port), ast_str_buffer(req->data));
+			ntohs(dst->sin_port), req->data->str);
 	}
 	if (p->do_history) {
 		struct sip_request tmp = { .rlPart1 = NULL, };
 		parse_copy(&tmp, req);
-		append_history(p, reliable ? "TxRespRel" : "TxResp", "%s / %s - %s", ast_str_buffer(tmp.data), get_header(&tmp, "CSeq"), 
+		append_history(p, reliable ? "TxRespRel" : "TxResp", "%s / %s - %s", tmp.data->str, get_header(&tmp, "CSeq"), 
 			(tmp.method == SIP_RESPONSE || tmp.method == SIP_UNKNOWN) ? tmp.rlPart2 : sip_methods[tmp.method].text);
 		ast_free(tmp.data);
 	}
@@ -3771,16 +3765,15 @@
 
 	add_blank(req);
 	if (sip_debug_test_pvt(p)) {
-		if (ast_test_flag(&p->flags[0], SIP_NAT_ROUTE)) {
-			ast_verbose("%sTransmitting (NAT) to %s:%d:\n%s\n---\n", reliable ? "Reliably " : "", ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port), ast_str_buffer(req->data));
-		} else {
-			ast_verbose("%sTransmitting (no NAT) to %s:%d:\n%s\n---\n", reliable ? "Reliably " : "", ast_inet_ntoa(p->sa.sin_addr), ntohs(p->sa.sin_port), ast_str_buffer(req->data));
-		}
+		if (ast_test_flag(&p->flags[0], SIP_NAT_ROUTE))
+			ast_verbose("%sTransmitting (NAT) to %s:%d:\n%s\n---\n", reliable ? "Reliably " : "", ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port), req->data->str);
+		else
+			ast_verbose("%sTransmitting (no NAT) to %s:%d:\n%s\n---\n", reliable ? "Reliably " : "", ast_inet_ntoa(p->sa.sin_addr), ntohs(p->sa.sin_port), req->data->str);
 	}
 	if (p->do_history) {
 		struct sip_request tmp = { .rlPart1 = NULL, };
 		parse_copy(&tmp, req);
-		append_history(p, reliable ? "TxReqRel" : "TxReq", "%s / %s - %s", ast_str_buffer(tmp.data), get_header(&tmp, "CSeq"), sip_methods[tmp.method].text);
+		append_history(p, reliable ? "TxReqRel" : "TxReq", "%s / %s - %s", tmp.data->str, get_header(&tmp, "CSeq"), sip_methods[tmp.method].text);
 		ast_free(tmp.data);
 	}
 	res = (reliable) ?
@@ -5512,7 +5505,7 @@
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 
 	/* Start the process if it's not already started */
-	if (!p->alreadygone && p->initreq.data && ast_str_strlen(p->initreq.data)) {
+	if (!p->alreadygone && p->initreq.data && !ast_strlen_zero(p->initreq.data->str)) {
 		if (needcancel) {	/* Outgoing call, not up */
 			if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
 				/* stop retransmitting an INVITE that has not received a response */
@@ -7025,7 +7018,7 @@
 */
 static int parse_request(struct sip_request *req)
 {
-	char *c = ast_str_buffer(req->data), **dst = req->header;
+	char *c = req->data->str, **dst = req->header;
 	int i = 0, lim = SIP_MAX_HEADERS - 1;
 	unsigned int skipping_headers = 0;
 
@@ -7923,7 +7916,7 @@
 		/* Activate a re-invite */
 		ast_queue_frame(p->owner, &ast_null_frame);
 		/* Queue Manager Unhold event */
-		append_history(p, "Unhold", "%s", ast_str_buffer(req->data));
+		append_history(p, "Unhold", "%s", req->data->str);
 		if (sip_cfg.callevents)
 			manager_event(EVENT_FLAG_CALL, "Hold",
 				      "Status: Off\r\n"
@@ -7945,7 +7938,7 @@
 		/* Activate a re-invite */
 		ast_queue_frame(p->owner, &ast_null_frame);
 		/* Queue Manager Hold event */
-		append_history(p, "Hold", "%s", ast_str_buffer(req->data));
+		append_history(p, "Hold", "%s", req->data->str);
 		if (sip_cfg.callevents && !ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
 			manager_event(EVENT_FLAG_CALL, "Hold",
 				      "Status: On\r\n"
@@ -7988,8 +7981,8 @@
 		return -1;
 	}
 
-	ast_str_append(&req->data, -1, "%s: %s\r\n", var, value);
-	req->header[req->headers] = ast_str_buffer(req->data) + req->len;
+	ast_str_append(&req->data, 0, "%s: %s\r\n", var, value);
+	req->header[req->headers] = req->data->str + req->len;
 
 	if (sip_cfg.compactheaders)
 		var = find_alias(var, var);
@@ -8015,12 +8008,16 @@
 		ast_log(LOG_WARNING, "Out of SIP line space\n");
 		return -1;
 	}
-	if (!req->lines) {
+	if (!req->lines)
 		/* Add extra empty return */
-		req->len += ast_str_append(&req->data, -1, "\r\n");
-	}
-	req->line[req->lines] = ast_str_buffer(req->data) + ast_str_strlen(req->data);
-	req->len += ast_str_append(&req->data, -1, "%s", line);
+		req->len += ast_str_append(&req->data, 0, "\r\n");
+	if (req->len >= sizeof(req->data->str) - 4) {
+		ast_log(LOG_WARNING, "Out of space, can't add anymore\n");
+		return -1;
+	}
+	req->line[req->lines] = req->data->str + req->len;
+	ast_str_append(&req->data, 0, "%s", line);
+	req->len += strlen(req->line[req->lines]);
 	req->lines++;
 	return 0;	
 }
@@ -8084,7 +8081,7 @@
 
 			/* Find ;rport;  (empty request) */
 			rport = strstr(leftmost, ";rport");
-			if (rport && *(rport + 6) == '=') 
+			if (rport && *(rport+6) == '=') 
 				rport = NULL;		/* We already have a parameter to rport */
 
 			/* Check rport if NAT=yes or NAT=rfc3581 (which is the default setting)  */
@@ -8236,9 +8233,9 @@
 	resp->method = SIP_RESPONSE;
 	if (!(resp->data = ast_str_create(SIP_MIN_PACKET)))
 		return -1;
-	ast_str_set(&resp->data, -1, "SIP/2.0 %s\r\n", msg);
-	resp->header[0] = ast_str_buffer(resp->data);
-	resp->len = ast_str_strlen(resp->data);
+	resp->header[0] = resp->data->str;
+	ast_str_set(&resp->data, 0, "SIP/2.0 %s\r\n", msg);
+	resp->len = strlen(resp->header[0]);
 	resp->headers++;
 	return 0;
 }
@@ -8251,9 +8248,9 @@
 	if (!(req->data = ast_str_create(SIP_MIN_PACKET)))
 		return -1;
 	req->method = sipmethod;
-	ast_str_set(&req->data, -1, "%s %s SIP/2.0\r\n", sip_methods[sipmethod].text, recip);
-	req->header[0] = ast_str_buffer(req->data);
-	req->len = ast_str_strlen(req->data);
+	req->header[0] = req->data->str;
+	ast_str_set(&req->data, 0, "%s %s SIP/2.0\r\n", sip_methods[sipmethod].text, recip);
+	req->len = strlen(req->header[0]);
 	req->headers++;
 	return 0;
 }
@@ -8900,11 +8897,11 @@
 	ast_str_append(&a_modem, 0, "a=T38FaxMaxDatagram:%d\r\n", x);
 	if (p->t38.jointcapability != T38FAX_UDP_EC_NONE)
 		ast_str_append(&a_modem, 0, "a=T38FaxUdpEC:%s\r\n", (p->t38.jointcapability & T38FAX_UDP_EC_REDUNDANCY) ? "t38UDPRedundancy" : "t38UDPFEC");
-	len = ast_str_strlen(m_modem) + ast_str_strlen(a_modem);
+	len = m_modem->used + a_modem->used;
 	add_header(resp, "Content-Type", "application/sdp");
 	add_header_contentLength(resp, len);
-	add_line(resp, ast_str_buffer(m_modem));
-	add_line(resp, ast_str_buffer(a_modem));
+	add_line(resp, m_modem->str);
+	add_line(resp, a_modem->str);
 
 	/* Update lastrtprx when we send our SDP */
 	p->lastrtprx = p->lastrtptx = time(NULL);
@@ -8942,12 +8939,10 @@
 {
 	/* First, get our address */
 	ast_rtp_get_us(p->rtp, sin);
-	if (p->vrtp) {
+	if (p->vrtp)
 		ast_rtp_get_us(p->vrtp, vsin);
-	}
-	if (p->trtp) {
+	if (p->trtp)
 		ast_rtp_get_us(p->trtp, tsin);
-	}
 
 	/* Now, try to figure out where we want them to send data */
 	/* Is this a re-invite to move the media out, then use the original offer from caller  */
@@ -8997,12 +8992,12 @@
 	struct sockaddr_in tdest = { 0, };
 
 	/* SDP fields */
-	char *version = "v=0\r\n";                      /* Protocol version */
-	char subject[256];                              /* Subject of the session */
-	char owner[256];                                /* Session owner/creator */
-	char connection[256];                           /* Connection data */
-	char *session_time = "t=0 0\r\n";               /* Time the session is active */
-	char bandwidth[256] = "";                       /* Max bitrate */
+	char *version = 	"v=0\r\n";		/* Protocol version */
+	char subject[256];				/* Subject of the session */
+	char owner[256];				/* Session owner/creator */
+	char connection[256];				/* Connection data */
+	char *session_time = "t=0 0\r\n"; 			/* Time the session is active */
+	char bandwidth[256] = "";			/* Max bitrate */
 	char *hold;
 	struct ast_str *m_audio = ast_str_alloca(256);  /* Media declaration line for audio */
 	struct ast_str *m_video = ast_str_alloca(256);  /* Media declaration line for video */
@@ -9036,12 +9031,11 @@
 
 	/* Set RTP Session ID and version */
 	if (!p->sessionid) {
-		p->sessionid = (int) ast_random();
+		p->sessionid = (int)ast_random();
 		p->sessionversion = p->sessionid;
 	} else {
-		if (oldsdp == FALSE) {
+		if (oldsdp == FALSE)
 			p->sessionversion++;
-		}
 	}
 
 	capability = p->jointcapability;
@@ -9059,26 +9053,23 @@
 #endif
 
 	/* Check if we need audio */
-	if (capability & AST_FORMAT_AUDIO_MASK) {
+	if (capability & AST_FORMAT_AUDIO_MASK)
 		needaudio = TRUE;
-	}
 
 	/* Check if we need video in this call */
 	if ((capability & AST_FORMAT_VIDEO_MASK) && !p->novideo) {
 		if (p->vrtp) {
 			needvideo = TRUE;
 			ast_debug(2, "This call needs video offers!\n");
-		} else {
+		} else
 			ast_debug(2, "This call needs video offers, but there's no video support enabled!\n");
-		}
 	}
 
 	/* Get our media addresses */
 	get_our_media_address(p, needvideo, &sin, &vsin, &tsin, &dest, &vdest);
 		
-	if (debug) {
-		ast_verbose("Audio is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(sin.sin_port));
-	}
+	if (debug) 
+		ast_verbose("Audio is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(sin.sin_port));	
 
 	/* Ok, we need video. Let's add what we need for video and set codecs.
 	   Video is handled differently than audio since we can not transcode. */
@@ -9086,36 +9077,30 @@
 		ast_str_append(&m_video, 0, "m=video %d RTP/AVP", ntohs(vdest.sin_port));
 
 		/* Build max bitrate string */
-		if (p->maxcallbitrate) {
+		if (p->maxcallbitrate)
 			snprintf(bandwidth, sizeof(bandwidth), "b=CT:%d\r\n", p->maxcallbitrate);
-		}
-		if (debug) {
-			ast_verbose("Video is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(vsin.sin_port));
-		}
+		if (debug) 
+			ast_verbose("Video is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(vsin.sin_port));	
 	}
 
 	/* Check if we need text in this call */
 	if((capability & AST_FORMAT_TEXT_MASK) && !p->notext) {
-		if (sipdebug_text) {
+		if (sipdebug_text)
 			ast_verbose("We think we can do text\n");
-		}
 		if (p->trtp) {
-			if (sipdebug_text) {
+			if (sipdebug_text)
 				ast_verbose("And we have a text rtp object\n");
-			}
 			needtext = TRUE;
 			ast_debug(2, "This call needs text offers! \n");
-		} else {
+		} else
 			ast_debug(2, "This call needs text offers, but there's no text support enabled ! \n");
-		}
 	}
 		
 	/* Ok, we need text. Let's add what we need for text and set codecs.
 	   Text is handled differently than audio since we can not transcode. */
 	if (needtext) {
-		if (sipdebug_text) {
+		if (sipdebug_text)
 			ast_verbose("Lets set up the text sdp\n");
-		}
 		/* Determine text destination */
 		if (p->tredirip.sin_addr.s_addr) {
 			tdest.sin_addr = p->tredirip.sin_addr;
@@ -9126,9 +9111,9 @@
 		}
 		ast_str_append(&m_text, 0, "m=text %d RTP/AVP", ntohs(tdest.sin_port));
 
-		if (debug) { /* XXX should I use tdest below ? */
+		if (debug) /* XXX should I use tdest below ? */
 			ast_verbose("Text is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(tsin.sin_port));	
-		}
+
 	}
 
 	/* Start building generic SDP headers */
@@ -9140,13 +9125,12 @@
 	snprintf(connection, sizeof(connection), "c=IN IP4 %s\r\n", ast_inet_ntoa(dest.sin_addr));
 	ast_str_append(&m_audio, 0, "m=audio %d RTP/AVP", ntohs(dest.sin_port));
 
-	if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) == SIP_PAGE2_CALL_ONHOLD_ONEDIR) {
+	if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) == SIP_PAGE2_CALL_ONHOLD_ONEDIR)
 		hold = "a=recvonly\r\n";
-	} else if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) == SIP_PAGE2_CALL_ONHOLD_INACTIVE) {
+	else if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) == SIP_PAGE2_CALL_ONHOLD_INACTIVE)
 		hold = "a=inactive\r\n";
-	} else {
+	else
 		hold = "a=sendrecv\r\n";
-	}
 
 	/* Now, start adding audio codecs. These are added in this order:
 		- First what was requested by the calling channel
@@ -9170,15 +9154,14 @@
 	for (x = 0; x < 32; x++) {
 		int codec;
 
-		if (!(codec = ast_codec_pref_index(&p->prefs, x))) {
-			break;
-		}
-		if (!(capability & codec)) {
+		if (!(codec = ast_codec_pref_index(&p->prefs, x)))
+			break; 
+
+		if (!(capability & codec))
 			continue;
-		}
-		if (alreadysent & codec) {
+
+		if (alreadysent & codec)
 			continue;
-		}
 
 		add_codec_to_sdp(p, codec, SDP_SAMPLE_RATE(codec),
 				 &m_audio, &a_audio,
@@ -9188,85 +9171,67 @@
 
 	/* Now send any other common audio and video codecs, and non-codec formats: */
 	for (x = 1; x <= (needtext ? AST_FORMAT_TEXT_MASK : (needvideo ? AST_FORMAT_VIDEO_MASK : AST_FORMAT_AUDIO_MASK)); x <<= 1) {
-		if (!(capability & x)) {  /* Codec not requested */
+		if (!(capability & x))	/* Codec not requested */
 			continue;
-		}
-
-		if (alreadysent & x) {    /* Already added to SDP */
+
+		if (alreadysent & x)	/* Already added to SDP */
 			continue;
-		}
-
-		if (x & AST_FORMAT_AUDIO_MASK) {
+
+		if (x & AST_FORMAT_AUDIO_MASK)
 			add_codec_to_sdp(p, x, SDP_SAMPLE_RATE(x),
 				 &m_audio, &a_audio, debug, &min_audio_packet_size);
-		} else if (x & AST_FORMAT_VIDEO_MASK) {
+		else if (x & AST_FORMAT_VIDEO_MASK) 
 			add_vcodec_to_sdp(p, x, 90000,
 				 &m_video, &a_video, debug, &min_video_packet_size);
-		} else if (x & AST_FORMAT_TEXT_MASK) {
+		else if (x & AST_FORMAT_TEXT_MASK)
 			add_tcodec_to_sdp(p, x, 1000,
 				 &m_text, &a_text, debug, &min_text_packet_size);
-		}
 	}
 
 	/* Now add DTMF RFC2833 telephony-event as a codec */
 	for (x = 1; x <= AST_RTP_MAX; x <<= 1) {
-		if (!(p->jointnoncodeccapability & x)) {
+		if (!(p->jointnoncodeccapability & x))
 			continue;
-		}
 
 		add_noncodec_to_sdp(p, x, 8000, &m_audio, &a_audio, debug);
 	}
 
 	ast_debug(3, "-- Done with adding codecs to SDP\n");
 
-	if (!p->owner || !ast_internal_timing_enabled(p->owner)) {
+	if (!p->owner || !ast_internal_timing_enabled(p->owner))
 		ast_str_append(&a_audio, 0, "a=silenceSupp:off - - - -\r\n");
-	}
-
-	if (min_audio_packet_size) {
+
+	if (min_audio_packet_size)
 		ast_str_append(&a_audio, 0, "a=ptime:%d\r\n", min_audio_packet_size);
-	}
 
  	/* XXX don't think you can have ptime for video */
-	if (min_video_packet_size) {
+	if (min_video_packet_size)
 		ast_str_append(&a_video, 0, "a=ptime:%d\r\n", min_video_packet_size);
-	}
 
  	/* XXX don't think you can have ptime for text */
- 	if (min_text_packet_size) {
+ 	if (min_text_packet_size)
  		ast_str_append(&a_text, 0, "a=ptime:%d\r\n", min_text_packet_size);
-	}
  
-	if (	ast_str_size(m_audio) - ast_str_strlen(m_audio) < 2 ||
-			ast_str_size(m_video) - ast_str_strlen(m_video) < 2 ||
-			ast_str_size(m_text) - ast_str_strlen(m_text) < 2 ||
-			ast_str_size(a_text) - ast_str_strlen(a_text) < 2 ||
-			ast_str_size(a_audio) - ast_str_strlen(a_audio) < 2 ||
-			ast_str_size(a_video) - ast_str_strlen(a_video) < 2) {
+	if (m_audio->len - m_audio->used < 2 || m_video->len - m_video->used < 2 ||
+			m_text->len - m_text->used < 2 || a_text->len - a_text->used < 2 ||
+			a_audio->len - a_audio->used < 2 || a_video->len - a_video->used < 2)
 		ast_log(LOG_WARNING, "SIP SDP may be truncated due to undersized buffer!!\n");
-	}
-
-	if (needaudio) {
+
+	if (needaudio)
  		ast_str_append(&m_audio, 0, "\r\n");
-	}
- 	if (needvideo) {
+ 	if (needvideo)
  		ast_str_append(&m_video, 0, "\r\n");
-	}
- 	if (needtext) {
+ 	if (needtext)
  		ast_str_append(&m_text, 0, "\r\n");
-	}
 
  	len = strlen(version) + strlen(subject) + strlen(owner) +
 		strlen(connection) + strlen(session_time);
-	if (needaudio) {
-		len += ast_str_strlen(m_audio) + ast_str_strlen(a_audio) + strlen(hold);
-	}
- 	if (needvideo) { /* only if video response is appropriate */
- 		len += ast_str_strlen(m_video) + ast_str_strlen(a_video) + strlen(bandwidth) + strlen(hold);
-	}
- 	if (needtext) { /* only if text response is appropriate */
- 		len += ast_str_strlen(m_text) + ast_str_strlen(a_text) + strlen(hold);
-	}
+	if (needaudio)
+		len += m_audio->used + a_audio->used + strlen(hold);
+ 	if (needvideo) /* only if video response is appropriate */
+ 		len += m_video->used + a_video->used + strlen(bandwidth) + strlen(hold);
+ 	if (needtext) /* only if text response is appropriate */
+ 		len += m_text->used + a_text->used + strlen(hold);
 
 	add_header(resp, "Content-Type", "application/sdp");
 	add_header_contentLength(resp, len);
@@ -9274,23 +9239,22 @@
 	add_line(resp, owner);
 	add_line(resp, subject);
 	add_line(resp, connection);
-	if (needvideo) {	 	/* only if video response is appropriate */
+	if (needvideo)	 	/* only if video response is appropriate */
 		add_line(resp, bandwidth);
-	}
 	add_line(resp, session_time);
 	if (needaudio) {
-		add_line(resp, ast_str_buffer(m_audio));
-		add_line(resp, ast_str_buffer(a_audio));
+		add_line(resp, m_audio->str);
+		add_line(resp, a_audio->str);
 		add_line(resp, hold);
 	}
 	if (needvideo) { /* only if video response is appropriate */
-		add_line(resp, ast_str_buffer(m_video));
-		add_line(resp, ast_str_buffer(a_video));
+		add_line(resp, m_video->str);
+		add_line(resp, a_video->str);
 		add_line(resp, hold);	/* Repeat hold for the video stream */
 	}
 	if (needtext) { /* only if text response is appropriate */
-		add_line(resp, ast_str_buffer(m_text));
-		add_line(resp, ast_str_buffer(a_text));
+		add_line(resp, m_text->str);
+		add_line(resp, a_text->str);
 		add_line(resp, hold);	/* Repeat hold for the text stream */
 	}
 
@@ -9340,13 +9304,14 @@
 	 * the place and so a memcpy is the only way to accurately copy the string
 	 */
 
-	if (!dst->data && !(dst->data = ast_str_create(ast_str_strlen(src->data) + 1)))
+	if (!dst->data && !(dst->data = ast_str_create(src->data->used + 1)))
 		return;
-	else if (ast_str_size(dst->data) < ast_str_strlen(src->data) + 1)
-		ast_str_make_space(&dst->data, ast_str_strlen(src->data) + 1);
-
-	ast_str_set(&dst->data, 0, "%s", ast_str_buffer(src->data));
-	offset = ((void *)ast_str_buffer(dst->data)) - ((void *)ast_str_buffer(src->data));
+	else if (dst->data->len < src->data->used + 1)
+		ast_str_make_space(&dst->data, src->data->used + 1);
+		
+	memcpy(dst->data->str, src->data->str, src->data->used + 1);
+	dst->data->used = src->data->used;
+	offset = ((void *)dst->data->str) - ((void *)src->data->str);
 	/* Now fix pointer arithmetic */
 	for (x = 0; x < src->headers; x++)
 		dst->header[x] += offset;
@@ -9695,7 +9660,7 @@
  	/* This is the request URI, which is the next hop of the call
  		which may or may not be the destination of the call
  	*/
-	ast_string_field_set(p, uri, ast_str_buffer(invite));
+	ast_string_field_set(p, uri, invite->str);
   
  	if (!ast_strlen_zero(p->todnid)) {
  		/*! \todo Need to add back the VXML URL here at some point, possibly use build_string for all this junk */
@@ -9978,8 +9943,8 @@
 /*! \brief Used in the SUBSCRIBE notification subsystem (RFC3265) */
 static int transmit_state_notify(struct sip_pvt *p, int state, int full, int timeout)
 {
-	struct ast_str *tmp = ast_str_thread_get(&transmit_state_buffer, 4000);
-	char from[256] = "", to[256] = "";
+	struct ast_str *tmp = ast_str_alloca(4000);
+	char from[256], to[256];
 	char *c, *mfrom, *mto;
 	struct sip_request req;
 	char hint[AST_MAX_EXTENSION];
@@ -9989,6 +9954,9 @@
 	char *pidfstate = "--";
 	char *pidfnote= "Ready";
 	
+	memset(from, 0, sizeof(from));
+	memset(to, 0, sizeof(to));
+
 	switch (state) {
 	case (AST_EXTENSION_RINGING | AST_EXTENSION_INUSE):
 		statestring = (global_notifyringing) ? "early" : "confirmed";
@@ -10178,8 +10146,8 @@
 		break;
 	}
 
-	add_header_contentLength(&req, ast_str_strlen(tmp));
-	add_line(&req, ast_str_buffer(tmp));
+	add_header_contentLength(&req, tmp->used);
+	add_line(&req, tmp->str);
 
 	p->pendinginvite = p->ocseq;	/* Remember that we have a pending NOTIFY in order not to confuse the NOTIFY subsystem */
 
@@ -10217,8 +10185,8 @@
 			add_header(&req, "Subscription-State", "terminated;reason=timeout");
 	}
 
-	add_header_contentLength(&req, ast_str_strlen(out));
-	add_line(&req, ast_str_buffer(out));
+	add_header_contentLength(&req, out->used);
+	add_line(&req, out->str);
 
 	if (!p->initreq.headers) 
 		initialize_initreq(p, &req);
@@ -11485,7 +11453,7 @@
 	if (res == AST_DYNSTR_BUILD_FAILED)
 		return AUTH_SECRET_FAILED; /*! XXX \todo need a better return code here */
 
-	c = ast_str_buffer(buf);
+	c = buf->str;
 
 	while(c && *(c = ast_skip_blanks(c)) ) { /* lookup for keys */
 		for (i = keys; i->key != NULL; i++) {
@@ -13976,7 +13944,7 @@
 }
 
 /*! \brief list peer mailboxes to CLI */
-static char *peer_mailboxes_to_str(struct ast_str **mailbox_str, struct sip_peer *peer)
+static void peer_mailboxes_to_str(struct ast_str **mailbox_str, struct sip_peer *peer)
 {
 	struct sip_mailbox *mailbox;
 
@@ -13987,7 +13955,6 @@
 			S_OR(mailbox->context, ""),
 			AST_LIST_NEXT(mailbox, entry) ? "," : "");
 	}
-	return ast_str_buffer(*mailbox_str);
 }
 
 /*! \brief Show one peer in detail (main function) */
@@ -14024,7 +13991,7 @@
 		}
 	}

[... 386 lines stripped ...]



More information about the asterisk-commits mailing list