Gateway Privacy Mode Issue

Is the Privacy mode on gateway ready for use?
When set to “Trusted gw. Forward” and the SIP INVITE has a privacy header, it causes a 500 Server Error.

I got this issue on both my production and testing system.
Yeti Switch 1.12.177. Routing 20240806205100. CDR 20240617084103.

SEMS running on Switch20

Full log from an example call here: gist:0160246c1d5da4c967a89c5d14d26371 (github.com)

This I believe is the key part:

 [112456/112463] [yeti:SBCCallLeg.cpp:2556] DEBUG: processing initial INVITE sip:+6492345678@111.111.111.111:5060
 [112456/112463] [yeti:SqlRouter.cpp:339] DEBUG: Lookup profile for request: 
 INVITE [r-uri:sip:+6492345678@111.111.111.111:5060;i:w3onEL_jGTH8H7AvdrAM6A..;cseq:2;l-tag:32a6e84d;rtset:[<sip:111.111.111.111;lr>];m:<sip:test-trunk-three@222.222.222.222:5060>;hdr:[Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE, UPDATE
Supported: replaces, timer
User-Agent: 3CXPhoneSystem 20.0.2.715 (715)
Privacy: id
X-Yeti-Auth: test-trunk-three
P-Asserted-Identity: <sip:+6491234567@sip.ufone.co.nz>
];user:+6492345678;domain:111.111.111.111;f-uri:sip:test-trunk-three@222.222.222.222:5060;from:"anonymous" <sip:anonymous@anonymous.invalid:5060>;to:<sip:+6492345678@111.111.111.111:5060>;]
 [112456/112463] [yeti:db/PgConnectionPool.cpp:212] DEBUG: : got active connection [0x7fdaf801f070]
 [112456/112463] [sip/parse_uri.cpp:305] DEBUG: Converted URI port (5060) to int (5060)
 [112456/112463] [sip/parse_uri.cpp:305] DEBUG: Converted URI port (5060) to int (5060)
 [112456/112463] [sip/parse_uri.cpp:305] DEBUG: Converted URI port (5060) to int (5060)
 [112456/112463] [yeti:UsedHeaderField.cpp:157] DEBUG: X-YETI-AUTH[Raw:*:] processed. got 'test-trunk-three'
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'Diversion' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'X-ORIG-IP' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'X-ORIG-PORT' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'X-ORIG-PROTO' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:157] DEBUG: P-Asserted-Identity[Raw:*:] processed. got '<sip:+6491234567@sip.ufone.co.nz>'
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'P-Preferred-Identity' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:157] DEBUG: Privacy[Raw:*:] processed. got 'id'
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'Remote-Party-ID' in SipRequest
 [112456/112463] [yeti:UsedHeaderField.cpp:89] DEBUG: no header 'RPID-Privacy' in SipRequest
 [112456/112463] [yeti:SqlRouter.cpp:531] ERROR: SQL exception for [0x7fdaf801f070]: ERROR:  function array_append(character varying[], text) does not exist
LINE 1: SELECT array_append(v_bleg_append_headers_req, format('Priva...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:  SELECT array_append(v_bleg_append_headers_req, format('Privacy: %s', array_to_string(i_privacy,';')::varchar))
CONTEXT:  PL/pgSQL function process_gw_debug(callprofile_ty,class4.destinations,class4.dialpeers,billing.accounts,class4.gateways,billing.accounts,class4.gateways,boolean,integer,character varying[],character varying[],character varying[],character varying) line 468 at assignment
PL/pgSQL function process_dp_debug(callprofile_ty,class4.destinations,class4.dialpeers,billing.accounts,class4.gateways,billing.accounts,integer,boolean,integer,character varying[],character varying[],character varying[],character varying) line 56 at RETURN QUERY
PL/pgSQL function route_debug(integer,integer,smallint,inet,integer,inet,integer,character varying,character varying,character varying,integer,character varying,character varying,integer,character varying,character varying,integer,character varying,character varying,integer,json,character varying,character varying,inet,integer,smallint,character varying,character varying,character varying,character varying,character varying) line 1024 at RETURN QUERY
.

what postgresql version you running?

Hi Dmitry,

I think you might be right about the issue, I know from the documentation you’re supposed to install PostgreSQL 13 but I’m running:
Version: 16+262.pgdg110+1

I think this is the first major issue I’ve run into that could be be caused by running a newer version.

Thanks