FreePBX + Grandstream HT813 Caller id configuration (Portugal)


I am trying to get caller ID in my FreePBX. Currently when someone calls my PSTN number I get my trunk number in the caller ID. I understood that one need to change Caller ID Scheme.

Am I right?

Is anyone using HT813 in Portugal (or any country that use the same configuration) that can give me a hand with this?


There are two possible issues: the HT getting the caller ID from the PSTN line, and sending it to Asterisk in the correct format.

For the first issue:
At the Asterisk command prompt (not a shell prompt), type
pjsip set logger on
sip set debug on
(according to trunk type)
make a test call in and see what appears in the P-Asserted-Identity header. If the caller ID is present, the first issue is solved. Otherwise, try different values of Caller ID Scheme until the caller ID shows up. Alternatives to just guessing the Scheme include documentation from your carrier, documentation for a phone that shows caller ID when connected to your line, or finding the format for Portugal on the web (I failed). Or, if you have a way to listen on the line to caller ID being sent (butt set, capacitor in series with non-electronic phone, etc.), post the audio file and we can figure it out. There is some general information here:

Once P-Asserted-Identity has the correct info, try changing Caller ID Transport Type to Relay via SIP From. With luck, it will work and you are done. If calls now fail altogether, there may be a trunk settings change to fix that; post details of your trunk configuration. Alternatively, you can use a custom context to get the caller ID from the PAI header.

Hello, @Stewart1!

Thank you for your answer.

So, I got caller id showing in the console using “ETSI-DTMF during ringing.”
Changed Caller ID Transport Type to Relay via SIP From, and now calls won’t ring.

I have the following error in the log:
[2021-10-24 00:17:52] NOTICE[18614] res_pjsip/pjsip_distributor.c: Request ‘INVITE’ from ‘<sip:[email protected]>’ failed for ‘xxx:5062’ (callid: xxx) - No matching endpoint found
[2021-10-24 00:17:52] NOTICE[18614] res_pjsip/pjsip_distributor.c: Request ‘INVITE’ from ‘<sip:[email protected]>’ failed for ‘xxx:5062’ (callid: xxx) - Failed to authenticate

EDIT: I changed it to relay via sip p-asserted-identity and now it is working with caller id! :smiley:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.