]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Record the serializer earlier on the tdata. 38/5038/1
authorRichard Mudgett <rmudgett@digium.com>
Sat, 4 Feb 2017 22:00:14 +0000 (16:00 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 20 Feb 2017 22:13:15 +0000 (16:13 -0600)
commit4af241ab607277b3ecb7145f4f9847ac29b64af5
tree08e33f3e8d582c5022184fa985d15950cabb7787
parent7d9a0a89df7e81b6bc821e92ebdda56e7f865a4b
res_pjsip: Record the serializer earlier on the tdata.

When PJPROJECT needs to do a DNS resolution and there is not a cached
entry available, the SIP request message goes out on the PJSIP monitor
thread instead of the original serializer thread.  Thus when the response
comes back it does not get processed by the original sending serializer.

This patch records the serializer on tdata before passing a request
message to PJPROJECT where it can in Asterisk code.  There are several
places in PJPROJECT for outbound registration and publishing support that
would need to record the serializer.  Unfortunately, without replacing the
PJPROJECT DNS resolver as was done in v14 we cannot fix those without
modifying PJPROJECT.

Even if we backported the DNS resolver from v14, the outbound registration
refresh timer does not go out on a serializer thread but the PJSIP monitor
thread.  Fortunately, Asterisk's outbound publish support doesn't use the
auto refresh timer that would also not go out under the serializer thread.

This patch is v13 only.

ASTERISK-26669
ASTERISK-26738

Change-Id: I9997b9ed6dbcebd2c37d6a67dc6dcee9c78914a4
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip/pjsip_distributor.c
res/res_pjsip_outbound_publish.c
res/res_pjsip_outbound_registration.c