-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a park timeout #49
base: master
Are you sure you want to change the base?
Conversation
9af7255
to
00e1f02
Compare
@@ -4,6 +4,7 @@ | |||
<!-- Park call and transfer control to esl --> | |||
<extension name="switchiopark"> | |||
<condition field="destination_number" expression="^(.*)$"> | |||
<action application="set" data="park_timeout=3:DESTINATION_OUT_OF_ORDER"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NETWORK_OUT_OF_ORDER cause seems more appropriate (is not a particular upstream destination number/uri that is out of order). As an add-on benefit that cause code also returns a SIP 503 which could be complemented by a 'Retry-After' header (setting variable sip_rh_Retry-After [0]) suggesting to retry after X number of secs to throttle down requests if possible and desired.
[0] https://wiki.freeswitch.org/wiki/Sofia-SIP#Adding_Response_Headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware this timeout might have unintended side effects. See my comments on issue #47.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moises-silva nice! I'll change it.
719d910
to
b5f9820
Compare
Just as a note for anyone who's following this and #47 - I've spoken to core FS and they'll consider a PR for a I just need to find the time to write up the patch. |
This is a safeguard in case the ESL connection drops while inbound calls are being received but no longer processed by switchio. Resolves #47
Verify that when a session is parked but not handled within the timeout period (in this case 3 seconds as set in our CI dialplan) it is cancelled by FS. In the contrary case verify that a simple `session.answer()` within the timeout results in a successful SIPp `uac` client scenario. Resolves #47
b5f9820
to
3e8e8b3
Compare
This is to address concerns that @k4ml had in #47.
I've added the use of the
park_timeout
channel variable to our CI dialplan as well as a test to verify that it works as intended and rejects unhanded sessions after 3 seconds. There is an additional test case which verifies that if a session which is parked (with a timeout) is moved out of theCHANNEL_PARK
state the timeout is not carried into the downstream app.