res_fax: wrap v21 detected Asterisk initiated negotiation with config option

A previous patch:

Gerrit Change-Id: I73bb24799bfe1a48adae9c034a2edbae54cc2a39

made it so a T.38 Gateway tries to negotiate with both sides by sending T.38
negotiation request to both endpoints supported T.38 versus the previous
behavior of forwarding negotiation to the "other" channel once a preamble
was detected.

This had the unfortunate side effect of breaking some setups. Specifically
ones that set the max datagram option on an endpoint configuration (configured
max datagram was not propagated since Asterisk now initiates negotiations).

This patch adds a configuration option, "negotiate_both", that when enabled
makes it so Asterisk initiates the negotiation requests to both endpoints vs.
the previous behavior of waiting, and forwarding the request.

The default is disabled keeping with the old behavior.

ASTERISK-28660

Change-Id: I5deb875f3485e20bc75119ec743090655d864a1a
This commit is contained in:
Kevin Harwell
2019-12-13 13:46:17 -06:00
parent 9240fcd8bb
commit d17bbcb9f1
3 changed files with 35 additions and 1 deletions

View File

@@ -189,6 +189,9 @@ struct ast_fax_session_details {
int faxdetect_flags;
/*! Non-zero if T.38 is negotiated */
int is_t38_negotiated;
/*! Upon v21 detection the gateway sends negotiation requests to both
T.38 endpoints, and do not wait on the "other" side to initiate */
int negotiate_both;
};
struct ast_fax_tech;