Greetings,

 

I have a Kamailio proxy with uac_replace for To and From Headers. So far everything has worked correctly.

 

However, I now have a client who encodes my Calling Number too and I’m getting some issues in the restore mechanics. I have the restore setup as "auto" and it's info is stored in "vsf" and "vst" parameters of Record-Route.

 

On replies sent by my client I have the following Record-Route and From Header (Note : My Kamailio has two IPs which makes it insert two RR headers ):

 

Record-Route: <sip:xxx.xxx.xxx.xxx;r2=on;lr;ftag=99A730303736313103579CC4;tbk_i=1_2_Y;tbk_o=128_11_Y;vsf=AAAAABgGBAMDAAUBBQAJDndyAwMcHwIdHQsWHwUDNw--;vst=AAAAABgGBAMHDQgJDQECA3RyAwMcHwIdGgQeHAIFAnVzZXI9cGhvbmU-;did=f74.78e2>

Record-Route: <sip:xxx.xxx.xxx.xxx;r2=on;lr;ftag=99A730303736313103579CC4;tbk_i=1_2_Y;tbk_o=128_11_Y;vsf=AAAAABgGBAMDAAUBBQAJDndyAwMcHwIdHQsWHwUDNw--;vst=AAAAABgGBAMHDQgJDQECA3RyAwMcHwIdGgQeHAIFAnVzZXI9cGhvbmU-;did=f74.78e2>

 

From: "+351411110097" <sip:I2116446I_500@xxx.xxx.xxx.xxx>;tag=99A730303736313103579CC4

 

In this case the restore is done correctly

 

 

When the client sends me a BYE request I have the following Route Header and To Header

 

Route : <sip:xxx.xxx.xxx.xxx;r2=on;lr;ftag=99A730303736313103579CC4;tbk_i=1_2_Y;tbk_o=128_11_Y;vsf=AAAAABgGBAMDAAUBBQAJDndyAwMcHwIdHQsWHwUDNw--;vst=AAAAABgGBAMHDQgJDQECA3RyAwMcHwIdGgQeHAIFAnVzZXI9cGhvbmU-;did=f74.78e2>,<sip:xxx.xxx.xxx.xxx;r2=on;lr;ftag=99A730303736313103579CC4;tbk_i=1_2_Y;tbk_o=128_11_Y;vsf=AAAAABgGBAMDAAUBBQAJDndyAwMcHwIdHQsWHwUDNw--;vst=AAAAABgGBAMHDQgJDQECA3RyAwMcHwIdGgQeHAIFAnVzZXI9cGhvbmU-;did=f74.78e2>

To : "+351411110097" <sip:I2116446I_500@xxx.xxx.xxx.xxx>;tag=99A730303736313103579CC4

 

In this scenario, the To after restore is :  To :"+351411110097" <sip:Q4525417L_<>Gxxx.xxx.xxx.xxx>;tag=99A730303736313103579CC4, which throws an internal error on Kamailio about bad URI and also makes our MediaGateway reply with a "Bad Request".

 

 

Can this error be caused by the restore of the uac_replace mechanics? Both Record Route URIs are on different headers while the both Route URIs are on the same Route header. Can this be the reason?

 

If you need more information please let me know.

 

Best Regards

David Costa