[Freeswitch-users] Invalid file format with Codec AMR

Pradeepa pradee at gmail.com
Mon May 9 08:25:51 MSD 2016


Thanks Brian,

As you suggested, when I removed extension from playback, error
disappeared. But still I can't hear any audio.

This is in early media. I tested after answering the call. Both times no
sound. Where I have done wrong?

If I remove AMR from Freeswitch prefs, then negotiate with PCMU and play
properly wav (u-law) but I want to play AMR.

Now log is as below.

EXECUTE sofia/internal/1000 at 10.169.112.170 pre_answer()
[DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
[INFO] mod_dptools.c:1260 Sending early media
[DEBUG] sofia_glue.c:5282 Audio Codec Compare [
AMR:120:8000:20:0]/[AMR:96:8000:20:12200]
[DEBUG] sofia_glue.c:3190 Set Codec sofia/internal/1000 at 10.169.112.170
AMR/8000 20 ms 160 samples 12200 bits
[DEBUG] switch_core_codec.c:111 sofia/internal/1000 at 10.169.112.170 Original
read codec set to AMR:96
[DEBUG] mod_erlang_event.c:156 Sending event CODEC to attached session
67192af8-159b-11e6-a7fc-eb0baf057465
[DEBUG] sofia_glue.c:5451 Set 2833 dtmf send/recv payload to 101
[DEBUG] mod_erlang_event.c:156 Sending event CODEC to attached session
67192af8-159b-11e6-a7fc-eb0baf057465
[DEBUG] sofia_glue.c:3449 AUDIO RTP [sofia/internal/1000 at 10.169.112.170]
10.169.112.170 port 22134 -> 192.168.0.174 port 4020 codec: 120 ms: 20
[DEBUG] switch_rtp.c:2040 Starting timer [soft] 160 bytes per 20ms
[DEBUG] sofia_glue.c:3716 Set 2833 dtmf send payload to 101
[DEBUG] sofia_glue.c:3722 Set 2833 dtmf receive payload to 101
[DEBUG] sofia_glue.c:3749 sofia/internal/1000 at 10.169.112.170 Set rtp dtmf
delay to 40
[NOTICE] sofia_glue.c:4360 Pre-Answer sofia/internal/1000 at 10.169.112.170!
[DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_PROGRESS_MEDIA to
attached session 67192af8-159b-11e6-a7fc-eb0baf057465
[DEBUG] switch_channel.c:3368 (sofia/internal/1000 at 10.169.112.170)
Callstate Change RINGING -> EARLY
[DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_CALLSTATE to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
[DEBUG] mod_sofia.c:2891 Ring SDP:
v=0
o=FreeSWITCH 1462744655 1462744656 IN IP4 10.169.112.170
s=FreeSWITCH
c=IN IP4 10.169.112.170
t=0 0
m=audio 22134 RTP/AVP 120 101
a=rtpmap:120 AMR/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

DEBUG] switch_core_session.c:871 Send signal sofia/internal/
1000 at 10.169.112.170 [BREAK]
DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE_COMPLETE to
attached session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] switch_core_session.c:1016 Send signal sofia/internal/
1000 at 10.169.112.170 [BREAK]
DEBUG] sofia.c:5815 Channel sofia/internal/1000 at 10.169.112.170 entering
state [early][183]
DEBUG] switch_core_session.c:1151 Send signal sofia/internal/
1000 at 10.169.112.170 [BREAK]
DEBUG] switch_ivr.c:614 sofia/internal/1000 at 10.169.112.170 Command Execute
sleep(500)
EXECUTE sofia/internal/1000 at 10.169.112.170 sleep(500)
DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE_COMPLETE to
attached session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] mod_erlang_event.c:156 Sending event PRIVATE_COMMAND to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] switch_core_session.c:1151 Send signal sofia/internal/
1000 at 10.169.112.170 [BREAK]
DEBUG] switch_ivr.c:614 sofia/internal/1000 at 10.169.112.170 Command Execute
playback(abc_test/en/test)
EXECUTE sofia/internal/1000 at 10.169.112.170 playback(abc_test/en/test)
DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
INFO] mod_native_file.c:94 Opening File
[/usr/local/abc/sounds/en/us/callie/abc_test/en/test.AMR] 8000hz
DEBUG] switch_ivr_play_say.c:1314 Codec Activated L16 at 8000hz 1 channels 20ms
DEBUG] mod_erlang_event.c:156 Sending event PLAYBACK_START to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] switch_ivr_play_say.c:1717 done playing file
/usr/local/abc/sounds/en/us/callie/abc_test/en/test.AMR
DEBUG] mod_erlang_event.c:156 Sending event PLAYBACK_STOP to attached
session 67192af8-159b-11e6-a7fc-eb0baf057465
DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE_COMPLETE to
attached session 67192af8-159b-11e6-a7fc-eb0baf057465

Many Thanks.

On Sat, May 7, 2016 at 12:58 AM, Brian West <brian at freeswitch.org> wrote:

