[Home]

Summary:ASTERISK-26908: res_pjsip: The ChanIsAvail causes a res_pjsip session to be leaked.
Reporter:Richard Mudgett (rmudgett)Labels:
Date Opened:2017-03-29 22:23:26Date Closed:2017-04-27 16:47:39
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip Resources/res_pjsip_session
Versions:13.14.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) verbose_log.txt
Description:Using the {{ChanIsAvail}} application on a PJSIP channel with the 's' option causes a pjsip session structure to be leaked.  This can easily be seen by looking at the "core show taskprocessors" output.  The pjsip/outsess taskprocessors accumulate for each PJSIP channel checked.
Comments:By: Richard Mudgett (rmudgett) 2017-03-29 22:28:27.517-0500

[^verbose_log.txt] - The capture shows the taskprocessors before and after a call.  During the call I placed some judicious bactrace captures.

The {{ChanIsAvail}} application does an ast_request() followed by an ast_hangup() of the created channel to determine if a channel can be created.  Since the channel was never started by an ast_call(), the ast_hangup() results in the session being leaked.

By: Richard Mudgett (rmudgett) 2017-03-30 15:16:42.299-0500

This issue may also happen with ARI when a channel is created and then destroyed without initiating the call.

By: Friendly Automation (friendly-automation) 2017-04-27 16:47:39.874-0500

Change 5546 merged by Jenkins2:
res_pjsip_session:  Add cleanup to ast_sip_session_terminate

[https://gerrit.asterisk.org/5546|https://gerrit.asterisk.org/5546]

By: Friendly Automation (friendly-automation) 2017-04-27 17:10:21.442-0500

Change 5547 merged by Jenkins2:
res_pjsip_session:  Add cleanup to ast_sip_session_terminate

[https://gerrit.asterisk.org/5547|https://gerrit.asterisk.org/5547]

By: Friendly Automation (friendly-automation) 2017-04-27 17:16:09.775-0500

Change 5548 merged by Jenkins2:
res_pjsip_session:  Add cleanup to ast_sip_session_terminate

[https://gerrit.asterisk.org/5548|https://gerrit.asterisk.org/5548]