Outbound routes showing wrong CID

Hi all,

I am Facing problem with setting up outbound CNum and CNam. I have one Digital card PRI and Analog card FXO in system. I and setting DAHDI configuration and having dahdi trunk.

I have make sure that our provider not messing with numbers.
I have set at extension level Outbound CID with “FM 1060”<403#######>. my Outbound route is also not overriding Extension number. and My trunk also Allows Any CID.

When I make call I can see this number in my logs setting Outbound caller ID and name. but on receiver’s end I receive <587#######> which is my SIP PRI number.

Please guide me where I am missing any settings.


I’m confused. You didn’t mention SIP before and PRI means primary rate interface, i.e. DAHDI. Did you really mean SIP trunk, and could you explain where SIP fits into the system?

You won’t be able to send caller ID outbound over this interface, as the caller ID signalling protocol is only defined in the inbound direction.

Thanks for replay @david55.
by SIP PRI means T1PRI Trunk it shows in logs like

29380 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:40] Set(“SIP/101-00000003”, “CDR(outbound_cnum)=403#######”) in new stack
29381 [2021-07-26 14:38:41] VERBOSE[16910][C-00000002] app_mixmonitor.c: Begin MixMonitor Recording SIP/101-00000003
29382 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:41] Set(“SIP/101-00000003”, "CDR(outbound_cnam)=FM 1060 ") in new stack
29383 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:14] GosubIf(“SIP/101-00000003”, “1?sub-flp-2,s,1()”) in new stack
29384 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:1] ExecIf(“SIP/101-00000003”, “0?Return()”) in new stack
29385 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:2] ExecIf(“SIP/101-00000003”, “1?Return()”) in new stack
29386 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:15] Set(“SIP/101-00000003”, “OUTNUM=306*******”) in new stack
29387 [2021-07-26 14:38:41] VERBOSE[16909][C-00000002] pbx.c: Executing [[email protected]:16] Set(“SIP/101-00000003”, “custom=DAHDI/r0”) in new stack

So I mean taking out like SIP/101-00000003.
and Analog card FXO I want be able to set outbound over the interface but how to choose DAHDI line in order to get CID what we want?


That SIP is on the incoming side, so I’m still confused. However, T1 Primary Rate covers a wide range of signalling systems, some of which will not be able to support outbound caller ID, so more details of your Primary Rate Interface configuration are needed.

Also the ability to control caller ID on the PSTN is widely abused, so your service provider may have a policy of always using the network provided ID, or limiting you to pre-approved IDs.

can you please tell me how can I give you more details? My service provider says we are just using same CID which is given by PBX and when I check with connecting old Analog phone with RJ11 POTS it gives <403#######> which is correct number. but when I connect with PBX system it gives <587#######>. I am not even setting <587#######> anywhere.
Even in CDR report I can see <403#######> as my outgoing number.

On analog lines, you have no direct control over the outbound caller ID. Each line has a number and that is what will be sent when you call out on that line.

I am guessing that one or more of your lines have 587 numbers.

The ‘r’ tells the system to use the lines in round-robin order. If you make several calls, each will show a different number. See

If that’s not what you want, you can tell the system to select the first available line, or you can set up a trunk to use a specific line (with possible failover to a different line).

However, if you are having this trouble on a PRI, you should be able to fix it in the DAHDI config.

yes you are right more than one line is on 587####### number but I want to send different number out.
say Ext 1001-1005 send out with 403-914-7041
Ext 1006-1010 send out with 403-912-8976.

These are just an Example.
I tried to set Outbound routes using those numbers but it just showing correct number.

On analog lines, Outbound Routes cannot directly control the caller ID. However, you can have extensions 1001-1005 select an Outbound Route which uses a different trunk than the route for extensions 1006-1010. You would define a separate group with just 403-914-7041 and another with 403-912-8976.

However, if extension 1001 makes a call and while it is in progress, extension 1002 makes a call, 403-914-7041 is busy. You could set up the route to fail over to another line (the caller ID will be different from what you want), get a SIP trunk that allows you to send any caller ID, or make the user at extension 1002 wait until the line becomes free.

I’m still not sure whether you trying to do this over an FXO line or a T1 line. An analogue phone could only use an FXO line and definitely would have no control over caller ID. Asterisk working over an FXO line also has no control over caller ID.

Also, I don’t know if you are using ISDN or channel associated signalling, on the T1, or even some less common common channel signalling option. ISDN does support caller ID, but it might be overridden by the network. At least some channel associated signalling options won’t use caller ID. You cannot configure DAHDI without knowing this information.

As background, the OP is in Canada and 403 is the old NANP area code for Southern Alberta and 587 is one of the new codes for the whole of Alberta, so it is likely that older lines are 403 and newer ones are 587.

Canada is in the process of implementing enhanced caller ID validation, but I’m not sure how that relates to primary rate interface users, as the press releases seem to relate to VoIP providers.

…When I make call I can see this number in my logs setting Outbound caller ID and name. but on receiver’s end I receive <587#######> which is my SIP PRI number.

There is nothing can do because both trunks (FXO and PRI) becomes of a TDM networks, Caller ID is handler and managed by TDM carrier due to many reason as, security, technical, etc.

You probably don’t even get a vote on your CallerID. These technologies traditionally set the CID for you based on your use of the line.

Can you please tell me what do you mean by TDM networks?

TDM = “Time Domain Multiplexing” where a larger pipe(s) is/are divided into individual 64kbs ‘bearer’ channels managed by one or more shared “data” channels , while it is true that you have no control over your CallerID apparent on an analog line, ISDN signalling provides that you can offer your own CID, Many carriers will honor that presentation (AT&T included) if certain conditions are met , check with your carrier

It’s more normally called time division multiplexing, and basically refers to your T1 line.

(In telephony it tends to be used in a more narrow sense than the words imply, namely when fixed time slots are used. In the more general sense, IP is also time division multiplexed, but there are no fixed time slots.)

It even more normally refers to both E1 and T1 (J1) lines if you are less parochial. It can also refer to much larger ‘spans’ that can be aggregated way beyond 23(T1) or 30(E1) B channels sharing the same D channel(s)

Time-division multiplexing - Wikipedia

gotta love

plesiochronous digital hierarchy

We may be confusing the issue with B and D channels, as the question of channel associated or common channel signalling is still open. This could be a very old installation. I never got the question about the T1 configuration answered.

Evan 40 year old AMI/D4 signalling over E&M on a T1 line can still advertise CallerID to AT&T