]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res/res_hep_pjsip: Fix reported local IP address when bound to 'any' 15/2815/5
authorMatt Jordan <mjordan@digium.com>
Thu, 12 May 2016 12:08:08 +0000 (07:08 -0500)
committerMatt Jordan <mjordan@digium.com>
Sun, 15 May 2016 00:54:11 +0000 (19:54 -0500)
commitf91a7dc99350f8be610e303e8cbd0d263eda4d7d
treee922ac022b41998f834d9ba6e4deefc7b8beb905
parente6a946400f86a2a18b115bdf118612c0d1998956
res/res_hep_pjsip: Fix reported local IP address when bound to 'any'

When bound to an 'any' address, e.g., 0.0.0.0, PJSIP reports as its
local address the 'any' address, as opposed to the IP address we
actually received the packet on. This can cause some confusion in Homer,
as it will dutifully report what we send it.

This patch uses the PJSIP inspection routines to determine which IP
address we probably received the packet on based on the remote party's
IP address. In the event that this fails, it falls back to the IP
address natively reported by the transport.

Change-Id: I076f835d2aef489e1ee1d01595b211eb2ce62da3
res/res_hep_pjsip.c