Hello,
We are configuring a SIP trunk with one of our providers and we receive an Invite message which looks like this:
INVITE sip:username@XX.XX.XX.XX:5060;transport=tcp;transport=udp SIP/2.0
Record-Route: <sip:YY.YY.YY.YY;r2=on;lr;ftag=eeKUyK767Q15j>
Record-Route: <sip:YY.YY.YY.YY;transport=tcp;r2=on;lr;ftag=eeKUyK767Q15j>
Via: SIP/2.0/UDP YY.YY.YY.YY;branch=z9hG4bK356e.5c8738b3173a8c5eff09817f152b0938.0;i=faf634
Via: SIP/2.0/TCP 192.168.42.142;branch=z9hG4bK3301Fr3pB7mXS
Max-Forwards: 53
From: "0055555555" <sip:+555555555@sip.deanconnect.nl>;tag=eeKUyK767Q15j
To: <sip:+123456@sip.deanconnect.nl>
The problem is, that INVITE message comes with USERNAME@IP format and we are unable to create translation patterns based on it. So, for example, if we have 5 phone numbers in our SIP trunk, all of them are coming with USERNAME@IP INVITE message
Correct recipient number in our case is located in the FROM field.
How can we create translation rules to use FROM field instead of INVITE?
For now, we use this to modify INVITE message, but obviously, this works only for 1 number, and we need to differentiate between 5 numbers
voice class sip-profiles 111
request INVITE sip-header SIP-Req-URI modify "sip:username" "sip:123456"
request CANCEL sip-header SIP-Req-URI modify "sip:username" "sip:123456"