[asterisk-bugs] [JIRA] (ASTERISK-28547) PJSIP AOR configuration "contact=sip:" crash

Gant Liu (JIRA) noreply at issues.asterisk.org
Sun Sep 22 22:11:47 CDT 2019


Gant Liu created ASTERISK-28547:
-----------------------------------

             Summary: PJSIP AOR configuration "contact=sip:"   crash
                 Key: ASTERISK-28547
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28547
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_pjsip_registrar
    Affects Versions: 16.5.0
            Reporter: Gant Liu


When config a PJSIP endpoint's AOR, if the "contact" set to "sip:", when pjsip load and initial, it will crash. the configure like this:
[10000]
type = aor
contact = sip:
max_contacts = 1
remove_existing = yes

We can modify the res/res_pjsip_registrar.c to resolve it.
Line:230
if (hdr->uri = pjsip_parse_uri(tdata->pool, uri.ptr, uri.slen, PJSIP_PARSE_URI_AS_NAMEADDR))
	{
		hdr->expires = ast_tvdiff_ms(contact->expiration_time, ast_tvnow()) / 1000;

		pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hdr);
	}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list