Kamailio-433 installed behind nat (Amazon EC2 or Google Compute Engine) using config
listen=PRIVATE_IP:PORT advertise PUBLIC_IP:PORT
In table location
, the column socket
will be stored in the form of "PROTO:PRIVATE_IP:PORT" while for some reasons I would like it to be stored as "PROTO:PUBLIC_IP:PORT"
Through the registrar
document there is the xavp_cfg parameter that can be used in conjunction with the attribute "socket" to specify the socket string From my understanding this might be the solution to my requirement
The column location
socket
wasn't changed when setting the custom socket string via xavp_cfg
After looking into the source code, firstly, a potential bug (correct me if I'm wrong) that it would reset the sock_flag
to -1 (no flags) even if reg_xavp_cfg
and sock_flag
is set A pull request #470 has been opened for this
Secondly, if we pass the above problem, in savec
it did grab the socket string from xavp_cfg and in function grep_sock_info()
the socket string was checked with all the address we listen on, including the advertised public address via socket_info->useinfo
But the returned socket structure still contains the private address info
So, I wasn't sure if using the parameter xavp_cfg
for setting socket string and stores it in location table make sense or not If yes, can you please giving me some hints about the potential way to extend this?
Cheers,
Ian
—
Reply to this email directly or view it on GitHub.