<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Well, an example command as issued from
within fs_cli is:<br>
<br>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<p class="MsoNormalIndent">originate
{origination_caller_id_name=CallBack,origination_caller_id_number=442074901234}sofia/internal/02070601234@${sip_gw_ip}
442074901234 xml dp0024</p>
<br>
Thi
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 11">
<meta name="Originator" content="Microsoft Word 11">
<link rel="File-List"
href="file:///C:%5CDOCUME%7E1%5CDMLUser%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        tab-stops:1.0cm 2.0cm 3.0cm 4.0cm 5.0cm 6.0cm;
        font-size:10.0pt;
        mso-bidi-font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-language:EN-US;}
p.MsoNormalIndent, li.MsoNormalIndent, div.MsoNormalIndent
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:1.0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        mso-bidi-font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-language:EN-US;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        tab-stops:1.0cm 2.0cm 3.0cm 4.0cm 5.0cm 6.0cm center 207.65pt right 415.3pt;
        font-size:10.0pt;
        mso-bidi-font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-language:EN-US;}
@page Section1
        {size:21.0cm 842.0pt;
        margin:1.0cm 28.9pt 1.0cm 45.35pt;
        mso-header-margin:14.2pt;
        mso-footer-margin:1.0cm;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->s will do a callback to 02070601234 and on answer will place
an outbound call to 442074901234 within the "dp0024" context of
the xml dialplan.<br>
<br>
We have our own node.js fs_cli equivalent which gets a web hit and
then puts together such a command string and sends it to
freeswitch. There are a few other tricks that are useful:<br>
<br>
1) We have the option for a "press 1 to confirm the outbound call"
on the dialplan to avoid the case where a call back connects your
voicemail to the destination(!)<br>
2) We sometimes want to link the call to a transaction ID from the
client - you can just bung that in the {} after originate and then
pick it up in the event stream or CDRs.<br>
</div>
<blockquote
cite="mid:CACAaYNLU4hSZRCY3aPdWbwLtRu=z=9zwS4_CPYwgqF5EfYXwSQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">Alex, how
did you do it? am so much intersted in the callbak sinario you
described, but do not have any idea of how to get it done.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 3 June 2013 08:26, Alex Lake <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto: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>As simple as that, eh?! Seems too good to be true!
Thanks....<br>
</div>
<blockquote type="cite">
<div>
<div class="h5">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 moz-do-not-send="true">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
moz-do-not-send="true">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
moz-do-not-send="true">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
moz-do-not-send="true"
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
moz-do-not-send="true">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
moz-do-not-send="true">consulting@freeswitch.org</a><br>
<a
moz-do-not-send="true"
href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered
IP PBX: The
CudaTel
Communication
Server<br>
<a
moz-do-not-send="true"
href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official
FreeSWITCH
Sites<br>
<a
moz-do-not-send="true"
href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a
moz-do-not-send="true"
href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a
moz-do-not-send="true"
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 moz-do-not-send="true">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com"
target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The
CudaTel Communication Server<br>
<a moz-do-not-send="true"
href="http://www.cudatel.com"
target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true"
href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://wiki.freeswitch.org"
target="_blank">http://wiki.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.cluecon.com"
target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true">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>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a moz-do-not-send="true">consulting@freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a moz-do-not-send="true" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a moz-do-not-send="true">FreeSWITCH-users@lists.freeswitch.org</a>
<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>
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>
<a moz-do-not-send="true" 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
moz-do-not-send="true"
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>
<br>
<fieldset></fieldset>
<br>
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a moz-do-not-send="true" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a moz-do-not-send="true" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a moz-do-not-send="true" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<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>
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>
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<div>
<div class="h5">No virus found in this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com" target="_blank">www.avg.com</a><br>
</div>
</div>
Version: 2012.0.2242 / Virus Database: 3162/5878 -
Release Date: 06/02/13 </blockquote>
<br>
</div>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a moz-do-not-send="true" href="http://www.cudatel.com"
target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org"
target="_blank">http://wiki.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://www.cluecon.com"
target="_blank">http://www.cluecon.com</a><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>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<font face="garamond, serif"><i>Emmanuel O. Addai,</i></font>
<div><font face="garamond, serif"><i>+233(0)26 757 7771</i></font></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="" avgcert""="" color="#000000" align="left">No virus
found in this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 2012.0.2242 / Virus Database: 3184/5886 - Release Date:
06/05/13</p>
</blockquote>
<br>
</body>
</html>