[Home]

Summary:ASTERISK-27691: Endpoint active channel count does not decrease after PickupChan
Reporter:Tareq Mohammad Yousuf (tareqmy)Labels:pjsip
Date Opened:2018-02-20 05:22:25.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Applications/app_directed_pickup pjproject/pjsip
Versions:13.19.1 15.2.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Hi,

I have a setting were i have 10 pjsip endpoints 100X. in the dialplan i have a section to pickup ringing channels.
{noformat}
> exten = _900X,1,PickupChan(PJSIP/100${EXTEN:3:4},p)
{noformat}
Use case: 1002 calls 1004. while 1004 ringing, 1001 dials 9004 and picks up channel. here is the pjsip list endpoints before and after the call is hung up.
{noformat}
>
>  Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
>  Endpoint:  1001/1001                                            **Busy          1 of 1**
>  Endpoint:  1002/1002                                            **Busy          1 of 1**
>  Endpoint:  1003/1003                                            Unavailable   0 of 1
>  Endpoint:  1004/1004                                            Not in use    0 of 1
>
>     -- Channel PJSIP/1001-0000001d left 'native_rtp' basic-bridge <ab754efe-413c-4a0e-98ab-2f4bfe4d73b4>
>     -- Channel PJSIP/1002-0000001b left 'native_rtp' basic-bridge <ab754efe-413c-4a0e-98ab-2f4bfe4d73b4>
>   == Spawn extension (internal-main, 1004, 4) exited non-zero on 'PJSIP/1002-0000001b'
>     -- Executing [h@internal-main:1] Hangup("PJSIP/1002-0000001b", "") in new stack
>   == Spawn extension (internal-main, h, 1) exited non-zero on 'PJSIP/1002-0000001b'
> asterisk15*CLI> pjsip list endpoints
>
>  Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
>  Endpoint:  1001/1001                                            **Not in use    1 of 1**
>  Endpoint:  1002/1002                                            Not in use    0 of 1
>  Endpoint:  1003/1003                                            Unavailable   0 of 1
>  Endpoint:  1004/1004                                            Not in use    0 of 1
{noformat}
The call count of 1001 is not decreased. after a few repetition of the same use case here is the state --
{noformat}
>  Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
>  Endpoint:  1001/1001                                            **Not in use    5 of 1**
>  Endpoint:  1002/1002                                            Not in use    0 of 1
>  Endpoint:  1003/1003                                            Unavailable   0 of 1
>  Endpoint:  1004/1004                                            Not in use    0 of 1
{noformat}
Although 1001 is configured to device_busy_at=1, i can still call it!

I have a application that decides endpoint is busy through ari call to get endpoint and find channel_ids.size

it does not decrease unless asterisk is restarted.

Tested in asterisk 13.8-cert4 and 15.2.1. fails in both cases.
Comments:By: Asterisk Team (asteriskteam) 2018-02-20 05:22:26.187-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Benjamin Keith Ford (bford) 2018-03-05 13:11:29.330-0600

Tested and verified on my end. Opened up an issue.