web call back

Dedicated forum for feature requests. All feature requests will be reviewed and considered for future versions based on work involved and popularity of feature.

Moderators: kevin, 3CX staff

web call back

Postby bluetel2 » Thu Sep 03, 2009 4:19 pm

Hello,

it will be usefull a web call back.

tks
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby tpinnovations » Thu Sep 03, 2009 7:21 pm

This can be done with the HTTP API and a POST form.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby bluetel2 » Thu Sep 03, 2009 7:54 pm

tpinnovations wrote:This can be done with the HTTP API and a POST form.



realy ? a web call back from internet web site (not in company) ?
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby tpinnovations » Thu Sep 03, 2009 11:37 pm

Yes.

Your WEBBox will need to be able to send a POST form to your 3CXBox for it to work. It will ring the extension, the employee picks up the line and then the system dials out the call.

At some point this week I will post some PHP code to make it work.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby bluetel2 » Fri Sep 04, 2009 6:17 am

tpinnovations wrote:Yes.

Your WEBBox will need to be able to send a POST form to your 3CXBox for it to work. It will ring the extension, the employee picks up the line and then the system dials out the call.

At some point this week I will post some PHP code to make it work.


cool. can you send me the futur source when you post it ? ths :)
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby tpinnovations » Sat Sep 05, 2009 1:26 am

This is pretty basic, you will need to customize it for your setup.

config.php
Code: Select all
<?php
// This is the server upon which 3CX resides. Hostname or IP should work.
$host = 'http://localhost';
// This is the port for which the IVR system resides.
// You will need to open yourfirewall and configure IIS to allow connection.
$port = ':5484';
//The Extension for which the call will originate.
$ext = '1000';
// The PIN of the above extension.
$ext_pin = '1000';
// Prefix If you need to select a line with prefix
$prefix = '9';
?>



call.php
Code: Select all
<?php
require ('config.php');
$number = $_POST["number"];
$url = "$host$port/PbxAPI.aspx?func=make_call&from=$ext&pin=$ext_pin&to=$number";

$handle = fopen("$url", "r");
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);
?>


index.php
Code: Select all
<html>
<body>

<form action="call.php" method="post">
Number: <input type="text" name="number" />
<input type="submit" />
</form>

</body>
</html>
Last edited by tpinnovations on Thu Sep 10, 2009 5:09 pm, edited 1 time in total.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby bluetel2 » Thu Sep 10, 2009 4:52 pm

tpinnovations wrote:This is pretty basic, you will need to customize it for your setup.

config.php
Code: Select all
<?php
// This is the server upon which 3CX resides. Hostname or IP should work.
$host = 'http://localhost';
// This is the port for which the IVR system resides.
// You will need to open yourfirewall and configure IIS to allow connection.
$port = ':5484';
//The Extension for which the call will originate.
$ext = '1000';
// The PIN of the above extension.
$ext_pin = '1000';
// Prefix If you need to select a line with prefix
$prefix = '9';
?>



call.php
Code: Select all
<?php
require ('config.php');
$number = $_POST["number"];
$url = "$host$port/PbxAPI.aspx?func=make_call&from=$ext&pin=$ext_pin&to=$number";

$handle = fopen("$url", "r");
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);
?>


hello,

it's not really web to call. because the user have need 3cx phone. the web to call that i talk is like this:


- it's on web site (external web site)
- it's button who ask my phone number
- next an user of my company receive a call, and it's an automatic recall of the number who the user had post in web site
- some company propose web call back like "ippi" for exemple.
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby tpinnovations » Thu Sep 10, 2009 5:06 pm

That script functions exactly as your desire. They do not need 3CX on the receiving end.

You are probably confused because I didn't add the form and only the code, I have now attached it.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby igor.snezhko » Thu Sep 10, 2009 8:45 pm

Please place this code at Wiki. Very helpful.
MCSE NT, 2000, 2003, A+
Представитель 3CX в Украине
http://www.3cx.com.ua
igor.snezhko
3CX Valued Professional
3CX Valued Professional
 
Posts: 1424
Joined: Mon Jan 07, 2008 1:04 am
Location: Ukraine

Re: web call back

Postby tpinnovations » Thu Sep 10, 2009 9:30 pm

We use similar function code in an CRM application we developed for 3CX. Our code also allows agent logging, call pops and integrated customer management and ordering.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby igor.snezhko » Thu Sep 10, 2009 9:35 pm

Can you post example please of agent (Extension) logging? Very interesting!
MCSE NT, 2000, 2003, A+
Представитель 3CX в Украине
http://www.3cx.com.ua
igor.snezhko
3CX Valued Professional
3CX Valued Professional
 
Posts: 1424
Joined: Mon Jan 07, 2008 1:04 am
Location: Ukraine

Re: web call back

Postby tpinnovations » Fri Sep 11, 2009 12:20 am

