[Asterisk-code-review] res pjsip/config transport: Allow reloading transports. (asterisk[13])

George Joseph asteriskteam at digium.com
Sat Feb 13 09:49:10 CST 2016


George Joseph has posted comments on this change.

Change subject: res_pjsip/config_transport: Allow reloading transports.
......................................................................


Patch Set 8:

(1 comment)

There's absolutely no expectation that reloading a transport with changed ip addresses or ports will be disruption free.  However, one of the main use cases for reloading a transport is a fail-over situation where a secondary server has to take over the ip address and port of a primary server.  Another case was where the dynamic address assigned to the pbx changed.  In both cases, there's already been a disruption.

Having said that, if you reload the transport changing only the async_ops for instance, the only exposure is on UDP for the 100ms the socket is closed.  For TCP/TLS, only the listener socket is closed so the active TCP connection stays active.  I did a bunch of reload tests with mixes of active UDP, TCP and TLS calls and didn't lose one.  I think pjproject's ref-counting on the transports helps there but I didn't dig deep enough into it to be sure.

Having said THAT, I also tested changing the address and port on active calls and didn't lose any BUT that wasn't a definitive test and there's no real use case for just shuffling addresses or ports on an active pbx.

I'll definitely be updating the wiki.  :)

https://gerrit.asterisk.org/#/c/2125/8/res/res_pjsip/config_transport.c
File res/res_pjsip/config_transport.c:

Line 351: static int has_state_changed(struct ast_sip_transport_state *a, struct ast_sip_transport_state *b)
> Why does this return different values in different places? Since the only u
Oops.  This was a left-over from debugging.  I'll change them back to boolean.


-- 
To view, visit https://gerrit.asterisk.org/2125
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5e759850e25958117d4c02f62ceb7244d7ec9edf
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list