Playback application choose wrong (highest translation cost) format

Hello everyone!

My asterisk version Asterisk 16.3.0. & CentOS 7

Have only 1 sip provider with chan_sip:

[general] and [provider] settings
...
disallow=all
allow=alaw

I use asterisk only for outgoing calls with Playback application. Everything works OK! (but I’m little bit dissapointed for max concurrent calls with 16 version, AFAIR 11 version with chan_sip handled more…).

To reduce CPU load, I converted all my .wav files (from slin) to .alaw and got some weird things:

If call originated with SIP channel - application Playback works fine:

   -- Executing [s@macro-play-331:1] NoOp("SIP/provider-00000003", "macro for ID: 331 started") in new stack
    -- Executing [s@macro-play-331:2] Playback("SIP/provider-00000003", "/var/someDirectory/15726464524XYO5.mp3") in new stack
    -- <SIP/tele2-00000003> **Playing '/var/someDirectory/15726464524XYO5.mp3.alaw'** (language 'en')
    -- Executing [s@macro-play-331:3] Hangup("SIP/provider-00000003", "") in new stack

But if call originated with Local channel, Playback choose wrong format to play (deleting .wav file fix problem, but why???)

Executing [s@macro-play-331:1] NoOp("Local/someNumber@provider-00000000;1", "macro for ID: 330 started") in new stack
    -- Executing [s@macro-play-331:2] Playback("Local/someNumber@provider-00000000;1", "/var/someDirectory/15726464524XYO5.mp3") in new stack
    -- <Local/someNumber@provider-00000000;1> **Playing '/var/someDirectory/15726464524XYO5.mp3.slin'** (language 'en')
    -- Executing [s@macro-play-331:3] Hangup("Local/someNumber@provider-00000000;1", "") in new stack

Why it happens?

PS. Don’t tell me pls about Macro is deprecated. I didn’t use it for depth or recursive. Originating extension with application Macro gives me more concurrent calls instead of extension with extension.

The cost of translating slin to A-law is really quite low. However, the reason for this is ithat you didn’t specify a codec for the Originate. Older versions of Asterisk definitely use SLIN as the default codec for Originate, although I think some later versions may sometimes use higher rate linear codecs.

AMI definitely supports setting codec, but I’m not sure about other ways of doing originate.

Thanks for answer. I’ll try to set codec for the Originate and will post results here.

I think if I change codec for originate - I will have a problems with EAGI application (audio stream).
So I decided to move alaw files in special directory.
Thanks for help!
PS. btw for max concurrent calls (>1000) chan_sip with *v.11 is better than pjsip?))))