| Author |
Message |
deaftoned
Joined: Aug 22, 2006
Posts: 4
Status: Offline
|
| Posted:
Aug 22, 2006 - 09:43 AM |
|
|
hey everyone, i was asked to develop a click2call application using php that supports OPENSER. im not quite sure of where i should start from. any help? anyone can direct me? thank u oh so much. |
|
|
|
 |
dean
Site Admin
Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
|
| Posted:
Aug 22, 2006 - 09:47 AM |
|
|
Hi deaftoned,
openSER uses the SIP protocol, so you're starting point would be the SIP whitepapers I would think.
Dean |
|
|
|
 |
deaftoned
Joined: Aug 22, 2006
Posts: 4
Status: Offline
|
| Posted:
Aug 23, 2006 - 01:07 PM |
|
|
okay i read some whitepapers. now what? |
|
|
|
 |
dean
Site Admin
Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
|
| Posted:
Aug 23, 2006 - 01:19 PM |
|
|
Well, now you know how the SIP protocol works from reading the whitepapers, you build it. |
|
|
|
 |
deaftoned
Joined: Aug 22, 2006
Posts: 4
Status: Offline
|
| Posted:
Aug 24, 2006 - 09:03 AM |
|
okay now i have this code, but it is not working. i think it is of because of REFER not being able to support B2BUA ? please help me!
| Code: |
<?php
/* config values */
$web_contact="sip:daemon@siphub.net";
$fifo="/tmp/ser_fifo";
$signature="web_test_0.0.0";
/* open reply fifo */
$myfilename="webfifo_".rand();
$mypath="/tmp/".$myfilename;
echo "Initiating your request...<p>";
/* open fifo now */
$fifo_handle=fopen( $fifo, "w" );
if (!$fifo_handle) {
exit ("Sorry -- cannot open fifo: ".$fifo);
}
/* construct FIFO command */
$fifo_cmd=":t_uac:".$myfilename."\n".
"REFER\n".$caller."\n".
"p-version: ".$signature."\n".
"Contact: ".$web_contact."\n".
"Referred-By: ".$web_contact."\n".
"Refer-To: ".$callee."\n".
"\n". /* EoHeader */
".\n\n"; /* EoFifoRequest */
/* create fifo for replies */
system("mkfifo -m 666 ".$mypath );
/* write fifo command */
if (fwrite( $fifo_handle, $fifo_cmd)==-1) {
unlink($mypath);
fclose($fifo_handle);
exit("Sorry -- fifo writing error");
}
fclose($fifo_handle);
/* read output now */
if (readfile( $mypath )==-1) {
unlink($mypath);
exit("Sorry -- fifo reading error");
}
unlink($mypath);
echo "<p>Thank you for using click-to-dial<p>";
?>
|
i used an htm file as an interface with FROM and TO to post the values. but again, i think this REFER approach is not correct? THANK U! |
|
|
|
 |
dean
Site Admin
Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
|
| Posted:
Aug 24, 2006 - 09:40 AM |
|
|
What is it that you want to achieve? |
|
|
|
 |
deaftoned
Joined: Aug 22, 2006
Posts: 4
Status: Offline
|
| Posted:
Aug 24, 2006 - 09:50 AM |
|
|
i want to have this html page with:
____________________
FROM: [ ]
TO: [ ]
[SUBMIT]
____________________
to make a voip call directly from the webpage. it should support openSER. nothing is working.
i think the reason is that the use of REFER for third-party call-control has not been standardized due to resistance of proponents of B2BUA use (which is somewhat bloated and not always operational) |
|
|
|
 |
janny93
Joined: Dec 19, 2006
Posts: 28
Status: Offline
|
| Posted:
Jan 10, 2007 - 10:47 PM |
|
|
Hello all,
I have the same goal as deaftoned, I would like to create click to call application integrated into the website. Is there any open source code to accomplish this goal?
Thanks a lot
Janny |
|
|
|
 |
gray
Site Admin
Joined: Jun 10, 2004
Posts: 3185
Location: Portugal
Status: Offline
|
| Posted:
Jan 12, 2007 - 09:00 PM |
|
|
Hi Janny
Nothing that seems to work well, as yet. But as you will know from reading through this forum section there are options already available from Busta and Skype |
|
|
|
 |
martyndavies
Site Admin
Joined: Sep 13, 2006
Posts: 576
Location: The Surrey Hills
Status: Offline
|
| Posted:
Jan 19, 2007 - 03:11 PM |
|
I'm not sure REFER is the correct approach. REFER is used for call transfer.
I think what you want is third party call control (3PCC), where SIP is used to call in two directions at once with the aim of joining the established calls together. There's an RFC about 3PCC - RFC3725. It's been a while since I read it but I remember it described several different methods, with commentary on which procedures are better. |
|
|
|
 |
|