<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Michael, Anthony,<br>
    <br>
    Cheers guys. Really great help and also stunned with the new var! I
    will probably c/o head this weekend to try it out.<br>
    <br>
    I'm not that great on wikis (I've installed and set up MediaWiki for
    others but only ever added a couple of pages to it)&nbsp; but I will try
    to make a start on at least updating the conference callout example
    page.<br>
    <br>
    Cheers<br>
    <br>
    Alex<br>
    <br>
    <br>
    <br>
    On 23/04/12 20:29, Michael Collins wrote:
    <blockquote
cite="mid:CAKzWOxXzpORKAge25gmCFpiNn_4Lgj4tb5fvFjWUPfbej3OwxA@mail.gmail.com"
      type="cite">
      <div class="gmail_extra">Excellent description and cool new chan
        var.<br>
        <br>
        Alex, this is definitely something you should put on the wiki.
        If you need any help please let me know. Don't forget that we
        have a template that you can use to add a channel variable:<br>
        <br>
        <a moz-do-not-send="true"
          href="http://wiki.freeswitch.org/wiki/Variable_skeleton">http://wiki.freeswitch.org/wiki/Variable_skeleton</a><br>
        <br>
        The rest of the documentation can go in <a
          moz-do-not-send="true"
          href="http://wiki.freeswitch.org/wiki/Mod_loopback">http://wiki.freeswitch.org/wiki/Mod_loopback</a>.
        For bonus points you can use the wiki {{:foo}} syntax to include
        the channel variable docs in the mod_loopback page w/o actually
        duplicating your work. See the main channel variables page for
        examples on how to do that.<br>
        <br>
        -MC<br>
        <br>
        <div class="gmail_quote">On Mon, Apr 23, 2012 at 12:21 PM,
          Anthony Minessale <span dir="ltr">&lt;<a
              moz-do-not-send="true"
              href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">You should
            definitely help on the wiki. &nbsp;It's always worth it.<br>
            <br>
            I did not mean that the book would teach you about L16 on
            loopback but<br>
            codecs and setting up calls.<br>
            Since you said you cannot understand why there is no early
            media in<br>
            your conference I thought you might benefit but studying the
            nuances<br>
            of call origination.<br>
            <br>
            As for loopback, if its important enough to you to get that
            ring<br>
            sound, its really the only choice you have.<br>
            I check and it's easy enough to add a patch to let you
            specify the<br>
            initial codec so try out git HEAD and use the new variable<br>
            loopback_initial_codec you can specify it in the originate
            string like<br>
            <br>
            originate {loopback_initial_codec=L16@16000h}loopback/1234
            4321<br>
            <br>
            Transcoding fees may apply.<br>
            <br>
            <br>
            <br>
            <br>
            On Mon, Apr 23, 2012 at 12:29 PM, Alex Crow &lt;<a
              moz-do-not-send="true"
              href="mailto:acrow@integrafin.co.uk">acrow@integrafin.co.uk</a>&gt;
            wrote:<br>
            &gt; On 23/04/12 16:09, Anthony Minessale wrote:<br>
            &gt;&gt; If you originate loopback channels in that manner
            it chooses raw PCM<br>
            &gt;&gt; (L16) because it has no idea what other codec to
            use.<br>
            &gt;&gt; You want to avoid loopback unless its absolutely
            necessary since it<br>
            &gt;&gt; adds extra resource consumption dynamically
            allocating the audio for<br>
            &gt;&gt; each frame.<br>
            &gt;&gt;<br>
            &gt;&gt; I suggest you study the books we have (not a plug,
            just that's where<br>
            &gt;&gt; its best documented) To get the full descriptions
            of how the dialplan<br>
            &gt;&gt; and codec stuff works. &nbsp;It's very complicated and
            hard to describe in<br>
            &gt;&gt; a simple reply.<br>
            &gt;<br>
            &gt;<br>
            &gt; Thanks Anthony,<br>
            &gt;<br>
            &gt; I do have the FreeSwitch book and just got the
            cookbook. However I'd not<br>
            &gt; come across any docs stating that loopback defaults to
            L16/8000 so far,<br>
            &gt; so perhaps I should reread them.<br>
            &gt;<br>
            &gt; Is there any reason why loopback can't use L16/16000 or
            higher so HD<br>
            &gt; codecs can be of advantage? Just curious as my new
            dialplan seems to<br>
            &gt; have solved the problem. For anyone else that is
            interested I have<br>
            &gt; pasted it below (it is slightly adapted from the
            example):<br>
            &gt;<br>
            &gt; &lt;extension name="confringback"&gt;<br>
            &gt; &lt;condition field="destination_number"
            expression="^confringback$"&gt;<br>
            &gt; &lt;action application="set"
            data="ringback=$${uk-ring}"/&gt;<br>
            &gt; &lt;action application="bridge"<br>
            &gt;
            data="{ignore_early_media=true}loopback/confringback_media"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;/extension&gt;<br>
            &gt;<br>
            &gt; &lt;extension name="confringback_media"&gt;<br>
            &gt; &lt;condition field="destination_number"
            expression="^confringback_media$"&gt;<br>
            &gt; &lt;action application="pre_answer"/&gt;<br>
            &gt; &lt;action application="sleep" data="200000"/&gt;<br>
            &gt; &lt;action application="hangup"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;/extension&gt;<br>
            &gt;<br>
            &gt; &lt;extension name="Add new OB call to conference"&gt;<br>
            &gt; &lt;condition field="destination_number"
            expression="^add_a_call$"&gt;<br>
            &gt; &lt;!-- ask caller for a number + #, collect into
            ${target_num} variable --&gt;<br>
            &gt; &lt;action application="play_and_get_digits" data="3 13
            4 5000 #<br>
            &gt;
