<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Michael,<br>
    <br>
    Thank you for you response and suggestions.&nbsp; I tried using the
    syntax you provided but received this error<br>
    [ERR] switch_ivr_originate.c:2628 Cannot create outgoing channel of
    type [error] cause: [USER_NOT_REGISTERED]<br>
    <br>
    Which indicates that I do not have a user registered.&nbsp; This is where
    I am lost, I have searched the documentation and can't determine how
    to register a user.&nbsp; I have softphone (xlite phone) configured with
    an account (user 1001 @ 192.168.1.254) from which I can make called
    to extensions. From PHP it fails. The phone is available when I
    attempt to run my php script.&nbsp; <br>
    <br>
    Is there a config setting I need to set?&nbsp; My freeswitch installation
    is a generic install with no modifications - the
    /conf/directory/default contains definitions for users 1000 - 1019 -
    these appear to get run by default.xml<br>
    <br>
    The ultimate goal for this test is to create a simple page that
    accepts a number, dials and connects to an internal number.<br>
    <br>
    Sorry for what is probably an elementary question, but any guidance
    would be greatly appreciated.<br>
    <br>
    Peter<br>
    <br>
    <br>
    On 1/20/11 4:35 PM, Michael Collins wrote:
    <blockquote
      cite="mid:AANLkTinCLKSKJQHBCZWPcnyuj+BZdYpfsZuE3VyL+N=K@mail.gmail.com"
      type="cite">I believe we talked about this on IRC but for
      posterity's sake I'll repeat here: your originate syntax is not
      correct. It can be confusing because there are several ways to
      accomplish the same thing. In your case I recommend using this
      syntax:
      <div>
        <br>
      </div>
      <div><font class="Apple-style-span" face="'courier new',
          monospace">api originate user/1000 1001</font></div>
      <div><br>
      </div>
      <div>The first argument to originate is a dialstring. If you know
        that you are going to be dialing a locally registered user then
        the "user" channel is easier than saying
        "sofia/internal/1000%${domain}". The second argument to
        originate is a dialplan extension or and application to execute.
        In the above example the first leg calls user/1000 and when
        he/she answers it then sends the other leg through the dialplan
        as if user 1000 had dialed "1001" and pressed send. I hope that
        makes sense.</div>
      <div><br>
      </div>
      <div>Let us know if you continue to have issues with this. You are
        VERY close to having this working - just a few characters in the
        dialstring.</div>
      <div><br>
      </div>
      <div>-MC</div>
      <div><br>
        <div class="gmail_quote">
          On Thu, Jan 20, 2011 at 1:10 PM, Peter Brenner <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:peter@phpwerks.com">peter@phpwerks.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            Very new to Freeswitch and I am trying to work through some
            examples of<br>
            connecting/interacting with Freeswitch from PHP. &nbsp;The
            example that I am<br>
            trying to work through is one where a user enters 2
            extension numbers on<br>
            a page, submits the page which then originates a call from
            one extension<br>
            to the other.<br>
            <br>
            I used the follow in example as a starting point:<br>
            <br>
            <a moz-do-not-send="true"
              href="http://wiki.freeswitch.org/wiki/PHP_Event_Socket"
              target="_blank">http://wiki.freeswitch.org/wiki/PHP_Event_Socket</a><br>
            I changed the command:<br>
            $cmd = "api help";<br>
            <br>
            To:<br>
            <br>
            $cmd = "api originate
            sofia/internal/1000&amp;bridge(sofia/internal/1001)";<br>
            <br>
            I want to call from extension 1000 to 1001<br>
            <br>
            I receive the following error<br>
            <br>
            2011-01-20 16:01:16.482373 [WARNING] mod_sofia.c:4022 Cannot
            locate registered user 1000@internal<br>
            2011-01-20 16:01:16.482373 [NOTICE] mod_sofia.c:4221 Close
            Channel N/A [CS_NEW]<br>
            2011-01-20 16:01:16.482373 [ERR] switch_ivr_originate.c:2628
            Cannot create outgoing channel of type [sofia] cause:
            [USER_NOT_REGISTERED]<br>
            <br>
            If I change the command to<br>
            $cmd = "api originate sofia/internal/<a
              moz-do-not-send="true" href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>&amp;bridge(sofia/internal/1001)";<br>
            <br>
            <br>
            2011-01-20 16:04:00.602758 [NOTICE] switch_channel.c:808 New
            Channel sofia/internal/<a moz-do-not-send="true"
              href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>
            [c721e1e2-7eb7-46d5-9507-dcf02ac33828]<br>
            2011-01-20 16:04:00.602758 [NOTICE] switch_channel.c:808 New
            Channel sofia/internal/<a moz-do-not-send="true"
              href="mailto:0000000000@192.168.1.211">0000000000@192.168.1.211</a>
            [b7b163eb-3c90-4b86-9fde-070abdfbb45b]<br>
            2011-01-20 16:04:00.612832 [INFO] mod_dialplan_xml.c:331
            Processing&lt;0000000000&gt;-&gt;1000 in context public<br>
            2011-01-20 16:04:00.625071 [ERR] sofia.c:5869 Cannot Blind
            Transfer 1 Legged calls<br>
            2011-01-20 16:04:00.625071 [NOTICE] sofia.c:5286 Hangup
            sofia/internal/<a moz-do-not-send="true"
              href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>
            [CS_CONSUME_MEDIA] [NO_USER_RESPONSE]<br>
            2011-01-20 16:04:00.654406 [NOTICE]
            switch_core_session.c:1306 Session 2 (sofia/internal/<a
              moz-do-not-send="true" href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>)
            Ended<br>
            2011-01-20 16:04:00.654406 [NOTICE]
            switch_core_session.c:1308 Close Channel sofia/internal/<a
              moz-do-not-send="true" href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>
            [CS_DESTROY]<br>
            2011-01-20 16:04:00.725081 [NOTICE]
            switch_core_state_machine.c:189 sofia/internal/<a
              moz-do-not-send="true"
              href="mailto:0000000000@192.168.1.211">0000000000@192.168.1.211</a>
            has executed the last dialplan instruction, hanging up.<br>
            2011-01-20 16:04:00.725081 [NOTICE]
            switch_core_state_machine.c:191 Hangup sofia/internal/<a
              moz-do-not-send="true"
              href="mailto:0000000000@192.168.1.211">0000000000@192.168.1.211</a>
            [CS_EXECUTE] [NORMAL_CLEARING]<br>
            2011-01-20 16:04:00.730022 [NOTICE]
            switch_core_session.c:1306 Session 3 (sofia/internal/<a
              moz-do-not-send="true"
              href="mailto:0000000000@192.168.1.211">0000000000@192.168.1.211</a>)
            Ended<br>
            2011-01-20 16:04:00.730022 [NOTICE]
            switch_core_session.c:1308 Close Channel sofia/internal/<a
              moz-do-not-send="true"
              href="mailto:0000000000@192.168.1.211">0000000000@192.168.1.211</a>
            [CS_DESTROY]<br>
            <br>
            Here is the output from sofia status<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Data &nbsp; &nbsp; &nbsp;State<br>
