Get current codec in PJSIP

Hi,

how to get the codec which is currently used in PJSIP dialplan?

The CHANNEL dialplan function[1] can be used to retrieve this information about any channel. It would be audionativeformat and videonativeformat.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_CHANNEL

1 Like

Why is it in brackets? (e.g. (g722))

The underlying implementation which provides the data back provides it in that fashion.

2 Likes