PBXes (http://www1.pbxes.com/forum/index.php)
- English (http://www1.pbxes.com/forum/board.php?boardid=16)
-- Feature Requests (http://www1.pbxes.com/forum/board.php?boardid=23)
--- RE: See extension status from website (http://www1.pbxes.com/forum/threadid.php?threadid=1445421617)
See extension status from website
Our need would be to offer to our visitors the possibilty to see who is free and who's not. Is this possibile right now ? Or could you please integrate this feature ? Thank you
RE: See extension status from website
The feature is already there. Please have a look at webcall. You can choose URLs under Extensions.
RE: See extension status from website
Right but Can I see if the operator is busy from my webpage ?
EDIT: Now I can do the exact question:
Can I show my FOP inside an iframe of my website ?
RE: See extension status from website
Busy status are visible from webcall pages (you can display more than one extension). FOP cannot be displayed on websites because it requires to login first.
RE: See extension status from website
Probably we are talking of two different webpage... where is possibile to call "webcall pages", there is not any "spy" or indicator to see who's busy or not... could you please be more detailed ?
In general, I need to show on my website the presence of the operator that is on line or not. (like the green spy inside FOP).
If some operator connect his sip phone, on the website I need to show that he is connected. It is possible ?
RE: See extension status from website
We have tested again. The webcall page of an extension shows "Busy" under the extension's name if it is currently in a call. This information can be read by a php application, too, if you want to collect it.
RE: See extension status from website
YES, could be a solution. Could you please tell me what's the query I need to call to get back the "busy" variable ?
I'm explain myself better:
This is what I will do in php:
<?
conditions=check the ext addr xxx if is busy here I need the address where I will check the stauts of extention, where the answer could be: busy or null)
in case is busy I will show an image, in case not I will show other Image.
refresh page every xx seconds;
?>
I already know how to do, I just need the addres where check the status of extention and the variable name that contain "busy".
RE: See extension status from website
Your app needs to read the whole webcall page, and at the position where "Busy" is shown for busy extensions, look for it. If the string is present there, the extension is busy, if the string is not present where expected it is not in a call.
RE: See extension status from website
Wow... finally an effective answer MANY MANY MANY THANK YOU FOR THAT. Here's the code to get the status to show, in case someone need:
EDIT: I see there is some troubles when this script is used in a while cycle. So, The suggestion is to use to get single result as well. Use the script below that result more effective:
<?php
$p="Number of extention you want to check"; // es 01, 02 ecc
$addr="http://pbxes.org/youralias$p"; /* address of your Webcall page, NOTE: for this script the address need to end with the number of the extention you wanna check.*/
/*Now we will get not entire page, 'cause of latency problems but only the term we need.*/
$start_read=3214;
$interval=912;
/*Then we are ready to know the status of extensions we want to check */
if(!$page= file_get_contents($addr, false, null, $start_read, $interval)) die ("impossible to read the page");
if($status=strstr($page, "Busy")){
$status; echo "Busy";
} else {
echo "Idle";
}
fclose($page); // we close the web page reading
$curpage = $_SERVER['PHP_SELF'];
header('Refresh: 5; url=?code=$p' . $curpage);
?>
RE: See extension status from website
Thank you very much for sharing!
RE: See extension status from website
There is an easier way to access extension state. When getting the extension's webcall page with parameter "?action=state", you will get a number back which is
Zitat:
0 - Idle
1 - InUse
2 - Busy
4 - Unavailable
8 - Ringing
9 - Inuse & Ringing
Use of this parameter requires the host where your account is actually hosted (www1 to www4) to be given in the URL.
RE: See extension status from website
http:/pbxes.org/alias?action=state does not work for me, resulting in 404.
The WebCall page is valid, and works with no parameters or with ?action=video
p.s. I did try using specific http://wwwN.pbxes.org/ as well
--igor
RE: See extension status from website
hostname needs to be followed by .pbxes.com
Powered by: Burning Board Lite 1.0.2 © 2001-2004 WoltLab GmbH
English translation by Satelk