Author Topic: PHP code or online webphone  (Read 8068 times)

Offline Anonymous

  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
PHP code or online webphone
« on: April 25, 2006, 02:00:57 PM »
Just replace the code in ASP tags <% %> replace with the code below and rename the file as .php from .asp file


<?
print "<script>";
print "function init_iaxWebPhone()";
print "{";
print "for (i = 0; i < 12; i++)";
print "{   oImg = new Image();";
print "oImg.src = \'images/keypad_\' + i + \'_out.ico\'";
print "}";

print "oImg = new Image();";
print "oImg.src = \'images/hangup_in.ico\';";

print "oImg = new Image();";
print "oImg.src = \'images/hangup_out_ico\';";


print "var nInit = iaxWebPhone.InitIAX();";

print "if (nInit == 0)";
print "bInit = true;";

print "if (!bInit)";
print "{   ctrlMex(\'Error in Initialization.\');";
print "return(false);";
print "}";

print "getVolume(\'Spk\');";
print "getVolume(\'Mic\');";

print "iaxWebPhone.GetAudioDeviceInternal (0);";
if ($HTTP_POST_VARS["username"]!="" && $HTTP_POST_VARS["userphone"]!="")
{

  $username=$HTTP_POST_VARS["username"];
  $userphone=$HTTP_POST_VARS["userphone"];
  print "iaxWebPhone.SetCLIID(\'".$username."\', \'".$userphone."\');";
}
  else
{

  print "iaxWebPhone.SetCLIID(\'guest\', \'12345678910\');";
}

print "iaxWebPhone.UserID = \'".$HTTP_POST_VARS["userid"]."\';";
print "iaxWebPhone.Password = \'".$HTTP_POST_VARS["password"]."\';";
print "iaxWebPhone.HostName = \'".$HTTP_POST_VARS["hostname"]."\';";

print "if (typeof(iaxWebPhone.HostName) == \'undefined\')";
print "return(false);";

print "iaxWebPhone.Register();";
print "ctrlMex(\'Not logged in...\');";

