Hi,
I have a setting were i have 10 pjsip endpoints 100X. in the dialplan i have a section to pickup ringing channels.
exten = _900X,1,PickupChan(PJSIP/100${EXTEN:3:4},p)
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.
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 endpointsEndpoint: <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
The call count of 1001 is not decreased. after a few repetition of the same use case here is the state –
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
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
Is there a another way where i can decide if an endpoint is not in a call?
Is this a bug? it does not decrease unless asterisk is restarted.
Tested in asterisk 13.8-cert4 and 15.2.1. fails in both cases.
Please help.