How to pass CallerID from SPA8800 to Asterisk

CISCO SPA8800 for connection to the PSTN telephone network. equipment is being used.

When receiving a call, an incoming number called PSTN Peer appears on the SPA8800 gateway, but Asterisk seems to be connected to the extension of the line registered in the trunk.

Is there a way to recognize the PSTN peer’s CID from the Asterisk server? For example, DisplayName or PSTN Name should be recognized by Asterisk…

I’m looking for a way, but I haven’t found it yet…

please help…

You would need to provide your SIP configuration in use, as well as a SIP trace (if using chan_sip: sip set debug on - if using chan_pjsip: pjsip set logger on), to confirm that it’s actually being sent to Asterisk and how.

configuration file was set according to the following setting instructions provided by Cisco.
→ Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk® Environment

The PSTN Peer on the SPA8800 will properly display numbers from outside.
And Asterisk also shows line-by-line extensions specified in sip.conf.
I want Asterisk to recognize this CID.

There seem to be a lot of terminology issues here. No Asterisk extension are relevant to the caller ID.

It sounds to me as though you have a caller ID set in your sip.conf peer definition for the gateway. You should remove that setting, as it will override all forms of caller ID from the gateway.

Hopefully the gateways is using the From user name for the caller ID, in which case removing the caller ID override is sufficient. If not, you will need to see if it is sending the caller ID in Remote-Party-ID, or P-Asserted-Identity headers, in which case trustrpid=yes, should give you the caller ID.

If it is using any other means of sending caller ID, precise details will be needed.

From the bottom of page 186 in it looks like it might use Remote-Party-ID rather than From, as the default, but it isn’t very clear, on a quick reading, that this applies to FXO originated calls, rather than SIP originated ones.

Assuming it does apply in the FXO to SIP direction, you should either change this to no, ore set trustrpid on the Asterisk side.

I will refer to it and proceed with the setting, thank you.


When I use my mobile phone, the SPA8800 succeeds in recognizing the asterisk, and the call is also established.

However, I tried to send my mobile phone number to asterisk, but it failed.

My English is not good, so the direction I want is as follows.

Case 1. Is there a way to set the PSTN peer number to the VoIP display number as shown in the picture below?

Case 2. If #1 is not possible, is there a way to set the PSTN peer number as the PSTN CID prefix?

Other than that, I would really appreciate it if you could tell me how asterisk can get the PSTN peer number.

have a good day.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.