mod_local_stream path based on rate
Hello, I'm using local_stream:// as our music on hold source. I have both 8000 KHz and 16000 KHz files encoded so that I can play them at the native rate. We have some endpoints that can only do PCMU and others that can do higher rates. I want to set music on hold for a channel and have it automatically pick the appropriate stream based on the channel's native rate, just like the voice prompts do. I tried creating a stream for each rate, like rock-8000 and rock-16000 and then set the channel's music on hold variable to local_stream://rock-${read_rate} but the read rate hasn't been negotiated when this is set in the dialplan. Any suggestions? -Tim
the default config works this way it runs a stream on each rate called moh/8000 moh/16000 moh/32000 and moh/48000 if you try to run stream "moh" it will pick the right one. On Mon, Mar 29, 2010 at 11:02 AM, Tim St. Pierre < fs-list@communicatefreely.net> wrote:
Hello,
I'm using local_stream:// as our music on hold source. I have both 8000 KHz and 16000 KHz files encoded so that I can play them at the native rate. We have some endpoints that can only do PCMU and others that can do higher rates.
I want to set music on hold for a channel and have it automatically pick the appropriate stream based on the channel's native rate, just like the voice prompts do. I tried creating a stream for each rate, like rock-8000 and rock-16000 and then set the channel's music on hold variable to local_stream://rock-${read_rate} but the read rate hasn't been negotiated when this is set in the dialplan.
Any suggestions?
-Tim
_______________________________________________ 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 <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
That did it! Thanks, I'll try to get this in the Wiki this week for anyone else that is interested. -Tim Anthony Minessale wrote:
the default config works this way it runs a stream on each rate called moh/8000 moh/16000 moh/32000 and moh/48000 if you try to run stream "moh" it will pick the right one.
On Mon, Mar 29, 2010 at 11:02 AM, Tim St. Pierre <fs-list@communicatefreely.net <mailto:fs-list@communicatefreely.net>> wrote:
Hello,
I'm using local_stream:// as our music on hold source. I have both 8000 KHz and 16000 KHz files encoded so that I can play them at the native rate. We have some endpoints that can only do PCMU and others that can do higher rates.
I want to set music on hold for a channel and have it automatically pick the appropriate stream based on the channel's native rate, just like the voice prompts do. I tried creating a stream for each rate, like rock-8000 and rock-16000 and then set the channel's music on hold variable to local_stream://rock-${read_rate} but the read rate hasn't been negotiated when this is set in the dialplan.
Any suggestions?
-Tim
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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 <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
------------------------------------------------------------------------
_______________________________________________ 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
participants (2)
-
Anthony Minessale
-
Tim St. Pierre