Hi all,

First of all, I would like to present the system model we are applying:
- dSIPRouter : Sip relay for all users connected from the internet (installed with RTPEngine to handle media data).
- kamailio 5.3.5: core system, registration server.
- Asterisk 17: SBC.
Sorry if our model seems a bit backwards but we have so many users (>12k configured users, > 3k concurrent registered users, > 500 concurrent users at cps 10), I don't know of any solution that can work with such a large load.

With call outbound (from user to PSTN via SBC), everything is fine.
But with internal or inbound calls, it wasn't successful.
I showed that:
- After dSIPRouter, the register message has Path parameter in SIP Header, 
- Kamailio store sip:user@domain in column contact at location table.
- Using modparam registrar with use_path=1, path_mode=0, path_use_received=1, I stored this parameter in DB.
- When calling internal or inbound, for the search destination of a phone, I am using sip_trace() function. But the result is always column contact. 
- With this uri, kamailio wasn't known and sent the invite to proxy.
- Final error message: 404.

I need one of these solutions:
- get path column when result of sip_trace() like  sip:user@domain (with phone in internal network, it like sip:user@ipaddress).
- write path value to column contact when the register message has it.
- sip_trace can get a path instead of contact if it has. 

Or you can have other solutions, pls help me.
We can talk and test via my Webex PMR.

Many thanks,
Thanh Duy Tran