Trunk caller id

I am setting outbound caller id in pjsip settings and choosing force trunk callerid, but it is not show in trunk settings when I type pjsip show endpoint …

The callerid setting in Chan_SIP/PJSIP only applies if there is no callerid provided (no from user/name or other sources). The Route CID/Trunk CID are dialplan settings that are applied to the channel when being used.

How can I set the callerid section manually in the endpoint configuration file? How can I correctly override my endpoint section FreePBX has generated?

I got it. I should put it in pjsip.endpoint_custom.post under the same section name with the plus sign
[section-name] (+)
setting=

No, you’re putting too much stock in this setting. It is rarely used. As I said it is only used when no other CallerID is presented. CallerID will always default to the From Header details when no other options (RPID, PAI, PIA) are used.

That means when you dial from your phone, the From Header is already providing your username as the CallerID number. When an inbound call hits the PBX, the CallerID of the caller is presented.

The only time this setting would be really used is if you Originated a call from the PBX and did not set CallerID in the Originate command.

Thank you. I tried to put caller id, but in fact it did not work with the from field.

Look, if you’re just trying to set the CallerID for calls going out a trunk the recommended method is to set it in the Outbound Route that uses the trunk. You can still set the Trunk CID if you want.

So for calls to the PSTN the system will either use the Outbound CID assigned to the extension itself, the Outbound Route CID (if the extension one is not set or the Route CID is forced) and finally it will look at the Trunk CID with the same rules. If already set don’t do anything unless told to force the Trunk CID.

That is how you set CallerID on a trunk in FreePBX.

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