<!-- Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment). -->
### Description When called from within an event_route[tm:branch-failure:id], rtpengine_manage() will do an offer instead of a delete, resulting in duplicated sdp lines in body. Is this an omission or is it intentional? <!-- Explain what you did, what you expected to happen, and what actually happened. -->
### Troubleshooting
#### Reproduction ``` event_route[tm:branch-failure:DISPATCH_PROVIDER_FAILOVER] {
rtpengine_manage("trust-address replace-origin replace-session-connection");
# next DST - only for 5xx or local timeout if ( t_check_status("5[[:digit:]]+") || (t_branch_timeout() && !t_branch_replied()) ) { if ( ds_next_dst() ) { xlog("L_NOTICE", "--- SCRIPT_DISPATCH_PROVIDER_FAILOVER: A failover destination was selected: Forwarding to $du\n"); t_on_branch("PROVIDER_BRANCH"); t_on_branch_failure("DISPATCH_PROVIDER_FAILOVER"); t_on_failure("NEXT_PROVIDER"); route(RELAY); exit; } else { xlog("L_NOTICE", "--- DISPATCH_PROVIDER_FAILOVER: PROVIDER DOWN! Failed to route request to provider! Giving Up. Negative response will be sent upstream.\n"); } } } ``` <!-- If the issue can be reproduced, describe how it can be done. --> ### Possible Solutions Explicitly use rtpengine_delete() instead. <!-- If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix. -->
### Additional Information
* **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.3.2 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled with gcc 8.3.0 ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `uname -a`) -->
``` Debian 10.3 Linux #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
```
Inside branch failure event route, the transaction is not completely in failure cause, so you should use rtpengine_delete() with via option. Making rtpengine_manage() do delete inside it for branch failure event route will kill the entire session associated with the transaction.
I can add a condition in the code to skip doing anything in branch failure event route, but if you need to do more fine control of the branches, then switch to using rtpengine offer/answer/delete variants.
Patches pushed to master branch, to be backported soon. If still an issue, reopen.
Closed #2222.
Right. I'm guessing the via-branch parameter is only necessary for parallel forking, right? In my case, I do serial forking only so offer is run for every branch and then a delete is run for every failure...