asterisk/asterisk.patch.xfersips

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 347
10bd406e1c51
child 552
e568963742d6
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

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

mercurial