In a quick and dirty test between two Asterisk instances, I changed the above setting to:
[whatever]
type=aor
contact=sip:foobar.lan:5064
Still, To: field didn’t include any reference to port number (5064 in the present test).
To better understand the issue I’m dealing with, this question arose when trunking with an Oracle SBC. Calls are passing in and out but provider says I don’t conform to its rules.
My feeling is his reading of its own rules is incorrect as this port number should be present in other headers (from, …) but not on this specific To field.
I asked Kamailio community for an opinion on this and I’m about to do the same on PJSIP mailing list.