<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 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"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></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'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 <<a href="mailto:acrow@integrafin.co.uk">acrow@integrafin.co.uk</a>> wrote:<br>
> On 23/04/12 16:09, Anthony Minessale wrote:<br>
>> If you originate loopback channels in that manner it chooses raw PCM<br>
>> (L16) because it has no idea what other codec to use.<br>
>> You want to avoid loopback unless its absolutely necessary since it<br>
>> adds extra resource consumption dynamically allocating the audio for<br>
>> each frame.<br>
>><br>
>> I suggest you study the books we have (not a plug, just that's where<br>
>> its best documented) To get the full descriptions of how the dialplan<br>
>> and codec stuff works. It's very complicated and hard to describe in<br>
>> a simple reply.<br>
><br>
><br>
> Thanks Anthony,<br>
><br>
> I do have the FreeSwitch book and just got the cookbook. However I'd not<br>
> come across any docs stating that loopback defaults to L16/8000 so far,<br>
> so perhaps I should reread them.<br>
><br>
> Is there any reason why loopback can't use L16/16000 or higher so HD<br>
> codecs can be of advantage? Just curious as my new dialplan seems to<br>
> have solved the problem. For anyone else that is interested I have<br>
> pasted it below (it is slightly adapted from the example):<br>
><br>
> <extension name="confringback"><br>
> <condition field="destination_number" expression="^confringback$"><br>
> <action application="set" data="ringback=$${uk-ring}"/><br>
> <action application="bridge"<br>
> data="{ignore_early_media=true}loopback/confringback_media"/><br>
> </condition><br>
> </extension><br>
><br>
> <extension name="confringback_media"><br>
> <condition field="destination_number" expression="^confringback_media$"><br>
> <action application="pre_answer"/><br>
> <action application="sleep" data="200000"/><br>
> <action application="hangup"/><br>
> </condition><br>
> </extension><br>
><br>
> <extension name="Add new OB call to conference"><br>
> <condition field="destination_number" expression="^add_a_call$"><br>
> <!-- ask caller for a number + #, collect into ${target_num} variable --><br>
> <action application="play_and_get_digits" data="3 13 4 5000 #<br>
> file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav<br>
> ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/><br>
> <!-- add this call to the conference --><br>
> <action application="execute_extension"<br>
> data="ADD_CALL_TO_CONF__${target_num}"/><br>
> </condition><br>
> </extension><br>
><br>
> <extension name="Remove last OB call added to conference"><br>
> <condition field="destination_number" expression="^remove_a_call$"><br>
> <!-- remove a call from the conference --><br>
> <action application="play_and_get_digits" data="3 13 1 5000 #<br>
> file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav<br>
> ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/><br>
> <action application="set" data="res=${uuid_kill<br>
> ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/><br>
> <action application="set" data="res=${uuid_kill<br>
> ${hash(select/domain-${domain_name}/last_user_ring_${target_num})}}"/><br>
> </condition><br>
> </extension><br>
><br>
> <extension name="add that call"><br>
> <!-- if we have a four-digit number then attempt to dial it as a user<br>
> ... --><br>
> <condition field="destination_number"<br>
> expression="^ADD_CALL_TO_CONF__(2\d{2})$" break="on-true"><br>
> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="set" data="pb_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" /><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${pb_uuid}}loopback/confringback<br>
> &conference(${conference_name})}"/><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://om.net/$1" target="_blank">om.net/$1</a><br>
> &conference(${conference_name})}"/><br>
> </condition><br>
> <condition field="destination_number"<br>
> expression="^ADD_CALL_TO_CONF__(6\d{2})$" break="on-true"><br>
> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://192.168.44.43/$1" target="_blank">192.168.44.43/$1</a><br>
> &conference(${conference_name})}"/><br>
> </condition><br>
> <condition field="destination_number"<br>
> 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>
> break="on-true"><br>
> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="set" data="pb_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" /><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${pb_uuid}}loopback/*9181<br>
> &conference(${conference_name})}"/><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${new_uuid},api_on_answer='uuid_kill<br>
> ${pb_uuid}'}sofia/gateway/<a href="http://10.10.0.2/$1" target="_blank">10.10.0.2/$1</a> &conference(${conference_name})}"/><br>
> </condition><br>
> <condition field="destination_number"<br>
> expression="^ADD_CALL_TO_CONF__(3\d{2})$" break="on-true"><br>
> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${new_uuid}}sofia/gateway/<a href="http://192.168.44.15/$1" target="_blank">192.168.44.15/$1</a><br>
> &conference(${conference_name})}"/><br>
> </condition><br>
> <condition field="destination_number"<br>
> expression="^ADD_CALL_TO_CONF__(1\d{3}|11\d{4})$" break="on-true"><br>
> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="set" data="pb_uuid=${create_uuid foo}" inline="true"/><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /><br>
> <action application="hash"<br>
> data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" /><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${pb_uuid}}loopback/confringback<br>
> &conference(${conference_name})}"/><br>
> <action application="set" data="res=${bgapi originate<br>
> {origination_uuid=${new_uuid},api_on_answer='uuid_kill<br>
> ${pb_uuid}'}user/$1 &conference(${conference_name})}"/><br>
> </condition><br>
> <!-- ... otherwise inform moderator that the operation was not exactly<br>
> successful --><br>
> <condition field="destination_number" expression="^ADD_CALL_TO_CONF__$"><br>
> <action application="playback" data="ivr/ivr-please_try_again.wav"/><br>
> </condition><br>
> </extension><br>
><br>
><br>
> So for 3 destinations (1st local extensions at 1xxx or 11xxxx, 2nd<br>
> 350-399 and 3rd 600-649) we don't need to fake it, for the other 2<br>
> gateways we do.<br>
><br>
> Seems to work pretty well for now. Would it be worth getting Wiki write<br>
> access to add that to the article about joining members by calling out<br>
> from a conference?<br>
><br>
> Cheers<br>
><br>
> Alex<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>
<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>