asterisk/asterisk.patch.xfersips

Tue, 28 Aug 2012 18:28:45 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:28:45 +0200
changeset 528
3b08e6396b45
parent 347
10bd406e1c51
child 552
e568963742d6
permissions
-rw-r--r--

Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.

     1 Index: channels/chan_sip.c
     2 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
     3 --- channels/chan_sip.c.orig	2011-05-23 17:35:28.358543497 +0200
     4 +++ channels/chan_sip.c	2011-05-23 17:57:05.948534524 +0200
     5 @@ -28839,6 +28839,7 @@
     6  \todo	Fix this function so that we wait for reply to the REFER and
     7  	react to errors, denials or other issues the other end might have.
     8   */
     9 +/* MSvB: Paramater dest may be SIPS encoded, having '@' before domain */
    10  static int sip_sipredirect(struct sip_pvt *p, const char *dest)
    11  {
    12  	char *cdest;
    13 @@ -28847,7 +28848,7 @@
    14  	cdest = ast_strdupa(dest);
    16  	extension = strsep(&cdest, "@");
    17 -	domain = strsep(&cdest, ":");
    18 +	domain = strsep(&cdest, ":");     /* MSvB: Could begin with '@' if SIPS */
    19  	if (ast_strlen_zero(extension)) {
    20  		ast_log(LOG_ERROR, "Missing mandatory argument: extension\n");
    21  		return 0;
    22 @@ -28879,7 +28880,14 @@
    23  		}
    24  	}
    26 -	ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain);
    27 +	if (domain && *domain == '@') {
    28 +		ast_log(LOG_DEBUG, "Decoding TLS incapable Asterisk SIP URI to a standard SIPS URI before redirecting via 302 Moved Temporarily\n");
    29 +		ast_string_field_build(p, our_contact, "Transfer <sips:%s@%s>", extension, domain);
    30 +
    31 +	}
    32 +	else
    33 +		ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain);
    34 +
    35  	transmit_response_reliable(p, "302 Moved Temporarily", &p->initreq);
    37  	sip_scheddestroy(p, SIP_TRANS_TIMEOUT);	/* Make sure we stop send this reply. */

mercurial