RPID in 1.2 sip_chan.c


I’ve seen that there is support for RPIDs in sip_chan.c of * 1.2 but there doesn’t seem to be a way of controlling if privacy=full or off from outside that file.

I’d like to know where the variable p->callingpres comes from and where it is set.

I’d like to code an application that sets a call to private or not (from disa or from DIAL) or at least be controlled by a variable in sip.conf like restrictcid=yes.

Anybody has a clue about where I should start or a way to implement it ?