[Home]

Summary:ASTERISK-25018: pjsip show endpoints crashes asterisk when qualified aors present
Reporter:Ivan Poddubny (ipoddubny)Labels:
Date Opened:2015-04-27 00:12:02Date Closed:2015-04-28 06:43:20
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_pjsip pjproject/pjsip
Versions:13.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Asterisk built from master branch (835cf047) on Debian 7 x86_64Attachments:
Description:Running "pjsip show endpoints" or "pjsip show endpoint XXX" soon after starting Asterisk, where XXX is an endpoint which has 'qualify_frequency' set on aor, leads to segfault in res/res_pjsip/location.c:754 (in function cli_contact_print_body).

The following code is trying to access status->status while status is NULL.
{quote}
              ast_sip_get_contact_short_status_label(status->status),
              (status->status != UNKNOWN ? ((long long) status->rtt) / 1000.0 : NAN));
{quote}

This looks like a regression introduced by https://gerrit.asterisk.org/#/c/147/
Contact status must always exist in order to be printed.
Comments:By: George Joseph (gjoseph) 2015-04-27 12:18:48.327-0500

Ivan,

Can you test the following patch to make sure it resolves the issue?

https://gerrit.asterisk.org/261


By: Ivan Poddubny (ipoddubny) 2015-04-27 13:25:27.178-0500

I've tested the patch and confirm that it fixes this issue.