**Description**
We use below config to test the topology hiding function,when kamailio receive “update” message,doesn't send out,it will send to itself with destination port 5060;
Sorry for raising this question again,I really don’t know what parameters need to be configured。And after I modified some codes, it could succeed probabilistically...
Sorry again, excuse me
**Troubleshooting**
```
loadmodule "ndb_redis.so"
loadmodule "topos_redis.so"
loadmodule "topos.so"
modparam("ndb_redis", "server", "name=srv8;addr=127.0.0.1;port=6381;db=2")
modparam("topos", "storage", "redis")
modparam("topos", "db_url", "redis://127.0.0.1:6381/2")
modparam("topos_redis", "serverid", "srv8")
...Omit the configuration in the middle...
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
xlog("L_INFO","yang yangyang testin to not here");
if (loose_route()){
if(is_method("INFO")){
route("INFO_SELF");
}
route(BYE);
route(REINVITE);
route(ACK);
route(RELAY);
} else {
if ( is_method("ACK")) {
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 $var(obj) = $sht(call_objects=>$ci);
xlog("L_INFO","Call $ci: ACK received in A-Leg, $fU@$si:$sp -----> $rU@$Ri:$Rp relaying downstreamrouteWITHINDLG\n");
t_relay();
exit;
} else {
exit;
}
}
xlog("L_INFO","yang in to not here");
sl_send_reply("404","Not here");
}
exit;
}
}
```
--------
Call flow
```
UE-----------------PROXY-------------B2bua
invite-------------->|------------------>invite
183<----------------|<------------------183
Prack------------ ->|------------------>Prack
200ok<-------------|<-----------------200ok
update1---------->|
|update2<-----------|
| 404 not here-------> |
````
**Additional Information**
```
version: kamailio master (x86_64/linux)
```
### Possible Solutions
I set the log level to debug, and the comparison found that the logic of prack and update is different。After checking the code of topos, it is found that kamailio/src/modules/topos/tps_msg.c has a separate processing for prack.according to
commit [37830f5](https://github.com/kamailio/kamailio/commit/37830f53b1f21fba5beef5…
So I added update to the prack processing method,Later I found that when the B-side update message comes, it should follow the original logic。
So I distinguish whether to follow the modified logic according to ONREPLY_ROUTE。
But after probabilistic success,The problem is that the value returned by get_route_type() is sometimes 1 and sometimes 4
Call flow after modification:
```
UE-----------------PROXY-------------B2bua
invite-------------->|------------------>invite
183<----------------|<------------------183
Prack------------ ->|------------------>Prack
200ok<-------------|<-----------------200ok
update1---------->|----------------->|update
200ok<-------------|<-----------------200ok
|<-----------------|update2
| 404 not here---------> |
````
Here is the code I modified:
/src/modules/topos/tps_msg.c

--
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/2659
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ x] Commit message has the format required by CONTRIBUTING guide
- [ x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ x] Each component has a single commit (if not, squash them into one commit)
- [ x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ x] PR should be backported to stable branches
- [ x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This module uses libstirshaken to implement STIR-Shaken authentication and verification functions (STI-AS/VS).
It allows for easy verification of a SIP call containing PASSporT wrapped into SIP Identity Header using a specific certificate,
or a specific key, or by performing complete check on PASSporT including downloading certificate referenced in it's x5u header,
and optionally checking it against trusted root certificates (X509 cert path check). Certificates may be cached and loaded from disk.
Example usage:
loadmodule "stirshaken"
modparam("stirshaken", "as_default_key", "/path/to/key")
modparam("stirshaken", "vs_verify_x509_cert_path", 1)
modparam("stirshaken", "vs_ca_dir", "/path/to/ca")
modparam("stirshaken", "vs_cache_certificates", 1)
modparam("stirshaken", "vs_cache_dir", "/tmp/cert_cache")
modparam("stirshaken", "vs_cache_expire_s", 90)
request_route {
(...)
stirshaken_add_identity("https://sp.com/sp.pem".pem", "B", "+44100", "+44200", "ref");
(...)
request_route {
(...)
stirshaken_check_identity();
(...)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2678
-- Commit Summary --
* modules: Add stirshaken module
-- File Changes --
A src/modules/stirshaken/Makefile (28)
A src/modules/stirshaken/stirshaken_mod.c (972)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2678.patchhttps://github.com/kamailio/kamailio/pull/2678.diff
--
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/pull/2678