INVITE R-URI and use_registered_aor

Yeti Switch is a awesome product and almost everything works on the first try. I have only some issues with Gateways which have “use registered aor” ativated in the Gateway / Signaling / Termination

If I define a Host and Port in the Gateway, a call goes to the termination gateway as:
INVITE sip:+123456789@IP:5060 SIP/2.0

If I put “use registered aor” there, it uses the contact from the register of the clients PBX, eg.
In case of username it also can be something different, depending on what the registered PBX uses.

Problem here is Asterisk or everything asterisk based. Without “use registered aor” the INVITEs are going directly to the called number. With aor, calls are going to the “contact” and the called number is in TO:, Problem here is, that Asterisk cant use the TO Header out of the Box (there are some changes in the dialplan possible to get it up and running)
Is this fixable from our site, checking an option in Yeti Switch or not?
If not, is there a Plan to change that behavour?


Scroll down, there are all quotes from different mailing lists in english mentioning that the Number ONLY in the TO: Header is not conform to RFC.

Could you show exact text from RFC?
Because from out point of view it is not true. R-URI should be same as contact sent in REGISTER request.

If you want to route calls to single number to your asterisk you could just configure it to use number as contact userpart, see contact_userpart at Configuring Outbound Registrations - Asterisk Project - Asterisk Project Wiki

But if you want yeti to rewrite username in R-URI with original DST number when R-URI built from registered Contact - it requires development(and yes, this behavior will violate RFC)