Cisco(U1) --> Opensips(P1) --> Internet --> Kamailio(P2) --> Asterisk(U2)
The remote proxy(P2) is expecting us to fill the "Route:" header taking information from the "Contact:" header, according to my research the "Route:" header as to be filled using the information found in the last "Record-route:" header.
Note that the "Contact:" header IP address is the one of U2, as it is the destination UA.
I think our partner using Kalamailio only interconnected UA not Proxy, since they never faced this problem.
Of course I do not suspect Kalamailio to be doing something wrong, I just want to validate what we should expect, and investigate further from there.
I will have to contact the technicien that as configured the Kalamailio server to validate why face this behavior.
--------------------------------------------------------------------------
" 16.12.1.3 Rewriting Record-Route Header Field Values "
http://www.ietf.org/rfc/rfc3261.txt
--------------------------------------------------------------------------
We found a temporary solution to make it worko, where we hardcoded the replacement of the IP address in the "Route:" header with the one of the U2
subst('/^Route: <sip:P2;(.*)$/Route: <sip:U2;\1/');