Collapse common code into local function and use it to reduce number of things we do.
Collapse common code into local function and use it to reduce number
of things we do.

synety-jdebp/rtpproxy,sippy/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,hongbinz/rtpproxy,hongbinz/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,Vocalocity/rtpproxy-pre,hongbinz/rtpproxy,sippy/rtpproxy,Vocalocity/rtpproxy-pre,Vocalocity/rtpproxy-pre,hongbinz/rtpproxy,synety-jdebp/rtpproxy,Vocalocity/rtpproxy-pre,jevonearth/rtpproxy