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â.
I opened the asterisk console asterisk -r
I sent the command core set verbose 4
I visualized the full logfile tail -f /var/log/asterisk/full
I pasted the output here
What is missing?
Possibly you wanted to request the output of the asterisk console when debug level is set. In this case, you can find it here: https://pastebin.freepbx.org/view/a872d692
I wish to remind this question. I would like that it is not overlooked.
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 â46.19.210.14â but the call came from â46.19.213.14â 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 (46.19.209.14,46.19.210.14,46.19.212.14,46.19.213.14,46.19.214.14). 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.