Asterisk Caller ID to another system


Am new in Asterisk Field, one of my target is when any incoming calls comes from PSTN hit our Asterisk server, we need to forward the Caller ID to a system which will be integrated with Asterisk like small Database so from Caller ID we can find all details about this caller ID.

How can i start ?

That is the default behaviour, although, for incoming analogue exchange lines, you may have to request the network to supply it and you will have to set chan_dahdi.conf to specify the way it is being signalled. Outgoing analogue exchange lines cannot signal caller ID, but in any case responsible service providers will only forward numbers if you have previously proved that you control them.

Thanks for your feedback sorry I said PSTN line. no the call is coming on voice gateway which is connected to asterisk using SIP trunk so how can I detect the caller ID and send it to the system that will integrate with asterisk.

If both source and destination channel are capable of signalling caller ID, caller ID will be passed through the Dial application automatically.

Note though that fromname, in sip.conf, will break outbound caller ID signalling, so if you need to use fromname, you should investigate whether the peer supports P-Asserted-Identity or Remote-Party-ID, and set the sendrpid option correctly. If for some reason the upstream peers is using the equivalent of fromname, you should investigate whether trustrpid=yes helps.

Otherwise you are going to need to provide details of your dialplan, your sip.conf, and probably the caller ID parts of the result of core show channel on both party A and part B during a call. The output from sip set debug on with both the incoming and outgoing INVITEs would also be useful.