Your comments

Hello, this topic has been ‘completed’ but I still have questions about it (and posted the question after it was set to completed).

Do I have to open a new topic for this? 

Okay, but we (as end users) have no influence over the Tokens. So in my opinion it makes to sense to automatically include these in the count of the tokens. We only use the Online and HostIP token and all others can be left out for us because at the moment they do count for the license (Starter: 50 tags, Basic: 250 tags, etc).

If I make a Token private it should not be included in the Total tags count:

I managed to get it working. Changed the Doorbird extension from PJSIP to generic SIP and changed port numbers in FreePBX so that generic SIP is on 5060 since you can't change SIP server port number in Doorbird.

Now the call is not disconnected after 30 seconds.

The status is "Talking..." and after 30 seconds becomes "On Hook...".

I can call again after that and talk for 30 seconds again.

Hi,

There is one question, when I call from the intercom to i3 Pro and answer the call after 30 seconds it is terminated. 

The last log line is shown when the call gets disconnected:

I already increased the RTP timeout in FreePBX to 60 seconds, this does not make a difference.

I created a 'regular' SIP extension, then had to change the port in iRidium to 5160 and start the emulator 2 times. The first time it got stuck on "Registering...", the second time it says "On hook" and I can place a call with sound.

Thanks for the help!

Thanks for the help.

The RTP ports already match:

It's all in the local network.

I tried with 722 only, then when I press the call button nothing happens in iRidium, in the FreePBX log it shows:

[2021-04-09 13:32:46] NOTICE[21756] res_pjsip_sdp_rtp.c: No joint capabilities for 'audio' media stream between our configuration((g722)) and incoming SDP((ulaw|alaw))


I then tried only PCMU/ulaw and then only PCMA/alaw, both have the same result. No sound and constant errors in the log.

I had to find a workaround (as with many i3 issues) to make this work because we needed the functionality for an exhibition.

But given the answer of Vladimir below I don't think you understand what the problem is. To be completely honest, I don't understand how the given answer relates to the question Mantas asks. 

In the meantime you can extend the array prototype like so:

if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function(value) {
    for (var i = 0; i < this.length; i++) {
      if (this[i] == value) {
        return i;
      }
    }
    return -1;
  };
}

And call it like you wanted in your code:

var position = arrayuv.indexOf(numuv);

When will you update the JS engine to a newer version of ECMA? There are many functions in the newer versions that make life a lot easier.