SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
deaftonedOffline



Joined: Aug 22, 2006
Posts: 4

Status: Offline
Posted: Aug 22, 2006 - 09:43 AM Reply with quote Back to top
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.
View user's profile Send private message
deanOffline
Site Admin


Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
Posted: Aug 22, 2006 - 09:47 AM Reply with quote Back to top
Hi deaftoned,

openSER uses the SIP protocol, so you're starting point would be the SIP whitepapers I would think.

Dean
View user's profile Send private message
deaftonedOffline



Joined: Aug 22, 2006
Posts: 4

Status: Offline
Posted: Aug 23, 2006 - 01:07 PM Reply with quote Back to top
okay i read some whitepapers. now what?
View user's profile Send private message
deanOffline
Site Admin


Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
Posted: Aug 23, 2006 - 01:19 PM Reply with quote Back to top
Well, now you know how the SIP protocol works from reading the whitepapers, you build it.
View user's profile Send private message
deaftonedOffline



Joined: Aug 22, 2006
Posts: 4

Status: Offline
Posted: Aug 24, 2006 - 09:03 AM Reply with quote Back to top
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!
View user's profile Send private message
deanOffline
Site Admin


Joined: Dec 13, 2003
Posts: 7867
Location: London
Status: Offline
Posted: Aug 24, 2006 - 09:40 AM Reply with quote Back to top
What is it that you want to achieve?
View user's profile Send private message
deaftonedOffline



Joined: Aug 22, 2006
Posts: 4

Status: Offline
Posted: Aug 24, 2006 - 09:50 AM Reply with quote Back to top
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)
View user's profile Send private message
janny93Offline



Joined: Dec 19, 2006
Posts: 28

Status: Offline
Posted: Jan 10, 2007 - 10:47 PM Reply with quote Back to top
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
View user's profile Send private message
grayOffline
Site Admin


Joined: Jun 10, 2004
Posts: 3185
Location: Portugal
Status: Offline
Posted: Jan 12, 2007 - 09:00 PM Reply with quote Back to top
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
View user's profile Send private message
martyndaviesOffline
Site Admin


Joined: Sep 13, 2006
Posts: 576
Location: The Surrey Hills
Status: Offline
Posted: Jan 19, 2007 - 03:11 PM Reply with quote Back to top
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.
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.