Skip to content
Snippets Groups Projects
Commit 7de89a5a authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #14529: sip: don't overwrite routeset in hangup

This was preventing us from correctly sending BYE requests for hangup.
parent 070871a8
Branches
Tags
No related merge requests found
...@@ -926,10 +926,15 @@ SIPVoIPLink::hangup(const std::string& id) ...@@ -926,10 +926,15 @@ SIPVoIPLink::hangup(const std::string& id)
if (inv == NULL) if (inv == NULL)
throw VoipLinkException("No invite session for this call"); throw VoipLinkException("No invite session for this call");
// Looks for sip routes pjsip_route_hdr *route = inv->dlg->route_set.next;
if (account->hasServiceRoute()) { while (route and route != &inv->dlg->route_set) {
pjsip_route_hdr *route_set = sip_utils::createRouteSetList(account->getServiceRoute(), inv->pool); char buf[1024];
pjsip_dlg_set_route_set(inv->dlg, route_set); int printed = pjsip_hdr_print_on(route, buf, sizeof(buf));
if (printed >= 0) {
buf[printed] = '\0';
DEBUG("Route header %s", buf);
}
route = route->next;
} }
pjsip_tx_data *tdata = NULL; pjsip_tx_data *tdata = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment