### Description This issue has already been reported in the past both on GitHub ( Issue #2659 ) and on the [mailing list](https://lists.kamailio.org/pipermail/sr-users/2022-April/114620.html). We are experiencing some issues with UPDATE messages being sent by the PSTN after an early media announcement. To reproduce the issue we can call a specific number that has an early media announcement, since it's a paid phone number it has to announce how much it would cost before picking up the call. In this initial part the call is being negotiated in g711a. As soon as the announcement ends, the PSTN sends an UPDATE message containing the new desired codec (g729) for the actual call. Kamailio doesn't route the UPDATE message to the destination and it instead replies with a 404 message.
If topos is disabled the update message gets routed correctly.
#### SIP Traffic
I've attached a pcap with anonymized IPs to make it harder for bots. Here is a legend for the IPs:
- 12.34.123.123 is Kamailio - 62.23.19.74 is the PSTN - 1.2.130.40 is the client making the call
[errorupdate_anon.zip](https://github.com/kamailio/kamailio/files/8522365/errorupdate_anon.zip)
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` version: kamailio 5.5.4 (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_BLOCKLIST, 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 10.2.1 ```
* **Operating System**:
``` Linux 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux ```
@miconda don't know if it helps but I tried backporting [ceb688b](https://github.com/kamailio/kamailio/commit/ceb688b3d364bb7b8d9f52b7238d560c...) to 5.5 and now the UPDATE message is being processed by topos but it's being sent back to the PSTN instead of the caller.
@miconda after [c309122](https://github.com/kamailio/kamailio/commit/c309122864eaa2bfa58253290bed4908...) it looks like everything is working as intended now. Thank you for the quick fix. As I mentioned before we have tested it by backporting the change on 5.5.4. We'll be testing these changes in the next days so we can avoid unexpected problems and we'll update this issue accordingly.
I can confirm that the patches work perfectly. Regarding the backport to version 5.5.4, how would it work if in production we are using the official kamailio debian repository?
@LookedPath thanks for the confirmation. The stable branch backports will be available in the next minor releases in the respective branches. If you need it faster, you could use the nightly packages after it has been backported.
@henningw @miconda I can confirm the also for the situation described in mailinglist "TOPOS, 183 (before a 200OK) and SIP INFO" this patch works fine!
Since the patches seem to fix the problem, should we close this issue or should we wait for the backport?
Backported to 5.5.
Closed #3090.
Hi guys,
I followed this issue particularly closely because I also encountered the same problem: In the same situation as described by @LookedPath if I have topos enabled, the UPDATE following a 183 receives a 404.
I use the deb download on official repository `deb http://deb.kamailio.org/kamailio55 focal main` --> doesn't work `deb http://deb.kamailio.org/kamailio56 focal main` --> doesn't work `deb http://deb.kamailio.org/kamailio56-nightly focal main` --> it works
@henningw is it because the kamailio55 and kamailio56 deb package have not yet been recreated or am I mistaken? thanks
@tommasinigiovanni Are you using the daily 5.5.x/5.6.x or the latest release package? If the latter, you need to wait for the next release. I think 5.6.1 will be done middle of next week.
@henningw I import this repository `deb http://deb.kamailio.org/kamailio55 focal main` and then I install `kamailio=5.5.4+ubuntu20.04`. This is what you mean "latest release package" or "daily 5.5.x/5.6.x"?
his is the release package repository. Here you need to wait a bit until the next minor release is released for this branch. There is talso a daily package repository on deb.kamailio.org if you do not like to wait.