signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.4k stars 1.38k forks source link

Global variables not recognized in param moh-sound on mod_conference #1700

Open admin-toneca opened 2 years ago

admin-toneca commented 2 years ago

Global variables like $${storage_dir} not recognized in param moh-sound in conference profile.

Conference profile configuration:

            <profile name="30017012">
                <param name="alone-sound" value="$${storage_dir}/conference/30017012/alone-sound.wav"/>
                <param name="caller-id-name" value="Conference"/>
                <param name="caller-id-number" value=""/>
                <param name="exit-sound" value="$${storage_dir}/conference/30017012/exit-sound.wav"/>
                <param name="max-members" value="10"/>
                <param name="moderator-controls" value="moderator"/>
                <param name="moh-sound" value="$${storage_dir}/conference/30017012/moh-sound.wav"/>
                <param name="video-canvas-size" value="800x600"/>
                <param name="video-fps" value="15"/>
            </profile>

It cause error like:

[WARNING] mod_sndfile.c:281 Error Opening File [/usr/local/freeswitch/sounds/en/us/callie/$${storage_dir}/conference/30017012/moh-sound.wav] [System error : No such file or directory.]

Same error when I tried another global_var like $${sounds_dir}, $${script_dir} etc

Package version or git hash

dragos-oancea commented 2 years ago

and exit-sound is okay ? are the global variables recognized in exit-sound ?

how about if you use channel variable "conference_moh_sound" ?

admin-toneca commented 2 years ago

Global variables recognized in exit-sound normally.

Global variable also worked in conference_moh_sound.