<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">&lt;<a href="mailto:alex@digitalmail.com" target="_blank">alex@digitalmail.com</a>&gt;</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&#39;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&#39;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 &amp;bridge. You <i>either</i>
                      choose an extension or do &amp;(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 &lt;call_url&gt; &lt;exten&gt;|&amp;&lt;application_name&gt;(&lt;app_args&gt;) 
   [&lt;dialplan&gt;] [&lt;context&gt;] [&lt;cid_name&gt;] [&lt;cid_num&gt;] [&lt;timeout_sec&gt;]</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"> &quot;Here&#39;s an example of originating
                          a call to an extension in a different context
                          than &#39;default&#39; (required for the FreePBX which
                          uses context_1, context_2, etc.):&quot;</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>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">&lt;<a>alex@digitalmail.com</a>&gt;</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&#39;d seen that - but I&#39;m
                                currently the wrong side of the &quot;got it&quot;
                                fence. However, I did this:<br>
                                <br>
                                originate
{origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&amp;bridge({<a>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&#39;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


                                &amp;bridge(07775123456) xml dp0095<br>
                                <br>
                                But I&#39;ve clearly got the wrong end of
                                the stick!<br>
                                <br>
                              </div>
                              <blockquote type="cite">
                                <div>
                                  <div>
                                    <div dir="ltr">There&#39;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">&amp;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">&lt;<a>alex@digitalmail.com</a>&gt;</span>
                                          wrote:<br>
                                          <blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I
                                            was wondering where&#39;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-&gt;B (and maybe
                                            small conferences)<br>
                                            using these types of
                                            destination in any
                                            combination.<br>
                                            <br>
                                            I&#39;ve looked through the
                                            event_socket pages and the
                                            &quot;originate&quot; syntax,<br>
                                            but would like to put
                                            together something a little
                                            more &quot;idiot-friendly&quot;<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>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>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>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>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>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto: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="mailto: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>
      </div></div><p color="#000000" align="left"></p><div><div class="h5">No virus
        found in this message.<br>
        Checked by AVG - <a 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<p></p>
    </blockquote>
    <br>
  </div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">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="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>
<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></div>
</div>