title: Call and hangup using Asterisk as a SIP client
body: <p>I'm a newbie in Asterisk, so I'm gonna start with something simple.</p>
  
  <p>I read some documentation and I've managed to do some basic config.</p>
  
  <p>My Asterisk version is 1.6.2.9-2+squeeze10 (installed on Debian using apt-get) and changed ONLY sip.conf and extensions.conf.</p>
  
  <p>My idea is to use it as a SIP client, connected to the Flowroute SIP server - but please see what's happening when I use <strong>console dial EXTEN</strong>...</p>
  
  <p>sip.conf</p>
  
  <pre><code>[general]
  register =&gt; 74770000:HIDDEN@sip.flowroute.com/s
  registertimeout=20
  context=default
  allowoverlap=no
  bindport=5060
  bindaddr=0.0.0.0
  srvlookup=no
  subscribecontext=from-sip
  
  [flowroute]
  canreinvite=no
  username=74770000
  fromuser=74770000
  secret=HIDDEN
  context=default
  type=friend
  fromdomain=sip.flowroute.com
  host=85.17.214.222
  dtmfmode=rfc2833
  disallow=all
  allow=alaw
  allow=ulaw
  nat=yes
  insecure=very
  </code></pre>
  
  <p>extensions.conf</p>
  
  <pre><code>[default]
  exten =&gt; _XXXXXXXXXXXXXX,1,Dial(SIP/flowroute/${EXTEN})
  ;exten =&gt; _XXXXXXXXXXXXXX,2,Hangup
  </code></pre>
  
  <p>sip show users</p>
  
  <pre><code>loreen*CLI&gt; sip show users
  Username                   Secret           Accountcode      Def.Context      ACL  NAT
  flowroute                  HIDDEN                      default          No   Always
  </code></pre>
  
  <p>sip show peers</p>
  
  <pre><code>loreen*CLI&gt; sip show peers
  Name/username              Host            Dyn Nat ACL Port     Status
  flowroute/74771200         85.17.214.227        N      5060     Unmonitored
  1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
  </code></pre>
  
  <p>console dial EXTEN</p>
  
  <pre><code>loreen*CLI&gt; console dial 00359891505054
  [Jun 14 16:44:27] WARNING[14031]: chan_oss.c:486 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
  [Jun 14 16:44:28] NOTICE[14031]: console_video.c:133 console_video_start: voice only, console video support not present
  [Jun 14 16:44:28] WARNING[14033]: app_dial.c:1714 dial_exec_full: Skipping dialing interface 'SIP/flowroute/00359891505054' again since it has already been dialed
  </code></pre>