print "setInterval("getVolume(\'Spk\')", 500);";
print "setInterval("getVolume(\'Mic\')", 500);";
print "iaxWebPhone.ApplyFilter(1,1,0,1,1);";
print "return(true);";
print "}";
print "</script>";
?>
« Last Edit: January 01, 1970, 05:00:00 AM by Anonymous »

Offline Anonymous

  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
how to link start.html to php
« Reply #1 on: May 05, 2006, 08:14:46 PM »
Hello,
I try the IAXWebPhone and it impress me very much, it will make more easy in use with VoIP phone anywhere.
I running in Linux host and follow the instruction to change the ASP file to .php.  But I cannot modify the start.html to link with .php file.
Sorry to ask for your help since I had read over the forum but cannot find any information about it.

I love the WebIAX and hope can use it soon.
regards,
Peter
« Last Edit: January 01, 1970, 05:00:00 AM by Anonymous »

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 153
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
how to link start.html to php
« Reply #2 on: May 06, 2006, 05:26:06 AM »
Oh yes , plz use this for start.html, it is already pointing to php page you can modifiy according to your needs.



<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode"><meta http-equiv="Content-Language" content="en-us">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY bgColor=#cacaca>
<DIV align=center>
<div align="center" style="WIDTH: 326; HEIGHT: 288">
  <center>
  <table cellspacing="0" cellpadding="0" border="0" width="50%" style="border-collapse: collapse" bordercolor="#111111">
      <tr>
         <td width="100%" align="middle"><A href="www.geocities.com/babarnazmi" target=_blank>
      <OBJECT id=ShockwaveFlash1 style="WIDTH: 390px; HEIGHT: 103px"
      codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#3,0,0,0
      height=103 width=390 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="_cx" VALUE="10319"><PARAM NAME="_cy" VALUE="2725"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="images/logotext.swf"><PARAM NAME="Src" VALUE="images/logotext.swf"><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1">
        <embed src="images/logotext.swf" pluginspage="http://www.macromedia.com/shockwave/download/" type="application/x-shockwave-flash" width="120" height="41">
    </embed></OBJECT></A></td>

      </tr>
   </table>

  </center>

  <p>&nbsp;</p>
  <center>
     <form method="post" action="IaxwebTelephone.php" target=_self>
  <table border="2" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#808080" height="96" width="267" bgcolor="#99a68b">
    <tr>
      <td width="105" height="12">
      <p align="center"><font face="Tahoma,Verdana,Arial,Helvetica" size="2">UserID</font></td>
      <td width="162" height="12">

        <p align="center">

        <input name="userid" size="22" >
      </td>
    </tr>
    <tr>
      <td width="105" height="22">
      <p align="center"><font face="Tahoma,Verdana,Arial,Helvetica" size="2">Password</font></td>
      <td width="162" height="22">
      <p align="center"><input type=password name="password" size="22" ></td>
    </tr>
    <tr>
      <td width="50%" height="22%" align="center"><font face="Tahoma,Verdana,Arial,Helvetica" size="2">Host Name</font></td>
      <td width="162" height="22">
      <p align="center"><input name="hostname" size="22" ></td>
    </tr>
    <tr>
      <td width="105" height="11">
      <p align="center"><font face="Tahoma,Verdana,Arial,Helvetica" size="2">User\'s Name</font></td>
      <td width="162" height="11">
      <p align="center"><input name="username" size="22" ></td>
    </tr>
    <tr>
      <td width="105" height="25">
      <p align="center"><font face="Tahoma,Verdana,Arial,Helvetica" size="2">User\'s Phone no</font></td>
      <td width="162" height="25">
      <p align="center"><input name="userphone" size="22" ></td>
    </tr>
  </table>

  </center>
</div></DIV>
<P align=center><input type="submit" value="Login" name="B1"><input type="reset" value="Reset" name="B2"></P></FORM></BODY></HTML>
« Last Edit: January 01, 1970, 05:00:00 AM by babar »
....God is the greatest Programmer....

http://www.silicontechnix.com

Offline Anonymous

  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
(No subject)
« Reply #3 on: May 06, 2006, 09:14:52 PM »
Thank you, Babar,
I had modified the start.html link to .php but seems not success in registering.  Just display "Initializing..."
Tht ASP test very fine.
No idea today & will try up tomorrow.
regards,
Peter
« Last Edit: January 01, 1970, 05:00:00 AM by Anonymous »

Offline Jurik

  • Regular Memeber
  • ***
  • Posts: 14
  • Karma: +0/-0
    • View Profile
(No subject)
« Reply #4 on: May 08, 2006, 08:50:53 PM »
Quote from: \"Peter\"
Just display "Initializing..."


Is it possible that you try it with Firefox? Or any non-IE webbrowser?

It will only work with browsers that support activeX - beside the Internet Explorer, I\'ve heard rumors that there is an activeX plugin for firefox - but I didn\'t find anything yet.


Edit: The "<a href> </a>"-tag around the flash-animation doesn\'t work, cuz flash is the highest level and if you want link something with it - you\'ve to put the link into the flash animation.
« Last Edit: January 01, 1970, 05:00:00 AM by Jurik »

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 153
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
how to link start.html to php
« Reply #5 on: May 08, 2006, 11:16:21 PM »
Quote
"Initializing..."


it means activeX control is not loaded or some error in script (script terminated before loading activex control), Jurik suggestions are good, so please check you are using IE and you allow activeX loading. it is a signed cab file from thawte.com so no need to worry about anything bad  :) from that activeX control.

I m also looking for firefox activeX plugin i have that plugin but never got a chance to test it, downloaded from mozilla website.

Regards,
Babar Shafiq Nazmi
« Last Edit: January 01, 1970, 05:00:00 AM by babar »
....God is the greatest Programmer....

http://www.silicontechnix.com

Offline Jurik

  • Regular Memeber
  • ***
  • Posts: 14
  • Karma: +0/-0
    • View Profile
(No subject)
« Reply #6 on: May 09, 2006, 12:53:38 PM »
Here is the link for active-x - I installed it via javascript on firefox 1.5.0.3 - but it still doesn\'t work :P ... so *shrug* maybe you find a way to make it *smile*

http://http://www.iol.ie/~locka/mozilla/plugin.htm
« Last Edit: January 01, 1970, 05:00:00 AM by Jurik »

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 153
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
PHP complete version
« Reply #7 on: June 13, 2006, 02:41:20 PM »
« Last Edit: January 01, 1970, 05:00:00 AM by babar »
....God is the greatest Programmer....

http://www.silicontechnix.com