Page 2 of 2

Re: New Plugin: FreePBX

PostPosted: Fri May 01, 2020 7:01 am
by raoul
Following further investigation, I found that part of my problem had been the lack of a module; Follow Me (not one I've ever had cause to use over the years). Anyway activating this caused another error with the php.
Long story short, I'm at a brick wall now of;

Error (client) illegal state key onOffState defined by plugin -- native state keys cannot be overridden (ignoring)

I don't seem to be able to find the underlying problem. As such I'll just have to put it down to an incompatibility with RestAPI 15 unless anyone else can confirm they've had it working.

A shame, what I was really after was to have call forwarding based on Geo location, handled by Indigo.

Re: New Plugin: FreePBX

PostPosted: Fri May 01, 2020 8:00 am
by howartp
Sorry, forgot about this thread.

I’ll look shortly.

Peter


Sent from my iPhone using Tapatalk Pro

Re: New Plugin: FreePBX

PostPosted: Fri May 01, 2020 12:59 pm
by howartp
Ok.

Two changes you need to make.

One - replace all occurances of "onOffState" throughout plugin.py and Devices.xml with "onOff_State".

Two - change line 88 in plugin.py from:
Code: Select all
      server = indigo.devices[1644005444] # "PBX - House"
to
Code: Select all
      for s in indigo.devices.iter("self.Server"):
         server = s #Assuming there's only one server, pick it
Make sure the indents are tabbed correctly.

That should sort out the inherent errors.

Peter

Re: New Plugin: FreePBX

PostPosted: Fri May 01, 2020 1:23 pm
by howartp
I've uploaded fixed version to my github.

https://github.com/howartp84/FreePBX/releases/tag/1.0.1

It also handles a non-existent Server (ie when a user first installs).

@Jay @Matt do you want to try contacting @C4W or do you want to swap the plugin store to mine? (Or remove it and I'll push it to store)

Peter

Re: New Plugin: FreePBX

PostPosted: Tue May 05, 2020 4:57 am
by raoul
Thanks so much for that. Unfortunately that's still not really working for me. The Follow Me plug-in kicks up a php error (I could send direct via pm or email if it'll help). Previously I'd been hashing out lines around 92 to get around this given that normally don't use that module.

Any advise would be gratefully received.

Thanks.

Re: New Plugin: FreePBX

PostPosted: Tue May 05, 2020 5:07 am
by howartp
Feel free to PM me.

I don’t have a PBX to test so I’m coding blind, but happy to look.

Peter


Sent from my iPhone using Tapatalk Pro