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"><<a href="mailto:peter@phpwerks.com">peter@phpwerks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Very new to Freeswitch and I am trying to work through some examples of<br>
connecting/interacting with Freeswitch from PHP. 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 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&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 href="mailto:1000@192.168.1.211">1000@192.168.1.211</a>&bridge(sofia/internal/1001)";<br>
<br>
<br>
2011-01-20 16:04:00.602758 [NOTICE] switch_channel.c:808 New Channel sofia/internal/<a 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 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<0000000000>->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 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 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 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 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 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 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 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>
Name Type Data State<br>
=================================================================================================<br>
external profile <a href="http://sip:mod_sofia@192.168.1.211:5080" target="_blank">sip:mod_sofia@192.168.1.211:5080</a> RUNNING (0)<br>
external::<a href="http://example.com" target="_blank">example.com</a> gateway <a href="mailto:sip%3Ajoeuser@example.com">sip:joeuser@example.com</a> NOREG<br>
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)<br>
internal profile <a href="http://sip:mod_sofia@192.168.1.211:5060" target="_blank">sip:mod_sofia@192.168.1.211:5060</a> RUNNING (0)<br>
192.168.1.211 alias internal 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 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>