I have successfully set up a PJSIP trunk to my provider, Gamma. Inbound and outbound calls are working great except the CLI presentation for outbound calls which is using a number assigned by Gamma rather than the number I want.
The following instructions have been provided but I am unsure how to do this in FreePBX (22.214.171.124). I have tried entering the desired number in “Outbound CallerID” and “From User” for the trunk but neither changes the assigned number.
Gamma tell me that I am sending “asterisk” as the CallerId but I’m not sure how/where this is set.
Can anyone help?
Test 10 – 13: CLI Presentation
In order to successfully present an ‘A Number’ we expect this to be sent to Gamma in either of the following formats in the FROM header of the SIP INVITE:
The A-number is checked against a database on the Gamma network of geographic numbers that are allocated to the SIP trunk endpoint. If the number presented does not meet the above criteria, the A-Number CLI presented will be a default CLI, which is the first number in the allocated Geographic DDI range.
Using CLI for Caller ID Always confuses me. CLI is “Command Line Interpreter” and is the term we’ve historically used for the Command Line in “asterisk -r”.
Check the logs in ‘/var/log/asterisk/full’ and you should see how the system is setting the Caller ID Field. In most cases (unless the reference is specified as “CID Name” or “CID Number”) you should create a consolidated CID in the format “Caller Name” <NUMBERXXXX>. Note that the quotation marks and GT/LT signs should be included for all Caller IDs.
There are at least three places where the Caller ID can be set:
In the Trunk Defintion (“NAME” <NUM>).
In the Outbound Route (same as above).
In the specific extensions (same as above).
(Sometimes) In the Phone itself (format dependent on phone).
Gamma is telling you that they only allow you to send numbers that you have with them, so what you are trying to do won’t work.
If you are trying to send a number that you have with another provider, ask them to add the number(s) to their database. Retest, if you still have trouble post a SIP trace (redact phone numbers, account numbers, public IP addresses and anything else you feel is personal).
If you are trying to send a number that’s not yours, e.g. to forward a call to your mobile and display the number of the original caller, you can try negotiating that with Gamma but IMO you will have to find another provider for that. My recommendations are Voxbeam (Platinum route) and AnveoDirect (Prime routes). Both companies offer a small credit at signup so you can test without making a payment.
If a given trunk should always send the same caller ID (your present setup), just change the Outbound CallerID for the trunk to a format that Gamma will accept. Try "01987654321" <+441987654321>
or "01987654321" <1987654321>
If you want to change caller ID dynamically, e.g. to send the number that is local or closest to the person being called, you can use one of the above formats as caller ID for an Outbound Route or an Extension.
To send numbers that are not yours, e.g. when forwarding calls to your mobile, you will need a separate provider for those calls.