[Asterisk-doc] Asterisk / Cisco ATA186 mini-HOWTO

Leif Madsen asterisk-doc@lists.digium.com
Thu, 25 Mar 2004 08:53:08 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_005F_01C41246.98AFDF50
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Good morning everyone,

Vikas Alathur has graciously submitted documentation on the configuration of
a Cisco ATA-186 with Asterisk.  I would like someone to read over the
documentation of give some feedback.  If all looks good, I will start
converting to DocBook this weekend and submit it to CVS.

One thing I am curious about though is that Vikas has submitted a sample
configuration.  Should this be included?  If so, how should we go about
that?  I could probably take a screen shot, save it to the CVS then include
the picture in the book (I assume).

Suggestions appreciated,
Leif Madsen.

------=_NextPart_000_005F_01C41246.98AFDF50
Content-Type: text/html;
	name="index.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="index.html"

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">=0A=
<html>=0A=
         =0A=
  <title>Asterisk and ATA-186</title>=0A=
  <body>=0A=
      =0A=
<h1 align=3D"center">Asterisk / Cisco ATA186 mini-HOWTO</h1>=0A=
=0A=
=0A=
<h3 align=3D"left">Requirements</h3>=0A=
     =0A=
<ol>=0A=
     <li>               =0A=
    <p align=3D"left">A GNU/Linux machine running Asterisk from CVS   =
</p>=0A=
    </li>=0A=
    <li>               =0A=
    <p align=3D"left">Cisco ATA186 with version 2.16.1 [<font =
size=3D"-1">Version:=0A=
  v2.16.1 ata18x (Build 030709a)]</font> of the firmware   </p>=0A=
    </li>=0A=
</ol>=0A=
     =0A=
<h3 align=3D"left">Configure the ATA186</h3>=0A=
     =0A=
<p align=3D"left">Making some assumptions here:</p>=0A=
     =0A=
<blockquote>          </blockquote>=0A=
   =0A=
<ol>=0A=
    <li>Your ATA-186 is set to the IP address: 192.168.1.50            =
</li>=0A=
    <li>Your Asterisk box is on the same network and is set to the IP: =
192.168.1.100 =0A=
   </li>=0A=
   =0A=
</ol>=0A=
   =0A=
<blockquote>      =0A=
  <ol>=0A=
             =0A=
  </ol>=0A=
  </blockquote>=0A=
     =0A=
<p align=3D"left">If not, then make adjustments where necessary. For =
more information=0A=
 on configuring the system go to <a=0A=
 =
href=3D"http://www.cisco.com/univercd/cc/td/doc/product/voice/ata/">http:=
//www.cisco.com/univercd/cc/td/doc/product/voice/ata/</a>=A0=A0</p>=0A=
     =0A=
<p align=3D"left">Connect your ATA186 to the network, power and two =
phones=0A=
as described in the instructions.=A0 As soon as the unit receives =
power:</p>=0A=
     =0A=
<p>   </p>=0A=
   =0A=
<ol>=0A=
    <li>     Lift the handset (of Phone-1) and press the function (red =
light)=0A=
button on  the ATA186   </li>=0A=
    <li>     Hear "configuration menu, enter menu number..."</li>=0A=
    <li>Type: 322873738# =A0[Hint: 322873738 reads as FACTRESET]</li>=0A=
    <li>Hear "to save press star, or press the pound key"</li>=0A=
    <li>Press "*"</li>=0A=
    <li>The red light will flash, device is now reset to defaults (you =
may=0A=
 get a short ring)</li>=0A=
    <li>Hang up the phone</li>=0A=
   =0A=
</ol>=0A=
     =0A=
<p>To set the IP address for your ATA-186</p>=0A=
   =0A=
<ol>=0A=
    <li>Pick up Phone-1</li>=0A=
    <li>Press red button again</li>=0A=
    <li>20#  0# 3 - this sets dhcp to "no"</li>=0A=
    <li>1# 192*168*1*50 #3 - this sets the IP address (to =
192.168.1.50)</li>=0A=
    <li>10# 255*255*255*0 #3  - this sets the netmask</li>=0A=
    <li>Hang up the phone - the device will reset with new=0A=
    IP address parameters</li>=0A=
   =0A=
</ol>=0A=
   =0A=
<p align=3D"left"><br>=0A=
  Now for the actual configuration you will need a web browser.=A0 You =
could=0A=
 set all these options via the keypad of a phone but that would be very =
tedious.=A0=0A=
 So open a new browser window or another console and let's start.</p>=0A=
          =0A=
<ol>=0A=
    <li>Goto the URL <a =
