Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] rtp_relay doesn't work on bridge_retry() #3116

Open
devoxy1 opened this issue Jun 16, 2023 · 39 comments
Open

[BUG] rtp_relay doesn't work on bridge_retry() #3116

devoxy1 opened this issue Jun 16, 2023 · 39 comments
Assignees
Milestone

Comments

@devoxy1
Copy link

devoxy1 commented Jun 16, 2023

Hello!

I have scenario with b2b module that handles 302 redirects - once received it creates new b2b_client and then does bridge_retry to connect them.
Here is part of my config:

if (!has_totag()) {
        b2b_server_new("caller",,$avp(extra_hdrs),$avp(extra_hdr_bodies));
        b2b_client_new("callee", "$ru",,,,$avp(b2b_hdrs),$avp(b2b_hdr_bodies));

        $rtp_relay = "replace-origin replace-session-connection";
        $rtp_relay_peer = "replace-origin replace-session-connection";
        rtp_relay_engage("rtpengine");
        # initialize B2B session
        b2b_init_request("refer");

        exit;
    }

When INVITE is received i create client and server entities, engage rtp_relay to use rtpengine for both legs and initialize b2b scenario. If i receive 302 Moved Temporary on second leg i create new client entity and then do bridge_retry to connect calls:

route[b2b_logic_reply] {
...
    if ( t_check_status("30[12]") ) {
        b2b_client_new("diversion", $var(redirected_contact),,,, $avp(b2b_hdrs), $avp(b2b_hdr_bodies));
        b2b_bridge_retry("diversion");
    }
}

The call setup works OK, INVITE is sent out, replied and call is connected. The problem is that SDP is not changed on new leg and IP of Caller is passed for media. I also get an error in logs:
rtp_relay_b2b_tm_req: could not find a pending peer leg!

I understand that previous leg doesn't exist anymore and rtp_relay doesn't know anything about new one. Is there a way i can re-engage rtp_relay for new leg? Or i have misconfiguration somewhere?

OpenSIPS version you are running

version: opensips 3.4.0-beta (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, CC_O0, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 18504bc5a
main.c compiled on 08:33:48 Jun 15 2023 with gcc 9

Describe the bug
bridge_retry function doesn't re-engage rtp_relay for new leg.

To Reproduce

Steps to reproduce the behavior:
Example:

  1. Create configuration with b2b_init scenario
  2. Start opensips
  3. A sends INVITE to opensips
  4. opensips creates new leg to B
  5. B accepts the call and sends 302 Moved Temporary
  6. B leg is ended and new leg to C is created with Contact header as URI
  7. call bridge_retry
  8. SDP in INVITE to C contains IP of A instead of rtpengine

Expected behavior
SDP in INVITE to C contains IP of rtpengine

Relevant System Logs

opensips[215873]: INFO:b2b_logic:b2bl_delete_entity: delete tuple [14871.0], entity [14871.1400639.1686926369.762662252]
opensips[215873]: ERROR:rtp_relay:rtp_relay_b2b_tm_req: could not find a pending peer leg!
opensips[215873]: INFO:b2b_logic:b2bl_add_client: adding entity [0x7f6a808cd0d0]->[14871.622994.1686926371.620117705] to tuple [0x7f6a808bff08]->[14871.0]
opensips[215873]: [14871.1400639.1686926369.762662252] [INVITE] [B2B_LOGIC_REPLY] [302, Moved Temporarily] Incoming B2B reply from sip:0011@10.232.35.90, entity: <null>
opensips[215873]: ERROR:b2b_logic:_b2b_handle_reply: No b2b_key match found [14871.1400639.1686926369.762662252], src=1
opensips[215875]: INFO:b2b_logic:b2b_add_dlginfo: Dialog pair: [d32121f4-45ee-468d-abbf-1b2867121ec9] - [14871.622994.1686926371.620117705]

OS/environment information

  • Operating System: Ubuntu 20.04.5 LTS
  • OpenSIPS installation: source
  • other relevant information:

Additional context

Thank you!

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jul 16, 2023
@devoxy1
Copy link
Author

devoxy1 commented Jul 28, 2023

up

@stale stale bot removed the stale label Jul 28, 2023
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Aug 13, 2023
@devoxy1
Copy link
Author

devoxy1 commented Aug 15, 2023

UP

@github-actions github-actions bot removed the stale label Aug 15, 2023
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Aug 31, 2023
@devoxy1
Copy link
Author

devoxy1 commented Aug 31, 2023

Still actual

@stale stale bot removed the stale label Aug 31, 2023
@razvancrainea
Copy link
Member

Still planning to look into this, but didn't find the time yet. Thanks for keeping it up, as soon as I have updates, I will get back to you.

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Sep 20, 2023
@devoxy1
Copy link
Author

devoxy1 commented Sep 20, 2023

Up

@stale stale bot removed the stale label Sep 20, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 6, 2023
@devoxy1
Copy link
Author

devoxy1 commented Oct 9, 2023

UP

@stale stale bot removed the stale label Oct 9, 2023
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 25, 2023
@devoxy1
Copy link
Author

devoxy1 commented Oct 25, 2023

Up

@devoxy1
Copy link
Author

devoxy1 commented Feb 8, 2024

Up

@stale stale bot removed the stale label Feb 8, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Feb 24, 2024
@devoxy1
Copy link
Author

devoxy1 commented Feb 26, 2024

Up

@stale stale bot removed the stale label Feb 26, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Mar 13, 2024
@devoxy1
Copy link
Author

devoxy1 commented Mar 26, 2024

Up

@github-actions github-actions bot removed the stale label Apr 22, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 6, 2024

Up. This is still actual. Hope someone can check this up.

Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label May 22, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 22, 2024

Up

@stale stale bot removed the stale label May 22, 2024
Copy link

github-actions bot commented Jun 7, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jun 7, 2024
@devoxy1
Copy link
Author

devoxy1 commented Jun 14, 2024

up

@stale stale bot removed the stale label Jun 14, 2024
Copy link

github-actions bot commented Jul 2, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jul 2, 2024
@devoxy1
Copy link
Author

devoxy1 commented Jul 10, 2024

Up

@stale stale bot removed the stale label Jul 10, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Aug 21, 2024
@devoxy1
Copy link
Author

devoxy1 commented Aug 22, 2024

up

@github-actions github-actions bot removed the stale label Aug 24, 2024
@devoxy1
Copy link
Author

devoxy1 commented Sep 19, 2024

up

Copy link

github-actions bot commented Oct 5, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants