It looks like the common way to to sip signaling over a trunk is:
In the Request URI, return the ‘Register’ Contact. In the To: Header, send the destination number.
Unfortunately, asterisk with pjsip (i did not try chan_sip) does expect the dialed extension as request uri and does ignore what it is getting in the To: header.
I could not find any hint in the documentation of this can be changed.
I found instructions for a work-around:
In the meantime: Is there a way to tell the asterisk with pjsip to use the To: header to address an extension?
I m p r o W a r e A G – Leiter Commerce Kunden