href=3D"http://192.168.1.50/dev">http://192.168.1.50/dev</a> =0A=
   </li>=0A=
    <li>If you are asked for a password enter it.   </li>=0A=
    <li>You should now see a <b>Cisco ATA 186 Configuration</b> with    =0A=
many  colored boxes.   </li>=0A=
    <li>Have a look at <a href=3D"ata186.html">a sample ATA-186 =
configuration</a>=0A=
 and configure your ATA box accordingly</li>=0A=
    <li>Click the <b>Apply</b> button at the bottom of the page. </li>=0A=
   =0A=
</ol>=0A=
                    =0A=
<p align=3D"left"><b>NOTE:</b> This configuration is safe if your =
Asterisk=0A=
Box and ATA186 are on a private/NAT network or are behind a firewall.=A0 =
If=0A=
this is not the case you should set a password in <b>UIpasswd</b> and use=0A=
more complex <b>UID </b>and <b>PWD</b> values.</p>=0A=
     =0A=
<h3 align=3D"left">Configuring Asterisk</h3>=0A=
      =0A=
<p align=3D"left">By now you should have Asterisk compiled and installed =
on=0A=
 your machine.=A0 If this is not the case then go to <a=0A=
 href=3D"http://www.asterisk.org">www.asterisk.org</a> and follow the =
documentation.=A0=0A=
 Once that is done you are ready to continue here.</p>=0A=
      =0A=
<ol>=0A=
     <li>               =0A=
    <p align=3D"left">Open (/etc/asterisk/) sip.conf in your favorite =
editor=0A=
 and make the following entries<br>=0A=
      <br>=0A=
  ; ----- snip -----<br>=0A=
  ; SIP Configuration for Asterisk<br>=0A=
  [general]<br>=0A=
  ; Port to bind to<br>=0A=
  port =3D 5060<br>=0A=
  ; Address to bind to<br>=0A=
  bindaddr =3D 0.0.0.0<br>=0A=
  [1000]<br>=0A=
  type=3Dfriend<br>=0A=
  username=3D1000<br>=0A=
  secret=3Dpassword1<br>=0A=
  host=3D192.168.1.50<br>=0A=
  ;This is the context (in extensions.conf) that handles internal =
calls<br>=0A=
  context=3Dinternal<br>=0A=
  canreinvite=3Dyes<br>=0A=
  dtmfmode=3Drfc2833<br>=0A=
  [2000]<br>=0A=
  type=3Dfriend<br>=0A=
  username=3D2000<br>=0A=
  secret=3Dpassword2<br>=0A=
  host=3D192.168.1.50<br>=0A=
  context=3Dinternal<br>=0A=
  canreinvite=3Dyes<br>=0A=
  dtmfmode=3Drfc2833<br>=0A=
  ; ----- snip -----<br>=0A=
      <br>=0A=
      </p>=0A=
    </li>=0A=
    <li>          =0A=
    <p align=3D"left">Edit (/etc/asterisk/) extensions.conf as =
follows:<br>=0A=
      <br>=0A=
  ; ----- snip -----<br>=0A=
  ; Extensions configuration for Asterisk<br>=0A=
  [general]<br>=0A=
  static=3Dyes<br>=0A=
  writeprotect=3Dyes<br>=0A=
  [globals]<br>=0A=
  ; Define global variables here<br>=0A=
  PHONE1=3DSIP/1000<br>=0A=
  PHONE2=3DSIP/2000<br>=0A=
  [internal]<br>=0A=
  include =3D&gt; local-sip<br>=0A=
  [local-sip]<br>=0A=
  exten =3D&gt; 1000,1,Dial(${PHONE1},40,t)<br>=0A=
  exten =3D&gt; 1000,2,Hangup<br>=0A=
      <br>=0A=
  exten =3D&gt; 2000,1,Dial(${PHONE2},40,t)<br>=0A=
   exten =3D&gt; 2000,2,Hangup<br>=0A=
  ; ----- snip -----</p>=0A=
   </li>=0A=
   <li>     =0A=
    <p align=3D"left">Restart the Asterisk server.<br>=0A=
 # asterisk -vvvvvc</p>=0A=
   </li>=0A=
   =0A=
</ol>=0A=
=0A=
<P>=0A=
You should now be able to call `2000' from `1000' and the viceversa.<br>=0A=
=0A=
<HR>=0A=
=0A=
<P>=0A=
This document was inspired by:=0A=
=0A=
<P>=0A=
<b>Shawn L. Djernes'</b>=0A=
<a href=3D"http://www.djernes.org/~shawn/ata186.htm">Asterisk / ATA-186 =
HOWTO</a>=0A=
=0A=
<P>=0A=
<b>John Todd's</b>=0A=
<a href=3D"http://www.loligo.com/asterisk/">Asterisk pages</a>=0A=
=0A=
</body>=0A=
</html>=0A=

