ast_rtp_setnat(p->vrtp, p->nat);
}
p->canreinvite = peer->canreinvite;
+ if (strlen(peer->username))
strncpy(p->username, peer->name, sizeof(p->username) - 1);
+ strncpy(p->peername, peer->name, sizeof(p->peername) - 1);
if (strlen(peer->context))
strncpy(p->context, peer->context, sizeof(p->context) - 1);
p->callgroup = peer->callgroup;
p->needdestroy = 1;
}
} else if (!strcasecmp(msg, "BYE")) {
- if (!strlen(p->username))
- ast_log(LOG_WARNING, "Acked to authenticate BYE, to %s:%d but we have no matching peer!\n",
+ if (!strlen(p->peername))
+ ast_log(LOG_WARNING, "Asked to authenticate BYE, to %s:%d but we have no matching peer!\n",
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));
break;
case 407:
if (!strcasecmp(msg, "BYE")) {
- if (!strlen(p->username))
- ast_log(LOG_WARNING, "Acked to authenticate BYE, to %s:%d but we have no matching peer!\n",
+ if (!strlen(p->peername))
+ ast_log(LOG_WARNING, "Asked to authenticate BYE, to %s:%d but we have no matching peer!\n",
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));