Problem Caller ID on inbound route

Dear All,

This is first time we using asterisk, we using device Xorcom XR2019 (8 FXO port).
This device come with software FreePBX 2.5.2.2 and asterisk 1.4.29.

We connect from pstn and Fixed Wireless Terminal (FWT) GSM to Xorcom XR2019 FXO port to make outbound call from IP Phone to PSTN or GSM and inbound call from PSTN to GSM to IP Phone

We have problem with inbound routing where Caller ID is always appear unknown

Note: we live in Indonesia and we don’t know cid for Indonesia. We check that PSTN and FWT GSM already have caller id feature activated

this is our chan_dahdi.conf

; Auto-generated by /usr/sbin/hardware_detector
[trunkgroups]

[channels]
;context=from-pstn
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
echotraining=800
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1
;cidsignalling=bell
;cidstart=ring
usesmdi=yes
cidsignalling=smdi
cidstart=ring
usedistinctiveringdetection=yes
distinctiveringaftercid=yes
;useincomingcalleridondahditransfer=yes
useincommingcalleridonzaptransfer=yes
sendcalleridafter=2
channel=1-6

;Uncomment these lines if you have problems with the disconection of your analog lines
busydetect=yes
busycount=3

immediate=no
#include dahdi-channels.conf
#include chan_dahdi_additional.conf

This is our asterisk log when GSM or PSTN connected on FXO port 3

