[asterisk-dev] using the Callerid(ANI) value to send two different callerid numbers over sip

Stefan Schmidt sst at sil.at
Mon Jan 16 06:43:19 CST 2012


hello list,

for incoming calls asterisk allready supports setting the network
provided number to the ani value of the callerid struct and the user
provided (mostly not screened) value to the normal callerid value of the
struct. IMHO outgoing is not support so far.

My question is if there is a "common" rule so it would make sense to
write a patch to support two different caller id values. This feature in
the pstn world is called clip no screening where a caller could sent two
callerid values. A network provided and passed screening number and also
a user provided not screened number.

My idea would be patching the add_rpid function to not only use the
callerid.number and name field but to also check if there is a different
ani number set and if yes use this instead.

so it would be easy to enable this clip no screening like this:

n,Set(CALLERID(number)=123456789)
n,Set(CALLERID(ani)=987654321)

the outgoing sip message then could look like this:

From: <sip:123456789 at xyz.com>
P-Asserted-Identity: <sip:987654321 at xyz.com>
or with rpid instead of PAI
Remote-Party-ID: <sip:987654321 at xyz.com>

Does anyone know how this is handled by common sip providers when they
use PAI or RPID for outgoing callerids?

whats the opinion of the community of using the ani value for the PAI or
RPID value, instead of the number value, if ani is set?

best regards

Stefan



More information about the asterisk-dev mailing list