aren't multiple SIP headers of the same type index based? 
Like $sel(via[0].branch) ?


Atenciosamente / Kind Regards / Cordialement / Un saludo,


Sérgio Charrua

www.kahea.aiwww.voip.pt

OpenTelecom - Consulting for Telecoms, Lda
Tel.: +351 91 631 11 44

Email : sergio.charrua@voip.pt

This message and any files or documents attached are strictly confidential or otherwise legally protected. 

It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.

 

 





On Wed, Nov 19, 2025 at 8:14 AM 13715209697--- via sr-users <sr-users@lists.kamailio.org> wrote:
Hi team

How to access all branches in the failure_route?

···
SIP/2.0 480 Temporarily Unavailable
Via: SIP/2.0/UDP 220.231.180.131:12290;branch=z9hG4bK7699.12bab93a2131301bddba965165d7b8a4.0
Via: SIP/2.0/UDP 192.168.99.203:5090;received=192.168.99.203;rport=5090;branch=z9hG4bKeS4Hy8evHZa4N
To: <sip:1001@192.168.99.203:12290>;tag=a8016513
From: <sip:9196@192.168.99.203:12290>;tag=rQSg2p11ptytp
Call-ID: d25b05e3-3fb6-123f-0ba6-000c29943390
···

failure_route[MANAGE_FAILURE] {
    xlog("$sel(via[1].branch) + $T_branch_idx\n"); 
}

The obtained value is z9hG4bKeS4Hy8evHZa4N, which is the branch generated by UAC.

But I also want to obtain the branch automatically generated by Kamailio.

How can I do this?

Thanks!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!