1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/asterisk/asterisk.patch.proxymwi Mon Apr 27 12:19:05 2009 +0200 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 2009-04-24 00:51:58.000000000 +0200 1.7 ++++ channels/chan_sip.c 2009-04-24 00:52:33.000000000 +0200 1.8 +@@ -16428,6 +16428,7 @@ 1.9 + /* Called with peerl lock, but releases it */ 1.10 + struct sip_pvt *p; 1.11 + int newmsgs, oldmsgs; 1.12 ++ char *s = NULL; 1.13 + 1.14 + /* Do we have an IP address? If not, skip this peer */ 1.15 + if (!peer->addr.sin_addr.s_addr && !peer->defaddr.sin_addr.s_addr) 1.16 +@@ -16461,6 +16462,11 @@ 1.17 + /* Recalculate our side, and recalculate Call ID */ 1.18 + if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip)) 1.19 + p->ourip = __ourip; 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 + build_callid_pvt(p); 1.27 + /* Destroy this session after 32 secs */