file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav<br>
            &gt; ivr/ivr-that_was_an_invalid_entry.wav target_num
            \d+"/&gt;<br>
            &gt; &lt;!-- add this call to the conference --&gt;<br>
            &gt; &lt;action application="execute_extension"<br>
            &gt; data="ADD_CALL_TO_CONF__${target_num}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;/extension&gt;<br>
            &gt;<br>
            &gt; &lt;extension name="Remove last OB call added to
            conference"&gt;<br>
            &gt; &lt;condition field="destination_number"
            expression="^remove_a_call$"&gt;<br>
            &gt; &lt;!-- remove a call from the conference --&gt;<br>
            &gt; &lt;action application="play_and_get_digits" data="3 13
            1 5000 #<br>
            &gt;
file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav<br>
            &gt; ivr/ivr-that_was_an_invalid_entry.wav target_num
            \d+"/&gt;<br>
            &gt; &lt;action application="set" data="res=${uuid_kill<br>
            &gt;
            ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/&gt;<br>
            &gt; &lt;action application="set" data="res=${uuid_kill<br>
            &gt;
${hash(select/domain-${domain_name}/last_user_ring_${target_num})}}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;/extension&gt;<br>
            &gt;<br>
            &gt; &lt;extension name="add that call"&gt;<br>
            &gt; &lt;!-- if we have a four-digit number then attempt to
            dial it as a user<br>
            &gt; ... --&gt;<br>
            &gt; &lt;condition field="destination_number"<br>
            &gt; expression="^ADD_CALL_TO_CONF__(2\d{2})$"
            break="on-true"&gt;<br>
            &gt; &lt;action application="set"
            data="new_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="set"
            data="pb_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_$1/${new_uuid}"
            /&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}"
            /&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${pb_uuid}}loopback/confringback<br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${new_uuid}}sofia/gateway/<a
              moz-do-not-send="true" href="http://om.net/$1"
              target="_blank">om.net/$1</a><br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;condition field="destination_number"<br>
            &gt; expression="^ADD_CALL_TO_CONF__(6\d{2})$"
            break="on-true"&gt;<br>
            &gt; &lt;action application="set"
            data="new_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_$1/${new_uuid}"
            /&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${new_uuid}}sofia/gateway/<a
              moz-do-not-send="true" href="http://192.168.44.43/$1"
              target="_blank"><font color="red"><b>MailScanner warning:
                  numerical links are often malicious:</b></font>
              192.168.44.43/$1</a><br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;condition field="destination_number"<br>
            &gt;
