New Plugin: FreePBX

Posted on
Fri May 01, 2020 7:01 am
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: New Plugin: FreePBX

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.

Posted on
Fri May 01, 2020 8:00 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: FreePBX

Sorry, forgot about this thread.

I’ll look shortly.

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Fri May 01, 2020 12:59 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: FreePBX

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

Posted on
Fri May 01, 2020 1:23 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: FreePBX

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

Posted on
Tue May 05, 2020 4:57 am
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: New Plugin: FreePBX

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.

Posted on
Tue May 05, 2020 5:07 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: FreePBX

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

Who is online

Users browsing this forum: No registered users and 3 guests