You currently (in a previous mail) call a user/ dialstring and when that answers execute a bridge that dials a sofia/ dialstring and joins the 2 calls. The syntax was slightly off, but close.<div><br></div><div>Now think what'd happen if the 2 dialstrings were both sofia/ dialstrings to dial 2 PSTN numbers via your SIP provider(s)...</div>
<div><br></div><div>You may need to tweak that further if you want either leg to go via the dialplan.<span></span></div><div><br><div>-Steve</div><div><br></div><div><br>On Friday, May 31, 2013, Alex Lake wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>...and for our next trick, how do I do
a callback from one PSTN destination to another? i.e. place a call
to 07775123456 and when that answers, place another one to
02012345678?<br>
<br>
Cheers,<br>
Alex<br>
</div>
<blockquote type="cite">
<div dir="ltr">You almost got it: it's: exten [dialplan] [context]
<div><br>
<div>So you just needed to do:</div>
<div>originate
{origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302
07775123456 xml dp0095</div>
<div>... without the &bridge. You <i>either</i> choose an
extension or do &(app).<br>
<div>
<pre style="padding:1em;border:1px dashed rgb(47,111,171);background-color:rgb(249,249,249);line-height:1.1em">Usage: originate <call_url> <exten>|&<application_name>(<app_args>)
[<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]</pre>
</div>
<div>To quote from the wiki:</div>
<div>
<p style="line-height:19.046875px;font-size:13px;font-family:sans-serif;margin:0.4em 0px 0.5em">
"Here's an example of originating a call to an extension
in a different context than 'default' (required for the
FreePBX which uses context_1, context_2, etc.):"</p>
<pre style="padding:1em;border:1px dashed rgb(47,111,171);background-color:rgb(249,249,249);line-height:1.1em"> originate sofia/internal/<a href="javascript:_e({}, 'cvml', '2001@foo.com');" target="_blank">2001@foo.com</a> 3001 xml context_3</pre>
<div>
<div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi
Marcus</span><br>
BestFone</div>
</div>
<br>
<br>
<div class="gmail_quote">On Thu, Mar 7, 2013 at 4:02 PM,
Alex Lake <span dir="ltr"><<a href="javascript:_e({}, 'cvml', 'alex@digitalmail.com');" target="_blank">alex@digitalmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Yes, I'd seen that - but I'm currently the
wrong side of the "got it" fence. However, I did
this:<br>
<br>
originate
{origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({<a href="javascript:_e({}, 'cvml', 'origination_caller_id_number\x3d2070602000%7Dsofia/internal/07775123456@pstngateway.com');" target="_blank">origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com</a>)<br>
<br>
and it kind of did what I wanted.<br>
<br>
However, what I really want to do is to simulate
as closely as possible what happens when ext
0095302 makes an outbound call to 07775123456 from
a handset - preferably using the dp0095 context of
the xml (?) dialplan.<br>
<br>
So I thought I'd try using the dialplan and
context parameters like this:<br>
<br>
originate
{origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302
&bridge(07775123456) xml dp0095<br>
<br>
But I've clearly got the wrong end of the stick!<br>
<br>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">There's a whole bunch of
examples here:
<div><a href="http://wiki.freeswitch.org/wiki/Mod_commands#originate" target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#originate</a></div>
<div><br>
</div>
<div>The first arg rings first, and must be
an endpoint, e.g. sofia/, user/.</div>
<div>Once they pick up, the second arg is
called.</div>
<div><br>
</div>
<div>So originating to a local user or to a
remote endpoint is nearly the same...
especially if you can use the lcr/
endpoint.</div>
<div>Your leg B can be a brige, a
conference <span style="line-height:1.1em">&conference(conf_uuid-TEST_CON),
or just hit the dialplan.</span></div>
<div><br>
</div>
<div><br clear="all">
<div>
<div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi
Marcus</span><br>
</div>
</div>
<br>
<div>On Thu, Mar 7,
2013 at 1:00 PM, Alex Lake <span dir="ltr"><<a>alex@digitalmail.com</a>></span>
wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was
wondering where's a good place to find
some examples of how, by<br>
sending the right commands to the
event_socket, I could have Freeswitch<br>
establish callbacks for me.<br>
<br>
Essentially there are a couple of
different termination types - PSTN<br>
(via a gateway) and internally
registered SIP accounts<br>
<br>
I would wish to be able to set up
A->B (and maybe small conferences)<br>
using these types of destination in
any combination.<br>
<br>
I've looked through the event_socket
pages and the "originate" syntax,<br>
but would like to put together
something a little more
"idiot-friendly"<br>
so am looking around for
precedents/tips...<br>
<br>
<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting
Services:<br>
<a>consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel
Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluec</a></blockquote></div></div></div></div></div></blockquote></div>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="javascript:_e({}, 'cvml', 'consulting@freeswitch.org');" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication
Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="javascript:_e({}, 'cvml', 'FreeSWITCH-users@lists.freeswitch.org');" target="_blank">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>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="javascript:_e({}, 'cvml', 'consulting@freeswitch.org');" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a href="javascript:_e({}, 'cvml', 'FreeSWITCH-users@lists.freeswitch.org');" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
<br>
<fieldset></fieldset>
<br>
<p color="#000000" align="left">No virus
found in this message.<br>
Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date:
03/06/13</p>
</blockquote>
<br>
</div>
</blockquote></div></div>