]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Send a 503 response when overload state if reliable transport.
authorChris-Savinovich <csavinovich@digium.com>
Tue, 6 Nov 2018 22:44:34 +0000 (16:44 -0600)
committerChris-Savinovich <csavinovich@digium.com>
Wed, 7 Nov 2018 12:55:41 +0000 (06:55 -0600)
commit9c9bc5accaedbf2cdbc6cc8e60bee1080251b5b0
tree7c98766a954e6c0d76da0d5b7ac9902d67c21aa8
parent5710cf7c9441b2dfd17d75de5f40c0f05dc85aaf
res_pjsip: Send a 503 response when overload state if reliable transport.

When Asterisk's taskprocessors get overloaded we need to reduce the work
load. res_pjsip currently ignores new SIP requests and relies on SIP
retransmissions in the hope that the overload condition will clear soon
enough to handle the retransmitted SIP request.
This change adds the following code after ast_taskprocessor_alert_get()
has returned TRUE:
1- identifies transport type. If non-udp then send a 503 response
2- if transport type is udp/udp6 then ignore, as before.

Change-Id: I1c230b40d43a254ea0f226b7acf9ee480a5d3836
res/res_pjsip/pjsip_distributor.c