mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 12:54:56 +00:00
Send proper contact in 200 OK to REGISTER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4258,6 +4258,8 @@ static int parse_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_req
|
|||||||
ast_verbose(VERBOSE_PREFIX_3 "Unregistered SIP '%s'\n", p->name);
|
ast_verbose(VERBOSE_PREFIX_3 "Unregistered SIP '%s'\n", p->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/* For the 200 OK, we should use the received contact */
|
||||||
|
snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c);
|
||||||
/* Make sure it's a SIP URL */
|
/* Make sure it's a SIP URL */
|
||||||
if (strncasecmp(c, "sip:", 4)) {
|
if (strncasecmp(c, "sip:", 4)) {
|
||||||
ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", c);
|
ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", c);
|
||||||
|
Reference in New Issue
Block a user