Chan Local, Originate And Slin

Home » Asterisk Users » Chan Local, Originate And Slin

Hi all!

Asterisk 13.1.0 Ubuntu 16.04, all latest. Can anybody explain this to me – I run Originate command from dialplan:

same => n,Originate(Local/${number}@mycontext,app,ConfBridge,${confnum})

and I get crazy sound distortion in the conference, and I see that transcoding takes place here:

NativeFormats: (slin192)
WriteFormat: slin
ReadFormat: slin192
WriteTranscode: Yes (slin@8000)->(slin@192000)
ReadTranscode: No

When I do the same from a call file like:

same => n,System(printf “Action: Originate\nActionID: 1\nChannel:
Local/${number}@mycontext\nApplication: Confbridge\nData: ${confnum}\n” >
/var/spool/asterisk/outgoing/${number}-${confnum})

the sound is perfect and this is what I see on the channel params:

NativeFormats: (slin)
WriteFormat: slin
ReadFormat: slin WriteTranscode: No
ReadTranscode: No

Can anybody explain what is going on?

7 thoughts on - Chan Local, Originate And Slin

  • First, I cannot set codecs with cmd Originate from dialplan (or can I?). Second – the difference in my example is only between cmd Originate from dialplan and Originate from a call file. To my mind, it shouldn’t make any difference.

    ср, 22 нояб. 2017 г. в 16:44, Dmitriy Serov :

  • This thread is not the point how to create call files and not about manager commands. I am asking why naive codec is different for channel Local with cmd Originate when comparing to the same action in a call file. Call files work for me in this way. If it doesn’t work for you, maybe you have a different OS or Asterisk version.

  • Again – when Originate is run from dialplan, i get:

    NativeFormats: (slin192)
    WriteFormat: slin
    ReadFormat: slin192
    WriteTranscode: Yes (slin@8000)->(slin@192000)
    ReadTranscode: No

    When it’s made with a call file (no matter how a call file is created), I
    see

    NativeFormats: (slin)
    WriteFormat: slin
    ReadFormat: slin WriteTranscode: No
    ReadTranscode: No

    Please note – I do not use any manager API
    Can anybody explain how the native format is chosen in these cases?

  • Version 13.1 is a very old version of Asterisk 13. The current version of Asterisk 13 is 13.18.2. I also recall an issue where local channels tended to use slin192 when there was no need. However, I’m unable to find the issue to know when that was done.

    Richard

  • Hmm thanks, I guess I should try the latest version just to check. Unfortunately Ubuntu asterisk is not so frequently updated, just backports on security updates