FreePBX 17 outgoing caller-id

Hello,
I’m using FreePBX 17 with a Sip trunk to Sipgate. I can’t seem to set the outgoing caller ID according to the respective extension. I’ve tried every tutorial or tip I’ve found for a few days now, but no luck. Can someone please give me the hopefully crucial tip?
Thank you very much.
Rolf

So you created a new extension and set the outbound CID to the number you want.
Did you use only numbers or put in text as well ?

yes, I created a new extension and set the outbound cid to “209”<495352909895>.
On my deskphone I have the cid also configured.

With tcodump I can see the cid from the phone incoming to freepbx

But outgoing from freepbx I see only the trunk-id

I can change what ever I want, I only see the trunk-id outgoing from freepbx and not the cid from the extension.

Regards
Rolf

Find out in what header and what format Sipgate expects the caller ID.
Adjust your trunk settings accordingly, most likely by turning on Send RPID/PAI.

Check that you are sending the number in the correct format, they may require +495352909895 or 05352909895. If you are not sure, look at an incoming call and use the same format they send you.

Confirm that your Outbound Route doesn’t have Override Extension, Intra-Company or Emergency set.

Confirm that the trunk CID Options is set to Allow Any CID.

If you still have trouble, turn on pjsip logger, make a test call, paste the Asterisk log for the call at pastebin.com and post the link here. Call a number you don’t have to redact, such as a local McDonalds.

Hello Stewart1,
okay, thanks. I have checked the format with sipgate.de

Inside the sipgate documentation I found

[dialhook]
exten = s,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)[email protected]>)
same = n,Return()

I tried it, but no luck.

I just tested it also with

[macro-dialout-trunk-predial-hook]
exten = s,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)[email protected]>)
same = n,Return()

I also configured Send RPID/PAI with both.

Also no luck.

Unfortunately I don’t have any more time now and can only continue next week.

Many thanks for your support
regards
Rolf

The one you are using have to be called on the destination channel, but the hook you are using runs on the caller’s channel. The above subroutine sets up information to allow FreePBX to run them on the right channel.

Hello David,

I see your post and I checked this again.
Do you mean a hook like this

[macro-dialout-trunk-predial-hook]
exten => s,1,Noop(Entering user defined context macro-dialout-trunk-predial-hook in extensions_custom.conf)
exten => s,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=sip:${CALLERID(number)}@sipconnect.sipgate.de)
exten => s,n,Return()

I tried it, but also no luck.

regards
Rolf

No. I mean like this:

I did point at the wrong posting (3 rather than 4) in the thread originally, so the email notification may have been confusing, but I did correct it in the forum.