CID sipgate trunking P-Preferred-Identity

Hello to the community,
it’s my first post and i am new to freepbx.

Here is my issue. Is there anyone who can help to solve the problem?

I want to send a P-Preferred-Identity Header in an pjsip-trunk to sipgate because of sending the CID which is in the extensions.

After reading in this forum i changed the extensions_custom.conf to:

exten => s,1,Noop(Entering user defined context macro-dialout-trunk-predial-hook in extensions_custom.conf)
exten => s,n,GoSub(func-set-sipheader,s,1(P-Preferred-Identity:sip:${CALLERID(number)}
exten => s,n,MacroExit

After talking to sipgate and looking to the log sipgate get this information:

P-Preferred-Identity:sip:[email protected]: 0170XXXXXX

What do i have to change, so that this part (0170XXXXXX) will not be submitted to sipgate?
“0170XXXXXX” → this is the number that i want to talk to.

Hope you could understand.
Thanks for your help.

Please provide /var/log/asterisk/full, for the call (the full log), with verbosity at least 3, and with “pjsip set logger on” in effect.

You should not see what they are claiming, and it is necessary to confirm that what is sent is actually wrong, and if so, where things started to go wrong.

It may not answer your question, but you’re misusing the gosub. There should be two comma separated arguments like this:

exten => s,n,GoSub(func-set-sipheader,s,1(header_name,header_value))
1 Like

Thanks for your fast replies.
i now changed:

exten => s,n,GoSub(func-set-sipheader,s,1(P-Preferred-Identity:sip:${CALLERID(number)}


exten => s,n,GoSub(func-set-sipheader,s,1(P-Preferred-Identity,sip:${CALLERID(number)}

changed : with ,

and it works.
thanks to you.

1 Like

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