Hello all,
I'm trying to figure out one problem on my Kamailio server.
When kamailio receive a reinvite from the infra, I get the error message "477 - Unforunately error on sending to next hop" and the call drop. I don't understand why this message appears as the first invite is well answered and the call is going well.
Any ideas how to resolve this issue ?
Thanks in advance for your help. Regards, Nathan
On 4 Jan 2023, at 14:28, nathan.castillo@snapcom.fr wrote:
Hello all,
I'm trying to figure out one problem on my Kamailio server.
When kamailio receive a reinvite from the infra, I get the error message "477 - Unforunately error on sending to next hop" and the call drop. I don't understand why this message appears as the first invite is well answered and the call is going well.
The first invite and a reinvite is routed different ways. The re-invite is in dialog and thus follows the record route and the contact address.
Any ideas how to resolve this issue ?
Read the headers and figure it out :-)
Cheers, /O
Hello,
as mentioned, analyse the sip traces, the re-INVITE in particular regarding Route header etc..
Cheers,
Henning
Hello all,
Thank you for your all your answers
I checked the headers and I 've seen several things:
1/ In the Invite I see : sip:test@KAMAILIO_SERVER_IP
In the reinvite i see: sip:remote_endpoint via Kamailio IP address
2/ In the call flow everything is going well until the ack. At the beginning of the reinvite, the route is well known The caller send the ack to Kamailio but Kamailio is unable to forward it to the remote endpoint. Checking the headers, I see that in the ACK, the route is not present anymore. Is it possible to force the route in Kamailio directly ?
I have the call flow but I cannot send image here. Regards, Nathan
Hello,
On 05.01.23 10:16, Nathan C wrote:
Hello all,
Thank you for your all your answers
I checked the headers and I 've seen several things:
1/ In the Invite I see : sip:test@KAMAILIO_SERVER_IP
In the reinvite i see: sip:remote_endpoint via Kamailio IP address
2/ In the call flow everything is going well until the ack. At the beginning of the reinvite, the route is well known The caller send the ack to Kamailio but Kamailio is unable to forward it to the remote endpoint. Checking the headers, I see that in the ACK, the route is not present anymore. Is it possible to force the route in Kamailio directly ?
I have the call flow but I cannot send image here.
although it should not be done according to the specs, maybe the end point implementation refreshes the record-route set with the re-INVITE. Try by adding record_route() when processing the re-INVITE (inside the route[WITHINDLG] if you use the structure of the default kamailio.cfg). See if it helps.
Cheers, Daniel
Hello Daniel,
Thank you for the information.
It works well. If it can help someone, I added in route[WITHINDLG]:
if (is_method("INVITE")) { record_route(); }
Thank you all for your help. Regards, Nathan
Nathan,
It is only valid to add a Record-Route header to an initial INVITE (NOT within a dialog), because it tells both parties to the dialog where to send in-dialog requests (e.g. re-invites, BYE, e2e ACK) -- the kind handled in route[WITHINDLG}.
So, this is quite radiantly wrong, though it should not have nullary effect as the RR will be ignored by the counterparty.
-- Alex