=================================================================================================<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;external &nbsp; &nbsp; &nbsp; profile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a
              moz-do-not-send="true"
              href="http://sip:mod_sofia@192.168.1.211:5080"
              target="_blank">sip:mod_sofia@192.168.1.211:5080</a> &nbsp; &nbsp;
            &nbsp;RUNNING (0)<br>
            &nbsp; &nbsp; external::<a moz-do-not-send="true"
              href="http://example.com" target="_blank">example.com</a>
            &nbsp; &nbsp; &nbsp; gateway &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a moz-do-not-send="true"
              href="mailto:sip%3Ajoeuser@example.com">sip:joeuser@example.com</a>
            &nbsp; &nbsp; &nbsp;NOREG<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; internal-ipv6 &nbsp; &nbsp; &nbsp; profile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <a class="moz-txt-link-freetext" href="sip:mod_sofia@">sip:mod_sofia@</a>[::1]:5060 &nbsp; &nbsp; &nbsp;RUNNING (0)<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;internal &nbsp; &nbsp; &nbsp; profile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a
              moz-do-not-send="true"
              href="http://sip:mod_sofia@192.168.1.211:5060"
              target="_blank">sip:mod_sofia@192.168.1.211:5060</a> &nbsp; &nbsp;
            &nbsp;RUNNING (0)<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 192.168.1.211 &nbsp; &nbsp; &nbsp; &nbsp; alias &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; internal &nbsp; &nbsp; &nbsp;ALIASED<br>
=================================================================================================<br>
            3 profiles 1 alias<br>
            <br>
            Any advice or help would be greatly appreciated.<br>
            <br>
            thanks!<br>
            Peter<br>
            <br>
            <br>
            <br>
            _______________________________________________<br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              target="_blank">http://www.freeswitch.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
  </body>
</html>