Hello! Don't understand why ${rate} is null while one user call another... <section name="dialplan" description="Local call"> <context name="public"> <extension name="local"> <condition field="destination_number" expression="^(\d{3})$"> <action application="set" data="effective_caller_id_number=105"/> <action application="set" data="rrr=${rate}"/> <action application="export" data="hold_music=/opt/sharefs/moh/0/${rate}/1_1.wav" /> <action application="bridge" data="sofia/internal/00294539100%${domain_name}"/> </condition> </extension> </context> </section> ${rate} is empty May I can use rate after answer only? Best regards Dmitry
First off you don't have to worry with that rate variable: Layout your directories like so: /opt/sharefs/moh/0/8000/1_1.wav /opt/sharefs/moh/0/16000/1_1.wav /opt/sharefs/moh/0/32000/1_1.wav /opt/sharefs/moh/0/48000/1_1.wav Then all you care is play this file /opt/sharefs/moh/0/1_1.wav It will pick the one that matches the rate of the channel, see our default sound set does this too. On Mon, Jun 15, 2015 at 9:06 AM, Dmitry Mordovin <dm@dwide.com> wrote:
Hello!
Don't understand why ${rate} is null while one user call another...
<section name="dialplan" description="Local call"> <context name="public"> <extension name="local"> <condition field="destination_number" expression="^(\d{3})$"> <action application="set" data="effective_caller_id_number=105"/>
<action application="set" data="rrr=${rate}"/>
<action application="export" data="hold_music=/opt/sharefs/moh/0/${rate}/1_1.wav" /> <action application="bridge" data="sofia/internal/00294539100%${domain_name}"/> </condition> </extension> </context> </section>
${rate} is empty
May I can use rate after answer only?
Best regards Dmitry
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com ClueCon 2015 Call for Speakers <https://www.cluecon.com/call-for-speakers/> | Register <https://freeswitch.com/cart.php?gid=1> TODAY! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
It's probably because the call hasn't been answered yet, which means codec negotiation hasn't completed yet. They have sent you their supported codecs in the INVITE, FreeSWITCH is configured with which ones it supports but you haven't yet decided which codec to actually use for the call and therefore you haven't picked a rate yet. On 15 June 2015 at 15:06, Dmitry Mordovin <dm@dwide.com> wrote:
Hello!
Don't understand why ${rate} is null while one user call another...
<section name="dialplan" description="Local call"> <context name="public"> <extension name="local"> <condition field="destination_number" expression="^(\d{3})$"> <action application="set" data="effective_caller_id_number=105"/>
<action application="set" data="rrr=${rate}"/>
<action application="export" data="hold_music=/opt/sharefs/moh/0/${rate}/1_1.wav" /> <action application="bridge" data="sofia/internal/00294539100%${domain_name}"/> </condition> </extension> </context> </section>
${rate} is empty
May I can use rate after answer only?
Best regards Dmitry
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
participants (3)
-
Brian West
-
Dmitry Mordovin
-
Steven Ayre