P-Asserted-Identity on Call Forward problem

dear community,

i have a problem with “canceled calls”.

first, my settings:
my trunk settings:
host=10.90.1.100
username=***
secret=****
type=peer
qualify=yes
nat=yes
insecure=very
fromuser=***
fromdomain=10.90.1.100
tmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=yes
authuser=***
allow=ulaw
port=5060
trustrpid=yes
sendrpid=pai

Outbound CallerID: 0123456789
CID Options: Block Foreign CIDs

if i redirect my extensions (with *72), all working fine.
BUT: if i call now my extension from external (e.g. 0111111), the call will be correct forwarded to the recipient number.
but there i can only see the caller id 0123456789, not the 0111111. that is correct, because i have set the CID options: Block Foreign CIDs.

so my sip headers:

From <sip:[email protected]>;tag=as0bfe64e3
P-Asserted-Identity "+49123456789" <sip:[email protected]> 

so now, if i change the CID Options to Allow Any CID and Outbound CallerID = [empty],
the headers are correct:

From <sip:[email protected]>;tag=as0bfe64e3
P-Asserted-Identity "+49111111" <sip:[email protected]> 

but my provider does not accept this. for this call, the header must be like this:

From <sip:[email protected]>;tag=as0bfe64e3
P-Asserted-Identity "+49123456789" <sip:[email protected]> 

means; i must use the main number from the customer (or maintrunk). a valid provider-wide number.

how i can fix that, that in P-Asserted-Identity is always my mainnumber +49123456789?

can anybody helps me?

thanks, many greets

I just had to do this myself, so here is how:
Delete:

trustrpid=yes
sendrpid=pai

Add at appropriate place in dialplan:

exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=1234567890)
exten => _1NXXNXXXXXX,n,SipAddHeader(P-Asserted-Identity: sip:${CALLERIDNUM})