[Home]

Summary:ASTERISK-28270: Creating call using ARI, does not increasing/decreasing the call count(core show calls)
Reporter:sungtae kim (pchero)Labels:pjsip
Date Opened:2019-02-02 09:27:35.000-0600Date Closed:2019-02-04 09:04:12.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:PBX/General
Versions:16.1.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) wrong_call_count.log
Description:Hi,

Creating call using ARI such as below, does not increasing/decreasing the call count.

* POST ari/channels
* POST ari/channels/{channel id}
Comments:By: Asterisk Team (asteriskteam) 2019-02-02 09:27:36.055-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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: sungtae kim (pchero) 2019-02-02 09:34:46.172-0600

I was trying to fix this, but after reach to the `ast_pbx_start()`, then I was lost where should I fix it. Because it looks so much complicated.

If It's not that to much hard to fix it, I would like try to fix. May I get some advise?

Thank you.

By: George Joseph (gjoseph) 2019-02-04 07:33:58.378-0600

Seems to be working OK for me.   Do you have a test stub and a dialplan snippet I can try?


By: sungtae kim (pchero) 2019-02-04 08:25:41.390-0600

Is this might be helpful?

{noformat}
*CLI> [2019-02-04 15:22:01] NOTICE[26233]: res_ari.c:768 process_cors_request: Origin header 'chrome-extension://pfdhoblngboilpfeibdedpjgfnlcodoo' does not match an allowed origin.
Creating Stasis app 'test'
 == WebSocket connection from '192.168.100.1:64444' for protocol '' accepted using version '13'
   -- Called sipp_test/sip:test@127.0.0.1:5061
   -- PJSIP/sipp_test-00000001 is ringing
      > 0x7f75f800a440 -- Strict RTP learning after remote address set to: 127.0.1.1:6000
   -- PJSIP/sipp_test-00000001 is ringing
   -- PJSIP/sipp_test-00000001 answered
      > Launching Stasis(test) on PJSIP/sipp_test-00000001

*CLI> core show channels
Channel              Location             State   Application(Data)
PJSIP/sipp_test-0000 s@test:1             Up      Stasis(test)
1 active channel
0 active calls
0 calls processed
{noformat}

1 channel, but 0 call.

By: George Joseph (gjoseph) 2019-02-04 08:41:05.238-0600

So the reason the call count isn't updating for you is that the call counter is driven by the dialplan.  When you originate a call to a technology destination other than "Local", the dialplan isn't invoked.  In your scenario "PJSIP/test-voip/sip:testcall@localhost:5061" bypasses the dialplan.

To be honest, I'm not sure if  this is a bug nor not and I'm not sure how I'd fix it if it were.



By: sungtae kim (pchero) 2019-02-04 08:57:19.001-0600

I had a talk in the IRC, about the 'calls'.

the 'calls' things are not provide correct info anymore(Especially ARI). It's a historical things.

{noformat}
file:
15:43 the definition of "call" within Asterisk was the number of channels executing PBX logic
15:43 well, is
15:43 that hasn't been changed/altered/tweaked since probably the creation of Asterisk
15:44 even though there are new ways to create channels, which could be considered "calls"
15:44 it gets complicated because of how you can move channels around and connect them in ARI too
{noformat}