<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&#39;t forget that we have a template that you can use to add a channel variable:<br>
<br><a 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 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 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.  It&#39;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&#39;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 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&#39;s where<br>
&gt;&gt; its best documented) To get the full descriptions of how the dialplan<br>
&gt;&gt; and codec stuff works.  It&#39;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&#39;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&#39;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=&quot;confringback&quot;&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot; expression=&quot;^confringback$&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;ringback=$${uk-ring}&quot;/&gt;<br>
&gt; &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;{ignore_early_media=true}loopback/confringback_media&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;confringback_media&quot;&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot; expression=&quot;^confringback_media$&quot;&gt;<br>
&gt; &lt;action application=&quot;pre_answer&quot;/&gt;<br>
&gt; &lt;action application=&quot;sleep&quot; data=&quot;200000&quot;/&gt;<br>
&gt; &lt;action application=&quot;hangup&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;Add new OB call to conference&quot;&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot; expression=&quot;^add_a_call$&quot;&gt;<br>
&gt; &lt;!-- ask caller for a number + #, collect into ${target_num} variable --&gt;<br>
&gt; &lt;action application=&quot;play_and_get_digits&quot; data=&quot;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+&quot;/&gt;<br>
&gt; &lt;!-- add this call to the conference --&gt;<br>
&gt; &lt;action application=&quot;execute_extension&quot;<br>
&gt; data=&quot;ADD_CALL_TO_CONF__${target_num}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;Remove last OB call added to conference&quot;&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot; expression=&quot;^remove_a_call$&quot;&gt;<br>
&gt; &lt;!-- remove a call from the conference --&gt;<br>
&gt; &lt;action application=&quot;play_and_get_digits&quot; data=&quot;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+&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${uuid_kill<br>
&gt; ${hash(select/domain-${domain_name}/last_user_${target_num})}}&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${uuid_kill<br>
&gt; ${hash(select/domain-${domain_name}/last_user_ring_${target_num})}}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;add that call&quot;&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=&quot;destination_number&quot;<br>
&gt; expression=&quot;^ADD_CALL_TO_CONF__(2\d{2})$&quot; break=&quot;on-true&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;new_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;pb_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_$1/${new_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${pb_uuid}}loopback/confringback<br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://om.net/$1" target="_blank">om.net/$1</a><br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot;<br>
&gt; expression=&quot;^ADD_CALL_TO_CONF__(6\d{2})$&quot; break=&quot;on-true&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;new_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_$1/${new_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://192.168.44.43/$1" target="_blank">192.168.44.43/$1</a><br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot;<br>
&gt; expression=&quot;^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})$&quot;<br>
&gt; break=&quot;on-true&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;new_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;pb_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_$1/${new_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${pb_uuid}}loopback/*9181<br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${new_uuid},api_on_answer=&#39;uuid_kill<br>
&gt; ${pb_uuid}&#39;}sofia/gateway/<a href="http://10.10.0.2/$1" target="_blank">10.10.0.2/$1</a> &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot;<br>
&gt; expression=&quot;^ADD_CALL_TO_CONF__(3\d{2})$&quot; break=&quot;on-true&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;new_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_$1/${new_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://192.168.44.15/$1" target="_blank">192.168.44.15/$1</a><br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;condition field=&quot;destination_number&quot;<br>
&gt; expression=&quot;^ADD_CALL_TO_CONF__(1\d{3}|11\d{4})$&quot; break=&quot;on-true&quot;&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;new_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;pb_uuid=${create_uuid foo}&quot; inline=&quot;true&quot;/&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_$1/${new_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;hash&quot;<br>
&gt; data=&quot;insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}&quot; /&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${pb_uuid}}loopback/confringback<br>
&gt; &amp;conference(${conference_name})}&quot;/&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;res=${bgapi originate<br>
&gt; {origination_uuid=${new_uuid},api_on_answer=&#39;uuid_kill<br>
&gt; ${pb_uuid}&#39;}user/$1 &amp;conference(${conference_name})}&quot;/&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=&quot;destination_number&quot; expression=&quot;^ADD_CALL_TO_CONF__$&quot;&gt;<br>
&gt; &lt;action application=&quot;playback&quot; data=&quot;ivr/ivr-please_try_again.wav&quot;/&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&#39;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 href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a 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 href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
<br>
--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900">+19193869900</a><br>
<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>
</blockquote></div><br></div>