Sorry, But I do not feel comfortable posting much more. While the API is open to all users of 3CX, our code is proprietary.
tpinnovations
3CX Valued Professional
3CX Valued Professional
 
Posts: 333
Joined: Thu Jul 30, 2009 4:57 am
Location: Dallas, Texas

Re: web call back

Postby bluetel2 » Fri Sep 11, 2009 7:52 am

Hi,

you have right it's work good. thks.

i will post a little graphical button in php code soon.
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby bluetel2 » Fri Sep 11, 2009 11:18 am

And the code

file call.php
Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<style type="text/css">
.fond {
   position: absolute;
   background-image: url(http://www.xxxxxxx.fr/webcallback/imb_back.jpg);
   width: 396px;
   height: 184px;
}   
.title {
   color: #1b7bb5;
   font-size: 0.9em;
   font-family: arial;
   font-weight: bold;
}   
.title2 {
   color: #1b7bb5;
   font-size: 0.7em;
   font-family: arial;
   font-weight: bold;
   margin-left: 40px;
   margin-top: 5px;
}   
.texte {
   position: absolute;
   width : 390px;
   height: 80px;
   margin-left: 15px;
   margin-top: 30px;
   color: #000;
   font-size: 0.6em;
   font-family: arial;
}   

</style>
<div class="title2">Merci, un correspondant va vous joindre d'ici quelques minutes.</div>

<br><br><center><INPUT TYPE="button" NAME="btFermer" VALUE="Fermer la fen&#234;tre" onClick="javascript:self.close();"></center>

<?php
require ('config.php');
$number = $_POST["number"];
$url = "$host$port/PbxAPI.aspx?func=make_call&from=$ext&to=$number&pin=$ext_pin";

$handle = fopen("$url", "r");
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);
?>


file config.php
Code: Select all
<?php
// This is the server upon which 3CX resides. Hostname or IP should work.
$host = 'http://xxxxxxx';
// This is the port for which the IVR system resides.
// You will need to open yourfirewall and configure IIS to allow connection.
$port = ':5484';
//The Extension for which the call will originate.
$ext = 'xxxx';
// The PIN of the above extension.
$ext_pin = 'xxxx';
// Prefix If you need to select a line with prefix
$prefix = '';
?>


file index.php

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<style type="text/css">
.fond {
   position: absolute;
   background-image: url(http://www.xxxxxxxx.fr/webcallback/imb_back.jpg);
   width: 396px;
   height: 184px;

}   
.title {
   color: #1b7bb5;
   font-size: 0.9em;
   font-family: arial;
   font-weight: bold;
}   
.title2 {
   color: #1b7bb5;
   font-size: 0.7em;
   font-family: arial;
   font-weight: bold;
   margin-left: 70px;
   margin-top: 5px;
}   
.texte {
   position: absolute;
   width : 390px;
   height: 80px;
   margin-left: 15px;
   margin-top: 30px;
   color: #000;
   font-size: 0.6em;
   font-family: arial;
}   

</style>
<body>
<div class="fond">   <div class="title">Web call Back </div>
               <div class="title2">Service de rappel automatique</div>
      
      <!--la ligne suivante permet d'appeler le fichier call.php afin de faire un "makecall" par le serveur 3cx // the next line call call.php file to make a "makecall" by 3cx system-->
         <div class="texte">
         <!--saisissez votre texte // Your texte-->
            Saisissez le numéro de téléphone sur lequel vous souhaitez être joint.<br>
            Cliquez ensuite sur Valider et vous serez appelé dans les plus bref délais.
            
            <!-- le code pour appeler le fichier call.php // the code to call call.php file don't touch-->
               <br><br>
               <form method="post" name="active" action="call.php" target="newWin" onsubmit="window.open(this.action, 'newWin', 'width=450, scrollbars=yes, height=50');">
               Votre numéro de téléphone: &nbsp;&nbsp;&nbsp; <input type="text" name="number" size="15">
               <input type="submit" value="Valider" alt="ok">
               </form>
         </div>
      
   </div>
</body>   
</html>   


and the image Image

when can send thanks to tpinnovation from texas for php code of the call.php and config.php
Image
Intégrateur IPBX 3CX
Contact : assistance@bluetel.fr
Tel +33 2 22 06 81 44
Découvrez notre site http://www.bluetel.fr
Image
bluetel2
3CX Valued Professional
3CX Valued Professional
 
Posts: 829
Joined: Thu Oct 16, 2008 11:07 am
Location: Nantes

Re: web call back

Postby ro » Thu Jun 17, 2010 7:54 pm

What if my user does not answer the call? and the client/person who clicked the link does it tell them no answer? I wanted this to work like google voice is that how this works?

Thanks,
Jonathan
ro
New User
 
Posts: 7
Joined: Wed Oct 14, 2009 7:55 pm


Return to Feature requests


Who is online

Users browsing this forum: No registered users and 0 guests

Announcements: