German Version
WEB IAX Phone Implementation HowTo

A view ActiveX based Softphones are available in the Internet. Most of them are commercial offers. The ActiveX Control, used on this site, was build from Babar Shafiq Nazmi based on the 'IAXClient' SourceForge project.

The 'IAXClient' and all applications which use this library static are subject to the restrictions and rights of 'GPL' or 'LGPL'.

The associated and from Babar Shafiq Nazmi builded Web GUI is only usable to demonstrate the ActiveX Control. For this reason the Web GUI 'WEB IAX Phone' was build. This site describes how the 'WEB IAX Phone' can be use on your own Web site and IAX server.

The 'WEB IAX Phone' is free for non commercial use.

Add the following HTML / Javascript elements to integrate the 'WEB IAX Phone' to your Web page :

<script language="javaScript">
  iaxServer="example.dyndns.org";
  iaxName="webiaxuser";
  iaxPass="topsecret";
  iaxCLID="10000";
</script>
<script src="http://www.dorstel.de/iaxphone/call/iaxWebStart.js"
type="text/javascript"></script>

This lines used only once per HTML page. The variables haves the following meanings :

[iaxServer]   The hostname or IP address of your Asterisk server.

[iaxName]   The username of the IAX user in the 'iax.conf' configuration file of the Asterisk server. If you use the 'guest' account you may use this variable with a empty value.

[iaxPass]   The password of the IAX user in the 'iax.conf' configuration file of the Asterisk server. If you use the 'guest' account you may use this variable with a empty value. If you use this variable with a empty value and you not use the 'guest' account, the 'WEB IAX Phone' will ask you for a password.

[iaxCLID]   The 'Calling Line ID' is used from 'WEB IAX Phone' as source number. If you use this variable with a empty value the 'WEB IAX Phone' will use the empty string as source number in outgoing calls.

<a href="javascript:iaxWebStart('10001')">IAX Test Call</a>

This link start a outgoing call. The destination number in this example is '10001'. You can define and use any number of links in one HTML page.

Here you will find a example implementation.

To use this example with your Asterisk server you need a IAX user in the 'iax.conf' configuration file :

[webiaxuser]
type=friend
host=dynamic
secret=topsecret
context=default

You also need a dialplan to route a call from the user 'webiaxuser', used by 'WEB IAX Phone', to a destination. The destination in this example is a SIP phone named 'cisco7960' with the destination number '10001'. Add the following lines to the 'Asterisk' configuration file 'extensions.conf' :

[default]
exten => 10001,1,Answer
exten => 10001,2,Dial(SIP/cisco7960,180,g)
exten => 10001,3,Congestion
exten => 10001,103,Busy

To handle incoming calls for the 'webiaxuser', used by 'WEB IAX Phone', from a context named 'from_isdn' with the destination number '10000', add the following lines to the 'Asterisk' configuration file 'extensions.conf'. Use the number '10000' also as 'iaxCLID' in the HTML page.

[from_isdn]
exten => 10000,1,Answer
exten => 10000,2,Dial(IAX2/webiaxuser,180,g)
exten => 10000,3,Congestion
exten => 10000,103,Busy