+1
Not a bug
IR.EVENT_ONLINE & IR.EVENT_OFFLINE doesn't work for SIP device
Эмиль Боев 10 jaar geleden
in iRidium Script / AV and Driver scripts
•
bijgewerkt 10 jaar geleden •
14
BeeToo.AddListener(IR.EVENT_ONLINE, IR.GetDevice('SIP'), function () { //some code }); BeeToo.AddListener(IR.EVENT_OFFLINE, IR.GetDevice('SIP'), function () { //some code }); Device is connected, fir sure! Incoming calls working. But now evend handling for Online and Offline.
Customer support service by UserEcho
EVENT_ONLINE with SIP works when:
1. i2 control was started
2. Driver is disconnected, and you use IR.GetDevice('SIP').Connect();
3. You maximize i2 control (background mode is off).
EVENT_OFFLINE with SIP works when:
1. You minimize i2 control (background mode is off).
EVENT_OFFLINE with SIP doesn't work when:
2. Driver is connected, and you use IR.GetDevice('SIP').Disconnect();
What situation do you use?
V2.2.1 and V2.2.2 work at the same
At the very start of i2control app natove driver automatically connecting and EVENT_ONLINE must take place.
But it doesn't.
When one calling device.Disconnect() method - SIP is trully disconnecting.
BUT: it doesn't fire EVENT_OFFLINE event. But it should to.
For example:
I use this code:
When i2 control start, I get a log:
How you can see:
What is not correct?
Then:
Yes, it is. And I answered you about this in the my first post: This action is not processed in i2 control now. We added your idea in the backlog.
May be I missed something?
V2.2.1 and V2.2.2 work at the same
So, current:
Is already working in V2.2.1?
how does SIP's EVENT_ONLINE & EVENT_OFFLINE work when background mode is on?
Why?
The Background mode allows drivers to work even if you minimize the app.
So, when background mode is on, and you minimize the app -> nothing happens. EVENT_ONLINE & EVENT_OFFLINE aren't happen.
After 3 minutes (or 19 minutes, if you use Location tag) the app will be closed by iOS. The app doesn't receive EVENT_OFFLINE when it happens, because iOS stops the app externally, not as a normal process of app closing. And EVENT_OFFLINE do not have time to work.