michael@311: Index: channels/chan_sip.c michael@311: diff -Nau channels/chan_sip.c.orig channels/chan_sip.c michael@311: --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 michael@311: +++ channels/chan_sip.c 2011-03-13 14:34:29.000000000 +0100 michael@404: @@ -25085,6 +25085,7 @@ michael@311: struct sip_pvt *p; michael@311: int newmsgs = 0, oldmsgs = 0; michael@404: const char *vmexten = NULL; michael@311: + char *s = NULL; michael@311: michael@404: ao2_lock(peer); michael@404: michael@404: @@ -25138,6 +25139,11 @@ michael@311: } michael@311: /* Recalculate our side, and recalculate Call ID */ michael@311: ast_sip_ouraddrfor(&p->sa, &p->ourip, p); michael@311: + /* Set the username = mailbox and remove the context */ michael@311: + ast_string_field_build(p, username, "%s", peer->name); michael@311: + s = strchr(p->username, '@'); michael@311: + if (s != NULL) michael@311: + *s = 0; michael@311: build_via(p); michael@311: ao2_t_unlink(dialogs, p, "About to change the callid -- remove the old name"); michael@311: build_callid_pvt(p);