If you run fs_cli -x 'show codecs', is g722 reported?  It should be provided by mod_spandsp -  mod_native_file *should* support any loaded codecs.  

It appears that mod_spandsp may need to be loaded before mod_native_file (although I'm not 100% on that), for it to perform the init that associates the loaded codecs with it's supported formats.  If mod_spandsp is already loaded, try running a 'reload mod_native_file' and see if that helps
 
Hello ,

I am using mod native file module to play native files.It works perfectly with PCMA,PCMU,G729 but not for G722. Any idea why ? 

Log line after codec negotiation : 
2019-04-11 16:58:39.860111 [DEBUG] switch_core_media.c:3818 Set Codec sofia/register/888@ecolocal3.sip.teledge.local G722/8000 20 ms 160 samples 64000
bits 1 channels                        

Error thrown by FS on CLI : 
2019-04-11 16:58:39.880339 [ERR] switch_core_file.c:301 Invalid file format [G722] for [/media/freeswitch_storage/sounds/custom/req_fail.G722]! 
2019-04-11 16:58:39.880339 [DEBUG] switch_core_file.c:386 File /media/freeswitch_storage/sounds/custom/req_fail.wav sample rate 8000 doesn't match req
uested rate 16000                                                               
2019-04-11 16:58:39.880339 [DEBUG] switch_ivr_play_say.c:1493 Codec Activated L16@16000hz 1 channels 20ms

I am using FS 1.8.2

-- 
Thanks,

Sagar

--------------------------------

Troy Denton, P. Eng.

Senior Telecom Analyst

24-7 Intouch


24-7intouch.com | tdenton@24-7intouch.com

240 Kennedy St | Winnipeg, Manitoba, Canada R3C 1T1


Confidentiality Note: This e-mail message and any attachments to it are intended only for the named recipients and may contain legally privileged and/or confidential information. If you are not one of the intended recipients, please do not duplicate or forward this e-mail message and immediately delete it from your computer.



On Thu, Apr 11, 2019 at 12:19 PM sagar malam <sagarmalam@gmail.com> wrote:
Hello ,

I am using mod native file module to play native files.It works perfectly with PCMA,PCMU,G729 but not for G722. Any idea why ? 

Log line after codec negotiation : 
2019-04-11 16:58:39.860111 [DEBUG] switch_core_media.c:3818 Set Codec sofia/register/888@ecolocal3.sip.teledge.local G722/8000 20 ms 160 samples 64000
bits 1 channels                        

Error thrown by FS on CLI : 
2019-04-11 16:58:39.880339 [ERR] switch_core_file.c:301 Invalid file format [G722] for [/media/freeswitch_storage/sounds/custom/req_fail.G722]!
2019-04-11 16:58:39.880339 [DEBUG] switch_core_file.c:386 File /media/freeswitch_storage/sounds/custom/req_fail.wav sample rate 8000 doesn't match req
uested rate 16000                                                               
2019-04-11 16:58:39.880339 [DEBUG] switch_ivr_play_say.c:1493 Codec Activated L16@16000hz 1 channels 20ms

I am using FS 1.8.2

--
Thanks,

Sagar
_________________________________________________________________________
Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com