diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 220f213b41540f6ca9bbed08fb5390f5cef729b5..ace15f80cf71d44a376fd4ffae5c286b1af0c2bc 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4071,7 +4071,8 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq) if ((a = strchr(fr, '@'))) { *a = '\0'; strncpy(p->fromdomain, a + 1, sizeof(p->fromdomain) - 1); - } + } else + strncpy(p->fromdomain, fr, sizeof(p->fromdomain) - 1); } if (sipdebug) ast_verbose("Looking for %s in %s\n", c, p->context);