Skip to content

Commit

Permalink
menu: fix 302 Moved Temporarily redirect call
Browse files Browse the repository at this point in the history
The UA_EVENT_CALL_REDIRECT event contains the status code and Contact
URI with comma separated. E.g.: 302,sip:10.10.0.5
  • Loading branch information
cspiel1 committed Nov 11, 2024
1 parent c03590b commit 7d8f0af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/menu/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,10 +905,14 @@ static void event_handler(enum ua_event ev, struct bevent *event, void *arg)
break;

case UA_EVENT_CALL_REDIRECT:
uri = strchr(prm, ',') + 1;
uri = strchr(prm, ',');
if (!uri)
break;

++uri;
if (account_sip_autoredirect(ua_account(ua))) {
info("menu: redirecting call to %s\n", uri);
menu_invite(prm);
menu_invite(uri);
}
else {
info("menu: redirect call to %s\n", uri);
Expand Down

0 comments on commit 7d8f0af

Please sign in to comment.