> For native files, you don't include an extension in your playback, you
> just say playback /en/test, the file will be test.AMR matching the SDP. And
> bits != sample rate if thats what you're pointing out.
>
> On Fri, May 6, 2016 at 1:58 PM, Pradeepa <pradee at gmail.com> wrote:
>
>> Hi,
>>
>> I want to play amr file in freeswitch IVR. But I get Invalid file format
>> [amr] error.
>>
>> Any suggestion to solve this problem?
>>
>>
>>
>> freeswitch log
>> -------------------
>> 2016-05-05 22:36:02.151586 [INFO] mod_dptools.c:1260 Sending early media
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:5282 Audio Codec Compare
>> [AMR:120:8000:20:0]/[AMR:96:8000:20:12200]
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:3190 Set Codec
>> sofia/internal/1000 at 10.169.112.170 AMR/8000 20 ms 160 samples 12200 bits
>> 2016-05-05 22:36:02.151586 [DEBUG] switch_core_codec.c:111 sofia/internal/
>> 1000 at 10.169.112.170 Original read codec set to AMR:96
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:5451 Set 2833 dtmf
>> send/recv payload to 101
>> 2016-05-05 22:36:02.151586 [DEBUG] mod_erlang_event.c:156 Sending event
>> CODEC to attached session 69a98c32-134c-11e6-a976-6b5931cb8fb7
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:3449 AUDIO RTP
>> [sofia/internal/1000 at 10.169.112.170] 10.169.112.170 port 22020 ->
>> 192.168.0.174 port 4006 codec: 120 ms: 20
>> 2016-05-05 22:36:02.151586 [DEBUG] mod_erlang_event.c:156 Sending event
>> CODEC to attached session 69a98c32-134c-11e6-a976-6b5931cb8fb7
>> 2016-05-05 22:36:02.151586 [DEBUG] switch_rtp.c:2040 Starting timer
>> [soft] 160 bytes per 20ms
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:3716 Set 2833 dtmf send
>> payload to 101
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:3722 Set 2833 dtmf
>> receive payload to 101
>> 2016-05-05 22:36:02.151586 [DEBUG] sofia_glue.c:3749 sofia/internal/
>> 1000 at 10.169.112.170 Set rtp dtmf delay to 40
>> 2016-05-05 22:36:02.151586 [NOTICE] sofia_glue.c:4360 Pre-Answer
>> sofia/internal/1000 at 10.169.112.170!
>> 2016-05-05 22:36:02.151586 [DEBUG] mod_erlang_event.c:156 Sending event
>> CHANNEL_PROGRESS_MEDIA to attached session
>> 69a98c32-134c-11e6-a976-6b5931cb8fb7
>> 2016-05-05 22:36:02.151586 [DEBUG] switch_channel.c:3368 (sofia/internal/
>> 1000 at 10.169.112.170) Callstate Change RINGING -> EARLY
>> 2016-05-05 22:36:02.151586 [DEBUG] mod_erlang_event.c:156 Sending event
>> CHANNEL_CALLSTATE to attached session 69a98c32-134c-11e6-a976-6b5931cb8fb7
>> 2016-05-05 22:36:02.151586 [DEBUG] mod_sofia.c:2891 Ring SDP:
>> v=0
>> o=FreeSWITCH 1462490942 1462490943 IN IP4 10.169.112.170
>> s=FreeSWITCH
>> c=IN IP4 10.169.112.170
>> t=0 0
>> m=audio 22020 RTP/AVP 120 101
>> a=rtpmap:120 AMR/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=ptime:20
>> a=sendrecv
>>
>> 2016-05-05 22:36:02.151586 [DEBUG] switch_core_session.c:871 Send signal
>> sofia/internal/1000 at 10.169.112.170 [BREAK]
>> 2016-05-05 22:36:02.711592 [DEBUG] switch_core_session.c:1151 Send signal
>> sofia/internal/1000 at 10.169.112.170 [BREAK]
>> 2016-05-05 22:36:02.731593 [DEBUG] switch_ivr.c:614 sofia/internal/
>> 1000 at 10.169.112.170 Command Execute playback(abc_test/en/test.amr)
>> EXECUTE sofia/internal/1000 at 10.169.112.170 playback(abc_test/en/test.amr)
>> 2016-05-05 22:36:02.731593 [DEBUG] mod_erlang_event.c:156 Sending event
>> CHANNEL_EXECUTE to attached session 69a98c32-134c-11e6-a976-6b5931cb8fb7
>> 2016-05-05 22:36:02.731593 [ERR] switch_core_file.c:150 Invalid file
>> format [amr] for [/usr/local/abc/sounds/en/us/callie/abc_test/en/test.amr]!
>>
>> amr prompt details
>> -------------------------
>>
>> Audio
>> Format                                   : AMR
>> Format/Info                              : Adaptive Multi-Rate
>> Format profile                           : Narrow band
>> Duration                                 : 16s 140ms
>> Bit rate mode                            : Constant
>> Bit rate                                 : 12.8 Kbps
>> Channel(s)                               : 1 channel
>> Sampling rate                            : 8 000 Hz
>> Bit depth                                : 13 bits
>> Stream size                              : 25.2 KiB (100%)
>>
>> Thanks.
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at 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 at 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 at freeswitch.org
>
>
> *Twitter: @FreeSWITCH , @briankwest*
> http://www.freeswitchbook.com
> http://www.freeswitchcookbook.com
> https://www.gofundme.com/freeswitch_ubuntu
>
> Got Bugs? Report them here <https://freeswitch.org/jira>! | 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
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160509/2bce669c/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list