Get P-Asserted-Identity

Hi i need to get P-Asserted-Identity from incoming calls and put into a mysql db can anyone help me?

Use CALLERID dial plan function and System() … nformation

Assuming that Remote-Party-ID is not also being sent, and you are not using From for caller ID, set “trustrpid = yes” and then put the value of ${(CALLERID(num)} in your database. If this conflicts with other users of headers, you will need to use the SIP_HEADER function and parse out the relevant data.

Hi thk’s for your reply but i’m new of asterisk, can anyone give me some example and where i need to use that directive in extension.conf and i can manage also mysql db from extension.conf.

You were asking about Get P-Asserted-Identity, at some point I was expecting at least basic knowledge of Asterisk from you.

Hello i read a lot of asterisk documetation but there isn’t more regard P-Asserted-Identity and where a need to modify for log it.
I see that cdr log caid but i need to log P-Asserted-Identity can anyone help me?
Best regards.

Use grep on the sample configuration.