I set up an asterisk 13 instance to route internal calls via PJSIP.
Clients are various telephone systems which authenticate with alphanumerical usernames (like sip981232).
This works well for connections with a single number. As soon as I need DID to be taken into account for routing the call, I am lacking the required information (only username is shown in Request-URI and To).
How can I set (replace) the destination number in TO-Header?
The username is not needed at the other side and most systems use the To-Header to match DIDs.
I did not find a way to modify this header when using PJSIP.
My last try was “Set(PJSIP_HEADER(update,To)=email@example.com)” which did not change the header.