title: Send Sip Message through fastagi asterisk
body: <p>I am able to relay messages using dialplan. This command sends the message but I cant seem to run it using fastagi(java)</p>
  
  <p><strong>DialPlan</strong></p>
  
  <pre><code>exten =&gt; _X.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
  </code></pre>
  
  <p><strong>FastAgi</strong></p>
  
  <pre><code>public void service(AgiRequest ar, AgiChannel ac) throws AgiException {
      System.out.println(ac.getFullVariable("${MESSAGE(body)}"));
      System.out.println(ac.getFullVariable("${MESSAGE(to)}"));
      System.out.println(ac.getFullVariable("${MESSAGE(from)}"));
      System.out.println(ac.getFullVariable("${CUT(MESSAGE(to),@,1)}"));
      //Correct values are show from above printlns
      ac.exec("MessageSend(${CUT(MESSAGE(to),@,1)},${MESSAGE(from)})");
  }
  </code></pre>
  
  <p>Last line results in a warning in <code>/var/asterisk/messages</code></p>
  
  <blockquote>
    <p>WARNING[2287][C-00000000] res_agi.c: Could not find application (MessageSend(${CUT(MESSAGE(to),@,1)})</p>
  </blockquote>