Page tree
Skip to end of metadata
Go to start of metadata

If you are missing your Caller ID on inbound calls follow the steps below to diagnose and resolve:

 *Note: Sangoma cards do not have any affect on caller ID.  Sangoma cards simply pass the information along, as received.  The steps below help you diagnose what software/hardware (around the Sangoma card/driver) is causing the issue.

Take a line trace to check for caller ID

 The first step to identify missing caller ID is take a line trace for an inbound call (which will contain the caller id). 

If you do not see your Caller ID in the captured trace, this means you need to contact your telco to have them resolve your issue since they are not allowing caller ID to be sent to you. 
If you DO see caller ID in the trace, then proceed to see why your caller ID is not being transferred to Asterisk or your SIP side.

To take a line trace, simply use the utility called wanpipemon that comes with the Sangoma driver for your card:

  1. Enter the following command in your Linux command line, which will start a line trace

    -> wanpipemon -i w1g1 -pcap -pcap_file isdn.pcap -prot ISDN -full -systime -c trd

    -> w1g1 above represents port 1 on your Sangoma card.  If your inbound call will come in on a different port, change w1g1 to wXg1 (replace X with the correct port number.  (the linux command ifconfig will show you all the wXg1 interfaces, where X represents the port number)
    -> The trace will save a file called isdn.pcap in the local directory that the trace was taken. 

  2. When you press <enter> the line trace will begin, which will look similar to the following output:

  3. Make an inbound call to reproduce the issue 
  4. Once you have made the inbound call where caller ID is missing, press <enter> to end the line trace 
  5. Open the isdn.pcap file in wireshark to analyze if caller ID was received by the telco 


Analyzing the line trace using Wireshark

Now that you have captures a pcap trace from the steps above, it is time to analyze them in wireshark.

-> If your pcap trace does not open up properly in wireshark, verify that the trace is not 0 bytes.  If the trace is empty, that means you have taken the trace on the wrong interface  (i.e. w1g1 instead of w2g1) 

 Below is an example of a wireshark trace for an inbound call:

Notice how the screen is divided into two panes.  The top portion will show you Q931 messages (i.e. SETUP, CONNECT, DISCONNECT). 
When clicking on each one, the bottom pane describes the details of each message.

Notice the source and destination Columns.  This tells you where the call originated from and is being sent to, respectively.  If source = ‘Local User’ this means your server initiated the message(i.e the call, if the message is SETUP).  If source = ‘Remote Network’ this means the telco initiated the message (i.e. the call, if the message is SETUP).  Use the same analogy to analyze the destination

Click on the SETUP message, then expand the bottom portion where it says 'Q.931.  
Caller ID comes in the SETUP message. 

Below is a sample of a trace that displays the Caller ID present on the line. If your trace does not show a phone number is the same area as the trace below, contact your telco to resolve your missing caller ID issue.


Verify your Configuration

If caller ID was present in the line trace above, the next step is to verify that the configuration in the DAHDI signalling layer is correct.

Using an editor of your choice, open up the file:
-> /etc/asterisk/chan_dahdi.conf

Verify that you have callerID enabled by verifying you see the following:


If the above is set to 'no' simply edit the line, save, then restart asterisk. This should resolve the caller ID issue.

* If your issue is that you are missing the leading 0, you should add the prefix in your asterisk dial plan.

The next step is to print the caller ID that asterisk sees when the call is receiving.
For this step, we want to use the asterisk noOp() application that will print the caller ID received. 

Edit your asterisk dial plan, and add the following line, directly below the answer  line. 
For example:

exten => _X.,1, answer
exten => _X.,,1,NoOp(Caller-ID: ${CALLERID(num)})


Now log into the asterisk CLI and make a test inbound call to see what is printed for the inbound caller ID
(In your Linux CLI type 'asterisk -rvvvv' to log into the asterisk CLI)

Do you see the correct caller ID beside 'Caller-ID:' ?
If you do, then the missing caller ID issue is occurring on the SIP Side of your network. 
Take a wireshark trace on the SIP side by using tcpdump command on your Linux command line.  If the tcpdump is missing the caller ID (while present using the noop() command, then the caller ID is being removed by Asterisk (for some reason). If the caller ID is present in the tcpdump, but missing on your SIP phone, then the cause of your caller ID issue is due to sip network/sip phone.

->Run the following command in your Linux command line to take a wireshark trace:

-> tcpdump -ni eth0 -s 0 -w testcall.pcap


The above line will take a sip wireshark trace on eth0 and save a file called 'testcall.pcap' in the local directory
(If your calls use another interface other than eth0, replace eth0 with that interface)

-> Press <enter> to start the trace, and CTRL + c to stop the trace.

-> Open the trace with wireshark and click on the INVITE message and investigate if you see caller ID  


For all caller ID issues, you should consult the asterisk forums on the internet to help resolve your issue.
Caller ID issue are typically caused by DAHDI signalling layer misconfiguration. Sangoma support may not be able to help you beyond providing feedback on taking a wireshark trace using the wanpipemon utility.

  • No labels