If it is true that G723 is still enabled, what else should I do to disable it?
I disabled it in the extension (I set Disallowed Codecs=all and Allowed Codecs=ulaw&alaw&g729)
I disabled it in the Asterisk SIP settings (unchecking the G723 checkbox)
I disabled it in the trunk => pjsip settings => uncheck the G723 checkbox
Is this list complete or do I miss something? Do other menus exist in Freepbx, where the G723 must be disabled? Or should I manually edit some conf file of Asterisk?
Do you mean the “show core codecs” command? The output of this command shows the G723 in the list, but honestly I don’t know if this means that the codec is enabled
The last logfiles I posted was obtained while the debug level was set for the full logfile in the Asterisk Logfiles Settings.
Debug has multiples levels, with the default being 0. If I read it correctly you seem to need at least 3 (CLI: “core set debug 3”), as you are trying to invoked this code:
I was thinking of something like “pjsip show endpoint xxxxx”, but I can’t find the code that implements that at the moment, so I’m not sure it really does provide the information. For chan_sip, it would be available from “sip show peer …”, but it is looking like it is missing for chan_pjsip.
That is “pjsip show endpoints” which is not detailed for each endpoint. The command “pjsip show endpoint name” shows the detailed information for the endpoint specified by name. To display bob, for example, you’d use “pjsip show endpoint bob”.
Indeed, early morning eyes. I don’t think that endpoint is being used for the incoming call though based on the logging. It appears to be coming in as anonymous instead, which would have different allowed codecs.
The match for the endpoint has “220.127.116.11” but the call came from “18.104.22.168” so it wouldn’t match the endpoint named “albertotrunk2”.
In FreePBX, you need to define Match/Permit settings that cover all the addresses or address ranges used by the provider. Also you should, normally disable all variations of anonymous access; they were sometimes needed as the only practical way of dealing with multiple sources addresses from some providers, but should not be needed for chan_pjsip, as Match/Permit supports address ranges.
Yes you are right. I had to allow the anonymous calls because otherwise the SIP phone doesn’t even ring. So I have edited manually the /etc/asterisk/pjsip.endpoint.conf and I have disallowed the g723 codec in the anonymous endpoint:
Then, after restarting the fwconsole, the call is connected and the codec translation error is solved. However tis cannot be the definitive solution because the freepbx will overwrite at some point the changes I did in the conf file
You are right. The problem is that I am not sure about the IP address from which the call arrive. So now I have made an attempt: I have written a comma-separated list of all the possible incoming IP addresses in the “SIP Server” field of the trunk (22.214.171.124,126.96.36.199,188.8.131.52,184.108.40.206,220.127.116.11). Then I opened the Asterisk SIP settings and have disallowed the anonymous calls. This worked!! Now the desired trunk is used, instead of the anonymous endpoint, the codec error is gone and the call is connected.
I am very happy and grateful of all of you and I consider this topic solved.
Just a couple of questions.
Is it possible to disallow the g723 coded for the anonymous endpoint, setting a menu in the GUI of freepbx (instead of editing the conf file)?
And do you confirm that it is syntactically correct to set a comma-separated list of servers or IP addresses in the SIP server field of the trunk? I just wish to be sure of that this is the real solution and not just a coincidence…
Sorry, typing error, I reported it wrongly in the post. Actually I had set allow=alaw,ulaw,g729
At the beginning I had set the match-permit in this way, but it didn’t work.
Now, to double check your comment, I moved the comma-separated list from the SIP server to the match-permit, I applied the changes with the red button, restarted the fwconsole and repeated the test: it still work!
It is strange, it looks like I have in some way “unblocked” my freepbx when I did my first change in the conf file and now it works even reverting it, as if freepbx keeps a memory of this. It may look stupid but this is what I observe.
Anyhow now it works, so in the doubt I leave the comma-separated list both in the SIP server and in the match-permit list.
SIP Server is used for outbound calls and can differ from Match / Permit, which is of inbound calls. Normally SIP Server would be a domain name, and would be populated with the list of addresses returned by the DNS server.
Although the Match / Permit list is completely separately configured in Asteirsk, FreePBX defaults it to the SIP Server setting. In many cases there are significant differences, e.g. there may only be one acceptable outbound address, which is a load balancer, but multiple inbound addresses representing the workers on the service provider system.