1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/asterisk/asterisk.patch.proxymwi Sun Mar 20 20:03:11 2011 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +Index: channels/chan_sip.c 1.5 +diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 1.6 +--- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 1.7 ++++ channels/chan_sip.c 2011-03-13 14:34:29.000000000 +0100 1.8 +@@ -24267,6 +24267,7 @@ 1.9 + /* Called with peerl lock, but releases it */ 1.10 + struct sip_pvt *p; 1.11 + int newmsgs = 0, oldmsgs = 0; 1.12 ++ char *s = NULL; 1.13 + 1.14 + if (ast_test_flag((&peer->flags[1]), SIP_PAGE2_SUBSCRIBEMWIONLY) && !peer->mwipvt) 1.15 + return 0; 1.16 +@@ -24307,6 +24308,11 @@ 1.17 + } 1.18 + /* Recalculate our side, and recalculate Call ID */ 1.19 + ast_sip_ouraddrfor(&p->sa, &p->ourip, p); 1.20 ++ /* Set the username = mailbox and remove the context */ 1.21 ++ ast_string_field_build(p, username, "%s", peer->name); 1.22 ++ s = strchr(p->username, '@'); 1.23 ++ if (s != NULL) 1.24 ++ *s = 0; 1.25 + build_via(p); 1.26 + ao2_t_unlink(dialogs, p, "About to change the callid -- remove the old name"); 1.27 + build_callid_pvt(p);