[SR-Users] Is it possible to replace Request-URI in the REGISTERs with the result of dispatcher?

刘鲲 liukun11 at meituan.com
Wed May 31 10:06:44 CEST 2017


Hello,

I build three kamailioes, one acts as a pass-through proxy as well as load-balancing, the two registrars.
The kamailio_1 decides to which registrar the REGISTER should forward by a dispatcher based on db_text. 

                                                                           ----->kamailio_2(IP2, registrar) 
SoftPhone--->kamailio_1(IP1, pass-through proxy)--|
                          |                                                ----->kamailio_3(IP3, registrar) 
                          |
                         dispatcher(db_text)

I expect the kamailio_1 forward the REGISTERs to kamailio_2/kamailio_3, and kamailio_2/kamailio_3 respond with 200 OK. But in fact, the registrars send the REGISTER back to kamailio_1. 

I think the reason is that the host part of Request-URI in REGISTER from SoftPhone is IP1, and kamailio_1 does not rewrite it as a pass-through proxy, so kamailio_2/kamailio_3 will find the host in Request-URI is not mine, thus route the REGISTER back to kamailio_1 according Request-URI.

The setting of SoftPhone cannot be changed,  so is it possible to :
1)  replace host part of  Request-URI in the REGISTERs with the result of dispatcher in kamailio_1 , or
2) force kamailio_2/kamailio_3 to respond rather than forward?

Thanks!



More information about the sr-users mailing list