[sr-dev] [kamailio/kamailio] UAC Module replaces Contact Header so Replies not Relayed Back (#2504)

ForGuru notifications at github.com
Sun Oct 11 19:49:03 CEST 2020


### Description

<!--
DID Trunk ----> Kamailio (UAC) ---> Asterisk 

Call comes from DID Trunk and UAC module is used as per some fixed mapping in DB so we use that user to make call Asterisk through UAC as shown below.
```
$var(original_ru) = $rU;
if (uac_reg_request_to("$avp(auser)", 1)) {

			$var(status) = uac_reg_status("$rU"); 
			$rU = $var(original_ru) ;
t_on_failure("REMOTE_AUTH");
}


failure_route[REMOTE_AUTH] {
    if (t_check_status("401|407")) {
	    xlogl("L_INFO", " Remote asked for authentication");
    	t_drop_replies();
		# - remove preloaded route headers
		remove_hf("Route");		
		record_route();
		$avp(authed) = 1;
		
		# Drop replies so that they are not sent back to the UAC
		uac_auth();
		route(RELAY);
    }
}
```
in all this activity Contact Header also replaced by UAC_AUTH so Replies from Asterisk reaches to Kamailio but does not relay back to DID Trunk.
-->

### Troubleshooting

#### Reproduction

<!--
If the issue can be reproduced, describe how it can be done.
-->

#### Debugging Data

<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.

  gdb /path/to/kamailio /path/to/corefile
  bt full
  info locals
  list

If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->

```
(paste your debugging data here)
```

#### Log Messages

<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
(paste your log messages here)
```

#### SIP Traffic

<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
(paste your sip traffic here)
```

### Possible Solutions

<!--
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`

```
(paste your output here)
```

* **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`)
-->

```
(paste your output here)
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2504
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201011/bb076ddb/attachment.htm>


More information about the sr-dev mailing list