Commit graph

4 commits

Author SHA1 Message Date
Joshua Colp
6cfa02394f res_pjsip_transport_management: Allow unload to occur.
At shutdown it is possible for modules to be unloaded that wouldn't
normally be unloaded. This allows the environment to be cleaned up.

The res_pjsip_transport_management module did not have the unload
logic in it to clean itself up causing the res_pjsip module to not
get unloaded. As a result the res_pjsip monitor thread kept going
processing traffic and timers when it shouldn't.

Change-Id: Ic8cadee131e3b2c436a81d3ae8bb5775999ae00a
2016-04-18 13:49:45 -05:00
Mark Michelson
be4333ddad transport management: Register thread with PJProject.
The scheduler thread that kills idle TCP connections was not registering
with PJProject properly and causing assertions if PJProject was built in
debug mode.

This change registers the thread with PJProject the first time that the
scheduler callback executes.

AST-2016-005

Change-Id: I5f7a37e2c80726a99afe9dc2a4a69bdedf661283
2016-04-14 14:28:06 -05:00
Mark Michelson
216f22fd0f res_pjsip_transport_management: Kill idle TCP connections.
"Idle" here means that someone connects to us and does not send a SIP
request. PJProject will not automatically time out such connections, so
it's up to Asterisk to do it instead.

When we receive an incoming TCP connection, we will start a timer
(equivalent to transaction timer D) waiting to receive an incoming
request. If we do not receive a request in that timeframe, then we will
shut down the TCP connection.

ASTERISK-25796 #close
Reported by George Joseph

AST-2016-005

Change-Id: I7b0d303e5d140d0ccaf2f7af562071e3d1130ac6
2016-04-14 12:02:30 -05:00
Mark Michelson
d9fba46016 Rename res_pjsip_keepalive res_pjsip_transport_management
ASTERISK-25796
Reported by George Joseph

AST-2016-005

Change-Id: Id322a05f927392293570599730050bc677d99433
2016-04-14 07:36:23 -05:00
Renamed from res/res_pjsip_keepalive.c (Browse further)