title: Unable to request channel Iax2/3002 while calling to asterisk server
body: <p>I am trying to make a call to asterisk server from my AGI. My AGI is basically a java code which uses Asterisk-java.jar library for communication with asterisk server. I opened up the connection with asterisk server and ran some commands on it and I got right response from the server. Now , when I try to make the call to the asterisk server, using the following code</p>
  
  <pre><code>     OriginateAction act = new OriginateAction();
          act.setChannel ("IAX2/3002");
          act.setContext ("default");
          act.setExten ("3002");
          act.setPriority (new Integer(1));
          act.setAsync (true);
          act.setTimeout(3000l);
          return mc.sendAction(act);
  </code></pre>
  
  <p>I got following on my serverCLI :</p>
  
  <pre><code>     == Manager 'salman' logged on from 127.0.0.1
       [Sep 12 19:39:14] NOTICE[12093]: channel.c:5619 __ast_request_and_dial: Unable to request channel IAX2/3002
       == Manager 'salman' logged off from 127.0.0.1
  </code></pre>
  
  <p>Why is it saying "Unable to request channel IAX2/3002"? I have configured my manager.conf, I have a dialplan in my extensions.conf and I have created a user on iax.conf. Please help!</p>
  
  <p>my manager.conf file: </p>
  
  <pre><code>       [general]
         enabled = yes
         ;webenabled = yes
         port = 5038
         bindaddr = 0.0.0.0
  
         [salman]
         secret=salman
         permit=0.0.0.0/0.0.0.0
         read=all
         write=all
  </code></pre>
  
  <p>my extension.conf file :</p>
  
  <pre><code>     [general] 
       static=yes
       writeprotect=yes 
       clearglobalvars=no
       autofallthrough=yes
       priorityjumping=no
  
       [default]
  
       exten =&gt; 3001,1,Answer()
       exten =&gt; 3001,2,Playback(/home/salman/Test_sound_file/main_menu)
       exten =&gt; 3001,3,Hangup()
  </code></pre>
  
  <p>And my Iax.conf file:</p>
  
  <pre><code>    [general]
  
      bandwidth=medium
      disallow=all
      allow=alaw
      trunkmaxsize=128000
      trunkmtu=1240
      iaxthreadcount=100
      iaxmaxthreadcount=512
      autokill=yes
      trunkfreq=20
      srvlookup=no
      codecpriority=host
  
      [3002]
      type=friend
      context=default
      secret=3002
      callerid=3002
      requirecalltoken=no
      host=dynamic
      nat=yes
      canreinvite=no
      mailbox=1000@default
  </code></pre>