BLF hints over IAX2 trunk to remote system

We have two systems networked over IAX and would like to have a blf hint button for call flow control toggle.of system A on a phone at system B. We have the star code working across the network to toggle the call flow and it works well but would like to have it as a button on System B phone since the user travels between offices and a visual indicator would make it work better for them. they also would like to be able to have the same solution for call forward unconditional…when i program the key *9655XX on system a it will light up when enabled and will read back the extension and where it is forwarded but when dialing the same code at system B doesnt seem to remove the forward or cause the light to update…we do have the *9655XX routed over he IAX trunk at System B just like the flow control but doesnt deem to work…any help is appreciated

The Proper™ way to do this in Asterisk is with Distributed Device States. I can’t help with DDS, but you might adapt this simple script which polls a remote PBX for a hint status and then updates the local hint to match:

thanks …this worked

1 Like

Hi, I’m in the same position but don’t know how/where to actually load up the php script. I’m guessing this is pretty basic stuff…I just haven’t had to go this route in the past. Any help would be appreciated. Thanks.

Same problem as mentioned above. I have one main office with IAX connects to 2 branches and want to see the remote lines at main office switchboard. Local hints are ready, connect to remote system is working. But where to save the script? How will it issued to run? Which process shall run the script? Are there any recommendations concerning access rights and read/write/execute needs?

I can’t access github from here, so I can’t really help a lot with analyzing the code. I remember the discussion about it, though, and I do recall that the script is run from the system where the phone that wants access lives. I also expect that you’re going to have to massage the script a little to accommodate two servers. @lgaetz might be able to illuminate more.

I expect from crond, but that’s kind of an experienced guess. IIRC, it was an asterisk cron job, so the ‘where’ of it would be “almost anywhere on the remote servers accessible to cron”. The command to modify cron would be ‘crontab -eu asterisk’.

The asterisk cron job would be where it’ll probably end up. I’d start by running is as the ‘asterisk’ user and see what it does.

r-x------ would be good permissions (where the owner is asterisk) and put it in any directory that asterisk can execute.

Yes. That’s the way simply minute-devided crontab. Before changing to user asterisk I’m running from root’s crontab in the first step.
Testing only between 11 and 12 o clock with 5 secs sleep

  • 11-12 * * * for i in {1…10}; do /usr/bin/php /root/remoteblf-xxx.php; sleep 5; done >/dev/null 2>&1
    and /dev/null to avoid minutely emails from root.

Hi @guenni

I’ve been deliberately quiet on this subject because I knew this page was coming: Community Documentation - Remote BLF’s using PJSIP

The above page outlines how to configure 2 FreePBX and/or PBXact systems using a current version of Asterisk 16+ and PJSIP extensions to share extension states across multiple systems. It was prepared by Sangoma support engineer @jackcampbell. As this is real time using native Asterisk functionality, it pretty much supersedes any previous methods based on polling scripts.

1 Like

many thanks Lorne and Jack. I will try to implement this during the upcoming weekend and revert next week.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.