Only in very unusual circumstances would you use a compression codec in an FXO gateway.
Your gateway seems local as itâs on a private IP address. If thatâs the case, both gateway and trunk settings should enable only ulaw. If it is e.g. connected via a VPN in a location where bandwidth is very limited or expensive, please provide details.
Regarding the other issue, the incoming call is not matching any trunk. Using pjsip or chan_sip? Using registration or statically configured?
So, Iâm using this local IP and port to already port out 4 FXS ports that are connected to analog phones, they are successfully receiving both inbound and outbound calls.
Iâm not finding where Iâm able to adjust the codec on the gateway side, as Iâm still fairly new into the world of VoIP and PBX.
So the g723 codec, as far as I can tell, is being assigned as a default. Also, in my codec prioritization, I am unable to located the g723, so Iâm not sure where it is being established.
I was able to change the Sip Settings to allow âAnonymous Sip Inbound Callsâ, and was able to dial in fine, but for a more permanent fix I would like to get away from this, as I feel it leaves too many doors open for security risks.
I know little about Vega but understand that a given FXS or FXO port can be configured to use a different subset of the enabled codecs, via the config file. I donât know whether this is exposed in the web interface. The entry âg7231â is a flavor of G.723 that is causing your trouble.
The Vega will always use the same codec for transmit and receive, so try enabling only ulaw in the trunk. If this causes calls to be completely rejected, try setting priority 4 to g711Ulaw64k. If still no luck, at the Asterisk command prompt, type sip set debug on
make a failing call and youâll see the SIP trace (along with the regular entries) in the Asterisk log. The incoming INVITE will show you which codecs are being offered and you can try to adjust the Vega settings to make ulaw first.
In addition to the security issue, if a call doesnât match a trunk the codec selection is determined by the Audio Codecs section of Asterisk SIP Settings. You could try setting that to ulaw only.
I donât know how, but if you can get the Vega to send FXO calls from a different local SIP port, then you configure port=xxxx in your trunk settings and the FXO calls should be recognized as belonging to that trunk. OR, if you can get the Vega to send FXO calls to a different port on the PBX, you could set up a pjsip trunk for FXO.