If you originate loopback channels in that manner it chooses raw PCM (L16) because it has no idea what other codec to use. You want to avoid loopback unless its absolutely necessary since it adds extra resource consumption dynamically allocating the audio for each frame. I suggest you study the books we have (not a plug, just that's where its best documented) To get the full descriptions of how the dialplan and codec stuff works. It's very complicated and hard to describe in a simple reply. On Sat, Apr 21, 2012 at 1:10 PM, Alex Crow <acrow@integrafin.co.uk> wrote:
On 20/04/12 01:37, Anthony Minessale wrote:
You only get it when you actually are being sent early media. Probably the ones that dont have any sound are only sending 180 so there is nothing you can do about it.
Anthony,
Thanks, I figured out how to fake ringback for endpoints that only send 180:
<condition field="destination_number" expression="^ADD_CALL_TO_CONF__(1\d{3}|11\d{4})$" break="on-true"> <action application="set" data="new_uuid=${create_uuid foo}" inline="true"/> <action application="set" data="pb_uuid=${create_uuid foo}" inline="true"/> <action application="hash" data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /> <action application="set" data="res=${bgapi originate {origination_uuid=${pb_uuid}}loopback/*9181 &conference(${conference_name})}"/> <action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid},api_on_answer='uuid_kill ${pb_uuid}'}user/$1 &conference(${conference_name})}"/> </condition>
where *9181 is an extension that does a 183 with ringback of ${uk-ring}.
Do I really need the inline=true on setting pb_uuid by the way?
The reason I didn't do the whole thing using loopback is that even when the parties called into the conference support wideband codecs (eg G722), the loopback always uses L16/8000, and so the audio is squeezed through a 4khz B/W channel even if the phones involved are using wideband codecs. If I originate into the conference I don't have that issue, I get HD audio all the way. Is that expected or is there a way around it?
eg:
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/> <action application="hash" data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" /> <action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}loopback/$1/default &conference(${conference_name})}"/>
Produces PSTN quality audio on dialed-in parties even though they negotiated G722.
Many thanks for your help
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900