PBXes » English » Feature Requests » RE: See extension status from website
Print Page | Recommend to Friend | Add Thread to Favorites
Post New Thread Post Reply
Author
Post « Previous Thread | Next Thread »
car
Grünschnabel


Registration Date: 12.02.2015
Posts: 10

See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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

21.10.2015 11:00 cartomanzia is offline Search for Posts by cartomanzia Add cartomanzia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

The feature is already there. Please have a look at webcall. You can choose URLs under Extensions.

22.10.2015 14:28 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
car
Grünschnabel


Registration Date: 12.02.2015
Posts: 10

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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 ?

This post has been edited 1 time(s), it was last edited by car on 23.10.2015 at 07:57.

23.10.2015 07:26 cartomanzia is offline Search for Posts by cartomanzia Add cartomanzia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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.

26.10.2015 08:57 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
car
Grünschnabel


Registration Date: 12.02.2015
Posts: 10

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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 ?

This post has been edited 1 time(s), it was last edited by car on 27.10.2015 at 18:31.

27.10.2015 14:35 cartomanzia is offline Search for Posts by cartomanzia Add cartomanzia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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.

11.11.2015 09:51 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
car
Grünschnabel


Registration Date: 12.02.2015
Posts: 10

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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 busytraurig 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".

This post has been edited 1 time(s), it was last edited by car on 11.11.2015 at 12:05.

11.11.2015 11:57 cartomanzia is offline Search for Posts by cartomanzia Add cartomanzia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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.

02.12.2015 11:40 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
car
Grünschnabel


Registration Date: 12.02.2015
Posts: 10

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

Wow... finally an effective answer smile 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);

?>

This post has been edited 3 time(s), it was last edited by car on 03.12.2015 at 14:34.

02.12.2015 17:33 cartomanzia is offline Search for Posts by cartomanzia Add cartomanzia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

Thank you very much for sharing!

02.12.2015 22:33 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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.

01.10.2016 11:56 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
sia
Premium Account


Registration Date: 07.07.2006
Posts: 11

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

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

This post has been edited 1 time(s), it was last edited by sia on 01.04.2017 at 21:44.

01.04.2017 21:13 sia is offline Search for Posts by sia Add sia to your Buddy List
i-p
Super Moderator


Registration Date: 14.01.2006
Posts: 4784

RE: See extension status from website Post Reply with Quote Edit/Delete Post Report Post to a Moderator       IP Information Go to the top of this page

hostname needs to be followed by .pbxes.com

03.04.2017 11:08 i-p-tel is offline Search for Posts by i-p-tel Add i-p-tel to your Buddy List
 
Post New Thread Post Reply
Go to:

Powered by Burning Board Lite 1.0.2 © 2001-2004 WoltLab GmbH
English Translation by Satelk