[asterisk-dev] How to fix a crashing spandsp
Torrey Searle
tsearle at gmail.com
Tue Nov 12 03:20:01 CST 2013
Hello all,
I have a scenario which can cause asterisk to crash in SpanDSP to crash.
Basically res_fax.c has a 5 second timeout that, if triggered disables
AST_FAX_TECH_T38. This causes the T.38 stack not to be initialized and
the asterisk will crash if any UDPTL packet arrives after that point.
I have already identified two similar call flows that can trigger this.
1. We are slow to receive the ACK message from the calling party. The
T.38 switchover attempt of ReceiveFax will instead just set the
NEEDREINVITE flag. In this case, a T.38 RE-invite can be sent (and
succeed!) after res_fax has timed out and disabled T.38 => crash
2. We have sent the T.38 re-invite, but are slow to get the 200 OK from the
carrier, we time out, disable T.38, and the 200ok arrives after we give up
=> crash
Problem is, I'm not sure whats the best way of resolving this. I have been
able to resolve case 1 by not setting the NEEDREINVITE flag, and directly
failing to g711 if the ACK hasn't arrived yet, but that still leaves me
crashing in case 2.
Other ideas I had were to remove the timeout (trust the channel driver to
report failure on re-invite transaction timeout)
Alternatively I thought it might be good to always initialize the T.38
stack of span dsp just in case we find out later that we actually need to
use it.
I would like to get your feed back on what's the best solution for this
issue
Regards,
Torrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131112/604dd030/attachment.html>
More information about the asterisk-dev
mailing list