Uplink(g729,alaw)<-asterisk->Yate(g729,alaw)<->client A, Client B
Both clients are g729 and alaw-capable, I’ve checked settings on both devices.
Client A can call to PSTN only if I change uplink codec setting to “alaw,g729”, Client B can call only if I revert these settings back to “g729,alaw”. In opposite case, I have one-directional voice and transcoding don’t mitigate the problem.
Is it possible to permit caller and called to negotiate codecs by themselves without Asterisk interference, like Yate does?
I want Asterisk just sends in OK/SDP to caller only codec that is proposed by called, NOT full called codec list from sip.conf.
Asterisk is a back to back user agent. the two sides don’t, in general, share a common protocol, so can’t negotiate directly.
Asterisk does allow a few short cuts with SIP, e…g those involved with directmedia, but there is no support for general end to end negotiation.
There are channel variables you can set, before you answer the incoming call and before initiating the outgoing call, to constrain the choice of codecs. (If there were deep support, as the incoming codec choice wouldn’t be made until Dial is running on the outgoing side, you wouldn’t be able to answer the call before the outgoing call side answered.)
Also Asterisk always uses early offer SDP. This means that it needs to decide what codecs to offer to the outgoing side before it knows their actual capabilities. That may or may not be relevant here.