expression="^ADD_CALL_TO_CONF__(49\d\d|5[3-4]\d\d|74\d\d|8\d{3}|0|9\d{3,13}|0\d{10,12})$"<br>
            &gt; break="on-true"&gt;<br>
            &gt; &lt;action application="set"
            data="new_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="set"
            data="pb_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_$1/${new_uuid}"
            /&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}"
            /&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${pb_uuid}}loopback/*9181<br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${new_uuid},api_on_answer='uuid_kill<br>
            &gt; ${pb_uuid}'}sofia/gateway/<a moz-do-not-send="true"
              href="http://10.10.0.2/$1" target="_blank"><font
                color="red"><b>MailScanner warning: numerical links are
                  often malicious:</b></font> 10.10.0.2/$1</a>
            &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;condition field="destination_number"<br>
            &gt; expression="^ADD_CALL_TO_CONF__(3\d{2})$"
            break="on-true"&gt;<br>
            &gt; &lt;action application="set"
            data="new_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_$1/${new_uuid}"
            /&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${new_uuid}}sofia/gateway/<a
              moz-do-not-send="true" href="http://192.168.44.15/$1"
              target="_blank"><font color="red"><b>MailScanner warning:
                  numerical links are often malicious:</b></font>
              192.168.44.15/$1</a><br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;condition field="destination_number"<br>
            &gt; expression="^ADD_CALL_TO_CONF__(1\d{3}|11\d{4})$"
            break="on-true"&gt;<br>
            &gt; &lt;action application="set"
            data="new_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="set"
            data="pb_uuid=${create_uuid foo}" inline="true"/&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_$1/${new_uuid}"
            /&gt;<br>
            &gt; &lt;action application="hash"<br>
            &gt;
            data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}"
            /&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${pb_uuid}}loopback/confringback<br>
            &gt; &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;action application="set" data="res=${bgapi
            originate<br>
            &gt; {origination_uuid=${new_uuid},api_on_answer='uuid_kill<br>
            &gt; ${pb_uuid}'}user/$1
            &amp;conference(${conference_name})}"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;!-- ... otherwise inform moderator that the
            operation was not exactly<br>
            &gt; successful --&gt;<br>
            &gt; &lt;condition field="destination_number"
            expression="^ADD_CALL_TO_CONF__$"&gt;<br>
            &gt; &lt;action application="playback"
            data="ivr/ivr-please_try_again.wav"/&gt;<br>
            &gt; &lt;/condition&gt;<br>
            &gt; &lt;/extension&gt;<br>
            &gt;<br>
            &gt;<br>
            &gt; So for 3 destinations (1st local extensions at 1xxx or
            11xxxx, 2nd<br>
            &gt; 350-399 and 3rd 600-649) we don't need to fake it, for
            the other 2<br>
            &gt; gateways we do.<br>
            &gt;<br>
            &gt; Seems to work pretty well for now. Would it be worth
            getting Wiki write<br>
            &gt; access to add that to the article about joining members
            by calling out<br>
            &gt; from a conference?<br>
            &gt;<br>
            &gt; Cheers<br>
            &gt;<br>
            &gt; Alex<br>
            &gt;<br>
            &gt;
_________________________________________________________________________<br>
            &gt; Professional FreeSWITCH Consulting Services:<br>
            &gt; <a moz-do-not-send="true"
              href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
            &gt; <a moz-do-not-send="true"
              href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
            &gt;<br>
            &gt; FreeSWITCH-powered IP PBX: The CudaTel Communication
            Server<br>
            &gt; <a moz-do-not-send="true"
              href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
            &gt;<br>
            &gt; Official FreeSWITCH Sites<br>
            &gt; <a moz-do-not-send="true"
              href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
            &gt; <a moz-do-not-send="true"
              href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
            &gt; <a moz-do-not-send="true"
              href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
            &gt;<br>
            &gt; FreeSWITCH-users mailing list<br>
            &gt; <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            &gt; <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>
            &gt; 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>
            &gt; <a moz-do-not-send="true"
              href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
            <br>
            <br>
            <br>
            --<br>
            Anthony Minessale II<br>
            <br>
            FreeSWITCH <a moz-do-not-send="true"
              href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
            ClueCon <a moz-do-not-send="true"
              href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
            Twitter: <a moz-do-not-send="true"
              href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
            <br>
            AIM: anthm<br>
            <a moz-do-not-send="true"
              href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
            GTALK/JABBER/<a moz-do-not-send="true"
              href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
            IRC: <a moz-do-not-send="true"
              href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
            #freeswitch<br>
            <br>
            FreeSWITCH Developer Conference<br>
            <a moz-do-not-send="true"
              href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
            pstn:<a moz-do-not-send="true" href="tel:%2B19193869900"
              value="+19193869900">+19193869900</a><br>
            <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>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      -- <br>
      This message has been scanned for viruses and
      <br>
      dangerous content by
      <a moz-do-not-send="true" href="http://www.mailscanner.info/"><b>MailScanner</b></a>,
      and is
      <br>
      believed to be clean.
      <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>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
This message is intended only for the addressee and may contain 
confidential information.  Unless you are that person, you may not 
disclose its contents or use it in any way and are requested to delete 
the message along with any attachments and notify us immediately. 

"Transact" is operated by Integrated Financial Arrangements plc 
Domain House, 5-7 Singer Street, London  EC2A 4BQ 
Tel: (020) 7608 4900 Fax: (020) 7608 5300
(Registered office: as above; Registered in England and Wales under number: 3727592) 
Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)</pre>
  </body>
</html>