### Description
We have faced an issue which appears when TOPOH module is enabled, call is made from WebRTC client, then transferred by callee.
#### Scenario
WebRTC client behind load balancer makes call to softphone, call from softphone is transferred to external number using Asterisk.
#### Expected result
When call is hanged up on external number side, call should be hanged up on WebRTC client side.
#### Actual result
When call is hanged up on external number side, call is not hanged up on WebRTC client side.
### Troubleshooting
#### Legend
10.5.0.145 - load balancer
10.128.150.67 - WebRTC client
10.181.0.1 - kamailio
10.5.2.192 - asterisk
#### Log Messages
On transfer:
https://pastebin.com/H3FQ4Kpj
On hangup from external number side:
https://pastebin.com/wgfRzGbd
On hangup from WebRTC client side:
https://pastebin.com/sE0yhBae
#### SIP Traffic
Faulty case with TOPOH module enabled:
[topoh_on.csv](https://github.com/kamailio/kamailio/files/11028205/topoh_on.…
Normal behavior with TOPOH module disabled:
[topoh_off.csv](https://github.com/kamailio/kamailio/files/11028206/topoh_of…
#### Config files
kamailio.cfg:
[kamailio.txt](https://github.com/kamailio/kamailio/files/11028283/kamailio.…
kamailio-local.cfg enabled toggles:
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_DISPATCHER
#!define WITH_HOMER
#!define WITH_PSTN
#!define WITH_TOPOH
#!define WITH_CUSTOM_HEADERS
#!define WITH_PROM
#!define WITH_DMQ
#!define WITH_NAT
#!define WITH_XXXX_HEADERS
#!define WITH_TLS
#!define WITH_WEBSOCKET
#!define WITH_VOIP_AUTH
#!define WITH_ADVERTISE
#!define WITH_JSONRPC
#!define WITH_TCP
#!define WITH_DIALOG
#!define WITH_DIFF_PROVIDER_SRC_IP
#!define WITH_UAC
#!define WITH_DEV
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.1 (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 on 09:11:15 Nov 15 2022 with gcc 9.3.0
```
* **Operating System**:
```
dockerized kamailio running on Ubuntu 16.04.3 LTS
Docker version 18.03.1-ce, build 9ee9f40
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3398
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3398(a)github.com>
Hi Kamailio,
We have noticed that a request not belonging to a dialog (e.g. a SIP MESSAGE) missing the tag= parameter in the from: header will trigger an ERROR: message like.
````
Mar 21 14:40:23 ip-10-85-164-143 /usr/sbin/kamailio[172]: ERROR: dialog [dlg_handlers.c:726]: pre_match_parse(): failed to get From header
````
````
Mar 21 14:42:31 ip-10-85-165-13 /usr/sbin/kamailio[183]: ERROR: tmx [tmx_pretran.c:227]: tmx_check_pretran(): failed to get From header
````
According to our interpretation of 3261 section 12.1.1
````
"A UAS MUST be prepared to receive a
request without a tag in the From field, in which case the tag is
considered to have a value of null."
````
this should not be the case. Also the BNF states no from: tag: is mandatory
```
From = ( "From" / "f" ) HCOLON from-spec
from-spec = ( name-addr / addr-spec )
*( SEMI from-param )
from-param = tag-param / generic-param
tag-param = "tag" EQUAL token
```
We believe this to be implemented in at least two places where one example is in the `dlg_handler` where `pre_match_parse` check
```
if (parse_from_header(req) < 0 || get_from(req)->tag_value.len == 0) {
LM_ERR("failed to get From header\n");
return -1;
}
```
As our interpretation of the standard is that the from: tag is not mandatory, hence we can't require our customer to change their behaviour, we consider this as a bug.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3399
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3399(a)github.com>