------=_NextPart_000_005F_01C41246.98AFDF50
Content-Type: text/html;
	name="ata186.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="ata186.html"

<html>=0A=
<body bgcolor=3D"#99ccff">=0A=
<center>=0A=
<h1>Cisco ATA 186 Configuration</h1>=0A=
<form method=3D"post" action=3D"dev">=0A=
<font size =3D -1> <table border=3D1>=0A=
<tr><td bgcolor=3Dviolet>UIPassword: <td><input size=3D20 =
type=3Dpassword name=3D"UIPassword" Value=3D"0"><br>=0A=
<td bgcolor=3Dkhaki>ToConfig: <td><input size=3D20 type=3Dtext =
name=3D"ToConfig" Value=3D"1"><br>=0A=
<tr><td bgcolor=3Dsilver>UseTftp: <td><input size=3D20 type=3Dtext =
name=3D"UseTftp" Value=3D"0"><br>=0A=
<td bgcolor=3Dsilver>TftpURL: <td><input size=3D20 type=3Dtext =
name=3D"TftpURL" Value=3D"0"><br>=0A=
<tr><td bgcolor=3Dsilver>CfgInterval: <td><input size=3D20 type=3Dtext =
name=3D"CfgInterval" Value=3D"3600"><br>=0A=
<td bgcolor=3Dsilver>EncryptKey: <td><input size=3D20 type=3Dpassword =
name=3D"EncryptKey" Value=3D"0"><br>=0A=
<tr><td bgcolor=3Dfeldspar>Dhcp: <td><input size=3D20 type=3Dtext =
name=3D"Dhcp" Value=3D"0"><br>=0A=
<td bgcolor=3Dfeldspar>StaticIP: <td><input size=3D20 type=3Dtext =
name=3D"StaticIP" Value=3D"192.168.1.50"><br>=0A=
<tr><td bgcolor=3Dfeldspar>StaticRoute: <td><input size=3D20 type=3Dtext =
name=3D"StaticRoute" Value=3D"0.0.0.0"><br>=0A=
<td bgcolor=3Dfeldspar>StaticNetMask: <td><input size=3D20 type=3Dtext =
name=3D"StaticNetMask" Value=3D"255.255.255.0"><br>=0A=
<tr><td bgcolor=3Dcyan>UID0: <td><input size=3D20 type=3Dtext =
name=3D"UID0" Value=3D"1000"><br>=0A=
<td bgcolor=3Dcyan>PWD0: <td><input size=3D20 type=3Dpassword =
name=3D"PWD0" Value=3D"password1"><br>=0A=
<tr><td bgcolor=3Dcyan>UID1: <td><input size=3D20 type=3Dtext =
name=3D"UID1" Value=3D"2000"><br>=0A=
<td bgcolor=3Dcyan>PWD1: <td><input size=3D20 type=3Dpassword =
name=3D"PWD1" Value=3D"password2"><br>=0A=
<tr><td bgcolor=3Dcyan>GkOrProxy: <td><input size=3D20 type=3Dtext =
name=3D"GkOrProxy" Value=3D"192.168.1.100"><br>=0A=
<td bgcolor=3Dcyan>Gateway: <td><input size=3D20 type=3Dtext =
name=3D"Gateway" Value=3D"192.168.1.100"><br>=0A=
<tr><td bgcolor=3Dcyan>GateWay2: <td><input size=3D20 type=3Dtext =
name=3D"GateWay2" Value=3D"0.0.0.0"><br>=0A=
<td bgcolor=3Dcyan>UseLoginID: <td><input size=3D20 type=3Dtext =
name=3D"UseLoginID" Value=3D"1"><br>=0A=
<tr><td bgcolor=3Dcyan>LoginID0: <td><input size=3D20 type=3Dtext =
name=3D"LoginID0" Value=3D"1000"><br>=0A=
<td bgcolor=3Dcyan>LoginID1: <td><input size=3D20 type=3Dtext =
name=3D"LoginID1" Value=3D"2000"><br>=0A=
<tr><td bgcolor=3Dthistle>AltGk: <td><input size=3D20 type=3Dtext =
name=3D"AltGk" Value=3D"0"><br>=0A=
<td bgcolor=3Dthistle>AltGkTimeOut: <td><input size=3D20 type=3Dtext =
name=3D"AltGkTimeOut" Value=3D"0"><br>=0A=
<tr><td bgcolor=3Dthistle>GkTimeToLive: <td><input size=3D20 type=3Dtext =
name=3D"GkTimeToLive" Value=3D"300"><br>=0A=
<td bgcolor=3Dthistle>GkId: <td><input size=3D20 type=3Dtext =
name=3D"GkId" Value=3D"."><br>=0A=
<tr><td bgcolor=3Dyellow>UseSIP: <td><input size=3D20 type=3Dtext =
name=3D"UseSIP" Value=3D"1"><br>=0A=
<td bgcolor=3Dyellow>SIPRegInterval: <td><input size=3D20 type=3Dtext =
name=3D"SIPRegInterval" Value=3D"60"><br>=0A=
<tr><td bgcolor=3Dyellow>MaxRedirect: <td><input size=3D20 type=3Dtext =
name=3D"MaxRedirect" Value=3D"5"><br>=0A=
<td bgcolor=3Dyellow>SIPRegOn: <td><input size=3D20 type=3Dtext =
name=3D"SIPRegOn" Value=3D"0"><br>=0A=
<tr><td bgcolor=3Dyellow>NATIP: <td><input size=3D20 type=3Dtext =
name=3D"NATIP" Value=3D"0.0.0.0"><br>=0A=
<td bgcolor=3Dyellow>SIPPort: <td><input size=3D20 type=3Dtext =
name=3D"SIPPort" Value=3D"5060"><br>=0A=
<tr><td bgcolor=3Dyellow>MediaPort: <td><input size=3D20 type=3Dtext =
name=3D"MediaPort" Value=3D"16384"><br>=0A=
<td bgcolor=3Dyellow>OutBoundProxy: <td><input size=3D20 type=3Dtext =
name=3D"OutBoundProxy" Value=3D"0"><br>=0A=
<tr><td bgcolor=3Dyellow>NatServer: <td><input size=3D20 type=3Dtext =
name=3D"NatServer" Value=3D"0"><br>=0A=
<td bgcolor=3Dyellow>NatTimer: <td><input size=3D20 type=3Dtext =
name=3D"NatTimer" Value=3D"0x00000000"><br>=0A=
<tr><td bgcolor=3Dsiena>LBRCodec: <td><input size=3D20 type=3Dtext =
name=3D"LBRCodec" Value=3D"3"><br>=0A=
<td bgcolor=3Dsiena>AudioMode: <td><input size=3D20 type=3Dtext =
name=3D"AudioMode" Value=3D"0x00140014"><br>=0A=
<tr><td bgcolor=3Dsiena>RxCodec: <td><input size=3D20 type=3Dtext =
name=3D"RxCodec" Value=3D"2"><br>=0A=
<td bgcolor=3Dsiena>TxCodec: <td><input size=3D20 type=3Dtext =
name=3D"TxCodec" Value=3D"2"><br>=0A=
<tr><td bgcolor=3Dsiena>NumTxFrames: <td><input size=3D20 type=3Dtext =
name=3D"NumTxFrames" Value=3D"2"><br>=0A=
<td bgcolor=3Dsiena>CallFeatures: <td><input size=3D20 type=3Dtext =
name=3D"CallFeatures" Value=3D"0xffffffff"><br>=0A=
<tr><td bgcolor=3Dsiena>PaidFeatures: <td><input size=3D20 type=3Dtext =
name=3D"PaidFeatures" Value=3D"0xffffffff"><br>=0A=
<td bgcolor=3Dsiena>CallerIdMethod: <td><input size=3D20 type=3Dtext =
name=3D"CallerIdMethod" Value=3D"0x00019e60"><br>=0A=
<tr><td bgcolor=3Dsiena>FeatureTimer: <td><input size=3D20 type=3Dtext =
name=3D"FeatureTimer" Value=3D"0x00000000"><br>=0A=
<td bgcolor=3Dsiena>Polarity: <td><input size=3D20 type=3Dtext =
name=3D"Polarity" Value=3D"0x00000000"><br>=0A=
<tr><td bgcolor=3Dsiena>ConnectMode: <td><input size=3D20 type=3Dtext =
name=3D"ConnectMode" Value=3D"0x00060400"><br>=0A=
<td bgcolor=3Dsiena>AutMethod: <td><input size=3D20 type=3Dtext =
name=3D"AutMethod" Value=3D"0x00000000"><br>=0A=
<tr><td bgcolor=3Dsiena>TimeZone: <td><input size=3D20 type=3Dtext =
name=3D"TimeZone" Value=3D"19"><br>=0A=
<td bgcolor=3Dsiena>NTPIP: <td><input size=3D20 type=3Dtext =
name=3D"NTPIP" Value=3D"0.0.0.0"><br>=0A=
<tr><td bgcolor=3Dsiena>AltNTPIP: <td><input size=3D20 type=3Dtext =
name=3D"AltNTPIP" Value=3D"0.0.0.0"><br>=0A=
<td bgcolor=3Dsiena>DNS1IP: <td><input size=3D20 type=3Dtext =
name=3D"DNS1IP" Value=3D"0.0.0.0"><br>=0A=
<tr><td bgcolor=3Dsiena>DNS2IP: <td><input size=3D20 type=3Dtext =
name=3D"DNS2IP" Value=3D"0.0.0.0"><br>=0A=
<td bgcolor=3Dsiena>TOS: <td><input size=3D20 type=3Dtext name=3D"TOS" =
Value=3D"0x000068b8"><br>=0A=
<tr><td bgcolor=3Dsiena>SigTimer: <td><input size=3D20 type=3Dtext =
name=3D"SigTimer" Value=3D"0x01418564"><br>=0A=
<td bgcolor=3Dsiena>OpFlags: <td><input size=3D20 type=3Dtext =
name=3D"OpFlags" Value=3D"0x00000002"><br>=0A=
<tr><td bgcolor=3Dsiena>VLANSetting: <td><input size=3D20 type=3Dtext =
name=3D"VLANSetting" Value=3D"0x0000002b"><br>=0A=
<td bgcolor=3Dwheat>NPrintf: <td><input size=3D20 type=3Dtext =
name=3D"NPrintf" Value=3D"0.0.0.0.0"><br>=0A=
<tr><td bgcolor=3Dwheat>TraceFlags: <td><input size=3D20 type=3Dtext =
name=3D"TraceFlags" Value=3D"0x00000000"><br>=0A=
<td bgcolor=3Dwheat>RingOnOffTime: <td><input size=3D20 type=3Dtext =
name=3D"RingOnOffTime" Value=3D"2,4,25"><br>=0A=
<tr><td bgcolor=3Dwheat>IPDialPlan: <td><input size=3D20 type=3Dtext =
name=3D"IPDialPlan" Value=3D"1"><br>=0A=
<td bgcolor=3Dwheat>DialPlan: <td><input size=3D20 type=3Dtext =
name=3D"DialPlan" =
Value=3D"*St4-|#St4-|911|1>#t8.r9t2-|0>#t811.rat4-|^1t4>#.-"><br>=0A=
<tr><td bgcolor=3Dwheat>DialTone: <td><input size=3D20 type=3Dtext =
name=3D"DialTone" Value=3D"2,31538,30831,1380,1740,1,0,0,1000"><br>=0A=
<td bgcolor=3Dwheat>BusyTone: <td><input size=3D20 type=3Dtext =
name=3D"BusyTone" Value=3D"2,30467,28959,1191,1513,0,4000,4000,0"><br>=0A=
<tr><td bgcolor=3Dwheat>ReorderTone: <td><input size=3D20 type=3Dtext =
name=3D"ReorderTone" Value=3D"2,30467,28959,1191,1513,0,2000,2000,0"><br>=0A=
<td bgcolor=3Dwheat>RingBackTone: <td><input size=3D20 type=3Dtext =
name=3D"RingBackTone" =
Value=3D"2,30831,30467,1943,2111,0,16000,32000,0"><br>=0A=
<tr><td bgcolor=3Dwheat>CallWaitTone: <td><input size=3D20 type=3Dtext =
name=3D"CallWaitTone" Value=3D"1,30831,0,5493,0,0,2400,2400,4800"><br>=0A=
<td bgcolor=3Dwheat>AlertTone: <td><input size=3D20 type=3Dtext =
name=3D"AlertTone" Value=3D"1,30467,0,5970,0,0,480,480,1920"><br>=0A=
<tr><td bgcolor=3Dwheat>CallCmd: <td><input size=3D20 type=3Dtext =
name=3D"CallCmd" =
Value=3D"Af;AH;BS;NA;CS;NA;Df;EB;Ff;EP;Kf;EFh;HQ;Jf;AFh;HQ;I*67;gA*82;fA#=
90v#;OI;H#72v#;bA#74v#;cA#75v#;dA#73;eA*67;gA*82;fA*70;iA*69;DA*99;xA;Uh;=
GQ;"><br>=0A=
</table>=0A=
<br>=0A=
</center>=0A=
<P align=3Dleft>=0A=
<b>Version:  v2.16.1 ata18x (Build 030709a)</b><br>=0A=
ProductId: ATA186I1=0A=
=0A=
</form>=0A=
</p></body>=0A=
</html>=0A=
=0A=
=0A=

------=_NextPart_000_005F_01C41246.98AFDF50--