diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 12578fc2ec..7a325a17c8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18174,7 +18174,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int make_our_tag(p->tag, sizeof(p->tag)); /* First invitation - create the channel */ - c = sip_new(p, AST_STATE_DOWN, S_OR(p->username, NULL)); + c = sip_new(p, AST_STATE_DOWN, S_OR(p->peername, NULL)); *recount = 1; /* Save Record-Route for any later requests we make on this dialogue */