Kamailio and NAT

From open-voip.org

Jump to: navigation, search

In order to solve NAT signaling problem with kamailio script we should add the "received=200.200.200.200;rport=22000" in the Via header, so when getting back the response, kamailio will know where to send the packet. we will do it using:

force_rport()

NAT & REGISTER requests

client_nat_test()

will check if the EP is behind NAT

fix_nated_register()

if the user is behind NAT we will use this command, so the recieved ip and port (layer 4) to the Kamailio registration table ("location table")

using the nathelper module, you can "ping" the EP in order to keep his router open.

modparam("nathelper", "natping_interval", 10)

or you can choose to ping only EPs behind NAT:

modparam("nathelper", "ping_nated_only", 1)
Personal tools