]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res/res_hep_pjsip: Fix reported local IP address when bound to 'any' 33/2833/2
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 01:39:08 +0000 (20:39 -0500)
commitd29c17834ccbfc03406660fb3b1992bf07e84250
treea1d4504295ef09e81b1f557da0fa72304cd0b227
parentacdd0ae993c06a82b436abf35f0a14e22cc308d8
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