Pjsip codec configuration problem


#1

Hello,

I have running Asterisk 13.18.3

I use the pjsip stack and the pjsip.conf.

I have many standard sip-clients running and one special endpoint.
This special endpoint can manage 64 calls simultan.

Usecase:
I wish, that I can use different codecs on the simultan endpoint.
For example:
SIP-Client A call the special endpoint and in this call (1) is G722 used.
SIP-Client B call the special endpoint and in this call (2) is ulaw used.

in the pjsip.conf exist this section

endpoint_internal
type=endpoint
context=from-internal
disallow=all
allow=ulaw,G722

In this case, all clients use ulaw.
Only clients without ulaw use G711, but the special endpount support ulaw and so is a call created with incoming ulaw and outgoing G722.

In this case, that a endpoint not support G711, I need a configuration, that the call use G722 in both directions.
How can I solve this problem?

Regards


#2

PJSIP provides a dialplan function[1] which can be used for some media offer control in the dialplan. You may be able to use it to better control things as you’d like.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_PJSIP_MEDIA_OFFER