In IP Office we can read the ISDN receive tracing and find the calling party number and the called party number.
In this example the provider is sending four digits.
3671846573mS ISDNL3Rx: v=1 peb=1
ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=1B07(Remote)
Message Type = Setup
InformationElement = BearerCapability
0000 04 03 90 90 a2 .....
InformationElement = CHI
0000 18 03 a9 83 82 .....
InformationElement = PI
0000 1e 02 82 83 ....
InformationElement = CallingPartyNumber
0000 6c 0c 21 83 3x 3x 3x 3x 3x 3x 36 30 36 30 l.!.XXXXXX6060
InformationElement = CalledPartyNumber
0000 70 05 80 31 30 30 33 p..1003
3671846574mS CMTARGET: ISDN BChannel 2: in-service check = 1
3671846574mS ISDNL3Evt: v=1 stacknum=1 State, new=Present, old=NullState id=6
3671846574mS ISDNL2Tx: v=1 peb=1
0000 02 01 01 62 ...b
3671846575mS CMLineRx: v=1
CMSetup
Line: type=Q931Line 1 Call: lid=1 id=6 in=1
Called[1003] Type=Unknown (0) Reason=CMDRdirect SndComp Calling[xxxxxx6060] Type=Unknown Plan=ISDN Pres=Allowed (0)
BC: CMTC=3K1Audio CMTM=Circuit CMTR=64 CMST=Default CMU1=ULaw
BChan: slot=0 chan=2
IE CMIEProgressIndicator (30) cs=CMCSITUT (0), loc=CMLPublicNetLocalUser (2), pd=CMPDOrigNotISDN (3)
3671846575mS PRN: Q931Trunk: Found QBChannel to match 0.2 --> 1.3
3671846575mS CMCallEvt: 0.156847.0 -1 BaseEP: NEW CMEndpoint f47eef10 TOTAL NOW=9 CALL_LIST=4
3671846576mS CMTARGET: ISDN BChannel 2: in-service check = 1
3671846576mS CMTARGET: ISDN BChannel 2: in-service check = 1
3671846576mS CMCallEvt: CREATE CALL:35405 (f47c2980)
3671846576mS CMCallEvt: 0.156848.0 -1 BaseEP: NEW CMEndpoint f4836b10 TOTAL NOW=10 CALL_LIST=4
We can then see the targeting: Although extension 1003 exists there is a incoming call route that targets 395 as the destination.
3671846579mS CD: CALL: 1.6.1 BState=Idle Cut=1 Music=0.0 Aend="Line 1" (1.3) Bend="" [] (0.0) CalledNum=1003 () CallingNum=xxxxxx6060 () Internal=0 Time=3 AState=Idle
3671846579mS CMCallEvt: 1.6.1 35405 Q931 Trunk:1 CHAN=2: StateChange: END=A CMCSIdle->CMCSDialInitiated
3671846579mS CMTARGET: 1.6.1 35405 Q931 Trunk:1 CHAN=2: LOOKUP CALL ROUTE: type=0 called_party=1003 sub= calling=xxxxxx6060 dir=in complete=1 ses=0
3671846579mS CMTARGET: 1.6.1 35405 Q931 Trunk:1 CHAN=2: SET BESTMATCH: length 4 vs -1 match=1003 dest=395
3671846579mS CMCallEvt: Priority hike: call 35405 priority 0->1
3671846580mS CMTARGET: 1.6.1 35405 Q931 Trunk:1 CHAN=2: LOOKUP ICR: DDI= CGPN=xxxxxx6060 (Destination 395 ) => CDPN=395
3671846580mS CMTARGET: 1.6.1 35405 Q931 Trunk:1 CHAN=2: ADD TARGET (N): number=395 type=0 depth=1 nobar=1 setorig=1 ses=0
I recall merlin monitor having the similar targeting traces using the right monitor command.