]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip/config_transport: Allow reloading transports. 25/2125/14
authorGeorge Joseph <george.joseph@fairview5.com>
Thu, 11 Feb 2016 17:01:05 +0000 (10:01 -0700)
committerGeorge Joseph <george.joseph@fairview5.com>
Sat, 20 Feb 2016 00:56:27 +0000 (17:56 -0700)
commitd2a1457e0b4ecdd512fe58fdb55ecc07fd141bea
treedb97ca4b365f3bd4bad2110c69a0e4ff9fe268a7
parentb4fdf93d06753c580b4ef7e34fe07670a8e4aff4
res_pjsip/config_transport: Allow reloading transports.

The 'reload' mechanism actually involves closing the underlying
socket and calling the appropriate udp, tcp or tls start functions
again.  Only outbound_registration, pubsub and session needed work
to reset the transport before sending requests to insure that the
pjsip transport didn't get pulled out from under them.

In my testing, no calls were dropped when a transport was changed
for any of the 3 transport types even if ip addresses or ports were
changed. To be on the safe side however, a new transport option was
added (allow_reload) which defaults to 'no'.  Unless it's explicitly
set to 'yes' for a transport, changes to that transport will be ignored
on a reload of res_pjsip.  This should preserve the current behavior.

Change-Id: I5e759850e25958117d4c02f62ceb7244d7ec9edf
CHANGES
configs/samples/pjsip.conf.sample
contrib/ast-db-manage/config/versions/3bcc0b5bc2c9_add_allow_reload_to_ps_transports.py [new file with mode: 0644]
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip/config_transport.c
res/res_pjsip_outbound_registration.c
res/res_pjsip_pubsub.c
res/res_pjsip_session.c