– Starting simple switch on ‘DAHDI/3-1’
– Detecting post-CID distinctive ring
– Detected ring pattern: 338,140,0
– Checking 0,0,0
– Checking 0,0,0
– Checking 0,0,0
– Executing [s@from-zaptel:1] NoOp(“DAHDI/3-1”, “Entering from-zaptel with DID == “) in new stack
– Executing [s@from-zaptel:2] Ringing(“DAHDI/3-1”, “”) in new stack
– Executing [s@from-zaptel:3] Set(“DAHDI/3-1”, “DID=s”) in new stack
– Executing [s@from-zaptel:4] NoOp(“DAHDI/3-1”, “DID is now s”) in new stack
– Executing [s@from-zaptel:5] GotoIf(“DAHDI/3-1”, “1?zapok:notzap”) in new stack
– Goto (from-zaptel,s,8)
– Executing [s@from-zaptel:8] NoOp(“DAHDI/3-1”, “Is a Zaptel Channel”) in new stack
– Executing [s@from-zaptel:9] Set(“DAHDI/3-1”, “CHAN=3-1”) in new stack
– Executing [s@from-zaptel:10] Set(“DAHDI/3-1”, “CHAN=3”) in new stack
– Executing [s@from-zaptel:11] Macro(“DAHDI/3-1”, “from-zaptel-3|s|1”) in new stack
– Executing [s@macro-from-zaptel-3:1] NoOp(“DAHDI/3-1”, “Entering macro-from-zaptel-3 with DID = s and setting to: 9000”) in new stack
– Executing [s@macro-from-zaptel-3:2] Set(“DAHDI/3-1”, “__FROM_DID=9000”) in new stack
– Executing [s@macro-from-zaptel-3:3] Goto(“DAHDI/3-1”, “from-trunk|9000|1”) in new stack
– Goto (from-trunk,9000,1)
== Channel ‘DAHDI/3-1’ jumping out of macro ‘from-zaptel-3’
– Executing [9000@from-trunk:1] Set(“DAHDI/3-1”, “__FROM_DID=9000”) in new stack
– Executing [9000@from-trunk:2] Gosub(“DAHDI/3-1”, “app-blacklist-check|s|1”) in new stack
– Executing [s@app-blacklist-check:1] LookupBlacklist(“DAHDI/3-1”, “”) in new stack
– Executing [s@app-blacklist-check:2] GotoIf(“DAHDI/3-1”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:3] Return(“DAHDI/3-1”, “”) in new stack
– Executing [9000@from-trunk:3] ExecIf(“DAHDI/3-1”, “1 |Set|CALLERID(name)=”) in new stack
– Executing [9000@from-trunk:4] Set(“DAHDI/3-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [9000@from-trunk:5] SetCallerPres(“DAHDI/3-1”, “allowed_not_screened”) in new stack
– Executing [9000@from-trunk:6] Goto(“DAHDI/3-1”, “from-did-direct|8000|1”) in new stack
– Goto (from-did-direct,8000,1)
– Executing [8000@from-did-direct:1] Macro(“DAHDI/3-1”, “exten-vm|novm|8000”) in new stack
– Executing [s@macro-exten-vm:1] Macro(“DAHDI/3-1”, “user-callerid”) in new stack
– Executing [s@macro-user-callerid:1] Set(“DAHDI/3-1”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/3-1”, “1|Set|REALCALLERIDNUM=”) in new stack
– Executing [s@macro-user-callerid:4] Set(“DAHDI/3-1”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:5] Set(“DAHDI/3-1”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/3-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,10)
– Executing [s@macro-user-callerid:10] GotoIf(“DAHDI/3-1”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:11] Set(“DAHDI/3-1”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:12] GotoIf(“DAHDI/3-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“DAHDI/3-1”, “Using CallerID “” <>”) in new stack
– Executing [s@macro-exten-vm:2] Set(“DAHDI/3-1”, “RingGroupMethod=none”) in new stack
– Executing [s@macro-exten-vm:3] Set(“DAHDI/3-1”, “VMBOX=novm”) in new stack
– Executing [s@macro-exten-vm:4] Set(“DAHDI/3-1”, “EXTTOCALL=8000”) in new stack
– Executing [s@macro-exten-vm:5] Set(“DAHDI/3-1”, “CFUEXT=”) in new stack
– Executing [s@macro-exten-vm:6] Set(“DAHDI/3-1”, “CFBEXT=”) in new stack
– Executing [s@macro-exten-vm:7] Set(“DAHDI/3-1”, “RT=”””) in new stack
– Executing [s@macro-exten-vm:8] Macro(“DAHDI/3-1”, “record-enable|8000|IN”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“DAHDI/3-1”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“DAHDI/3-1”, “recordingcheck|20110129-220605|1296313560.23”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20110129-220605|1296313560.23: Inbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“DAHDI/3-1”, “”) in new stack
– Executing [s@macro-exten-vm:9] Macro(“DAHDI/3-1”, “dial||tr|8000”) in new stack
– Executing [s@macro-dial:1] GotoIf(“DAHDI/3-1”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [s@macro-dial:3] AGI(“DAHDI/3-1”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘unknown’ number is 'unknown’
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 8000 to extension map
– dialparties.agi: Extension 8000 cf is disabled
– dialparties.agi: Extension 8000 do not disturb is disabled
dialparties.agi: ExtensionState: 0
dialparties.agi: Extension 8000 has ExtensionState: 0
– dialparties.agi: Checking CW and CFB status for extension 8000
– dialparties.agi: DbDel CALLTRACE/8000 - Caller ID is not defined
– dialparties.agi: Filtered ARG3: 8000
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [s@macro-dial:7] Dial(“DAHDI/3-1”, “SIP/8000||tr”) in new stack
– Called 8000
– SIP/8000-0000000c is ringing
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘DAHDI/3-1’ in macro ‘dial’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘DAHDI/3-1’ in macro ‘exten-vm’
== Spawn extension (from-did-direct, 8000, 1) exited non-zero on ‘DAHDI/3-1’
– Executing [h@macro-dial:1] Macro(“DAHDI/3-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/3-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“DAHDI/3-1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“DAHDI/3-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“DAHDI/3-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘DAHDI/3-1’ in macro ‘hangupcall’
== Spawn extension (macro-dial, h, 1) exited non-zero on ‘DAHDI/3-1’
– Hungup 'DAHDI/3-1’
localhost*CLI>

We want when someone from PSTN or Mobile Phone make call to us, IP Phone display number

Our question:
How to solve Caller ID unknown problem?

Please advice us

Thanks For Your Attention

Hi,

You should probably contact Xorcom, since you’re using their equipment to connect to the PSTN.

Cheers.