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

[FEATURE] b2b_bridge_retry() brakes SIP headers #3517

Open
denyspozniak opened this issue Nov 15, 2024 · 0 comments
Open

[FEATURE] b2b_bridge_retry() brakes SIP headers #3517

denyspozniak opened this issue Nov 15, 2024 · 0 comments

Comments

@denyspozniak
Copy link

Hello!

In the example below, when doing serial call forking b2b_bridge_retry() brakes SIP header in B2-leg (sip:102@pbx):

  • To header (from original A-leg)
  • From display (completely missing)
  • Contact (it's not clear where from)

A-leg (sip:[email protected]:50600) --> B1-leg (101@pbx)
                                                            --> B2-leg (102@pbx)

If you need help with reproducing or need logs/pcap traces, I can send privately.

route{
  if ( is_method("INVITE") && !has_totag() ) {
    b2b_client_new("dst1", "sip:101@pbx");
    b2b_server_new("src1");
    b2b_init_request("sbc");
    exit;
  }
}

route[b2b_logic_reply] {
    if ( $rm == "INVITE" && $rs == 403 ) {
        b2b_client_new("dst2", "sip:102@pbx");
        b2b_bridge_retry("dst2");
    }
}

SIP INVITE

---INCOMING A-leg:
INVITE sip:[email protected]:50600 SIP/2.0
Via: SIP/2.0/UDP 172.28.128.1:5060;branch=z9hG4bK80d7e96fc5a1ef11bf692e066dce02e3;rport
From: "PhonerLite" <sip:[email protected]>;tag=3364579678
To: <sip:[email protected]:50600>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, INFO, MESSAGE, NOTIFY, OPTIONS, REFER, UPDATE, PRACK
Max-Forwards: 70
Supported: replaces, from-change, 100rel
User-Agent: PhonerLite/3.26
P-Preferred-Identity: <sip:[email protected]>
Content-Length:   373

---OUTGOING B1-leg:
INVITE sip:101@pbx SIP/2.0
Via: SIP/2.0/UDP 192.168.56.181:5060;branch=z9hG4bK04c.b2dad6b6.0
To: <sip:101@pbx>
From: "PhonerLite" <sip:[email protected]>;tag=6ac03514de7b804f3828ecc535d25839-a3a5
CSeq: 2 INVITE
Call-ID: .201.7518725.1731678282.1420985851
Max-Forwards: 69
Content-Length: 373
User-Agent: OpenSIPS (3.5.2 (x86_64/linux))
Content-Type: application/sdp
Supported: replaces, from-change, 100rel
Allow: INVITE, ACK, BYE, CANCEL, INFO, MESSAGE, NOTIFY, OPTIONS, REFER, UPDATE, PRACK
X-CallID: [email protected]
Contact: <sip:[email protected]>

---OUTGOING B2-leg:
INVITE sip:102@pbx SIP/2.0
Via: SIP/2.0/UDP 192.168.56.181:5060;branch=z9hG4bK1029.925e8a76.0
To: <sip:[email protected]:50600>
From: <sip:[email protected]>;tag=36d52ec24f434cecf68e6c41b2db31a9-a3a5
CSeq: 2 INVITE
Call-ID: .64.1873052.1731678284.1474255093
Max-Forwards: 69
Content-Length: 373
User-Agent: OpenSIPS (3.5.2 (x86_64/linux))
Content-Type: application/sdp
Supported: replaces, from-change, 100rel
Allow: INVITE, ACK, BYE, CANCEL, INFO, MESSAGE, NOTIFY, OPTIONS, REFER, UPDATE, PRACK
X-CallID: [email protected]
Contact: <sip:[email protected]>

opensips -V

version: opensips 3.5.2 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, 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: 8a183b0c0
main.c compiled on  with gcc 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant