Yes, a bit more sense now
Apart from the typo in the link you gave
$url = "https://ip.address.of.swvx/api?cmd=
However, still not having any luck getting it to work. I then decided to go back to real basics and build it up. And found that my my script works but not in the Switchboard.
Here's why I've done - this is about as simple as it can be. This is my test.php code
- Code: Select all
$extension = $_GET['extension'];
Your extension number is <?php echo $extension ?> <br />
<a href="http://ip.address.of.switchvox/api?cmd=call&dial_first=<?php echo $extension ?>&dial_second=4003">Call 4003</a>
My Switchboard panel is set to http://ip.address.of.webserver/test.php?extension=
When I browse to (not in Switchboard) http://ip.address.of.webserver/test.php?extension=4008
I get the correct details displayed ie
Your extension number is 4008
and the link on the 'Call 4003' correctly shows http://ip.address.of.switchvox/api?cmd= ... econd=4003
So that proves that the very simple script is taking the %extension% parameter and putting it in the correct place.
However, when loading Switchboard it shows this
Your extension number is %extension%
and the link on the 'Call 4003' in correctly shows http://ip.address.of.switchvox/api?cmd=call&dial_first=
The script that links the LDAP DB is quite complicated so I won't bother getting in to that here. But this simple (it couldn't be any simpler if anyone tried) shows that the parameters work correctly in a browser but not in Switchboard.
Any ideas why?