[asterisk-bugs] [JIRA] (ASTERISK-27913) Fax reception fails when remote end rejects UDPTL stream in SDP with port 0 (no G711 fallback?)

George Diamantopoulos (JIRA) noreply at issues.asterisk.org
Tue Jun 12 12:42:54 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243814#comment-243814 ] 

George Diamantopoulos commented on ASTERISK-27913:
--------------------------------------------------

This issue seems to affect for chan_sip and chan_pjsip.

For asterisk 11 I tried the following patch with which I was able to successfully receive at least one fax originating from one of the Cisco endpoints exhibiting the problem:
{noformat}
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23201,6 +23201,20 @@
                p->invitestate = INV_TERMINATED;
                ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
                xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, TRUE);
+               if (AST_LIST_EMPTY(&p->offered_media) && p->udptl && p->t38.state == T38_LOCAL_REINVITE) {
+                       ast_log(LOG_WARNING, "Got 200 OK with no valid media streams\n");
+                        change_t38_state(p, T38_REJECTED);
+                        transmit_reinvite_with_sdp(p, FALSE, FALSE);
+                }
                check_pendings(p);
                break;
{noformat}

I'm only including this here in case it might provide a hint to anyone with some insight in asterisk's internals, as I have no idea if this breaks anything somewhere else. I have tried a similar patch with Asterisk 13, but I wasn't successful in repeating the fax reception.

I gave up trying to do something similar with pjsip, due to lack of time and skills...

> Fax reception fails when remote end rejects UDPTL stream in SDP with port 0 (no G711 fallback?)
> -----------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27913
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27913
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip, Channels/chan_sip/T.38, Resources/res_pjsip_sdp_rtp, Resources/res_pjsip_t38
>    Affects Versions: 11.25.3, 13.21.0
>         Environment: For Asterisk 13:
>   Debian Stretch
>   Asterisk built from source: 13.21.0
> For Asterisk 11:
>   Debian Jessie
>   Asterisk built from source: 11.25.3
>            Reporter: George Diamantopoulos
>              Labels: fax
>
> I have come across the following issue with what I believe to be Cisco SIP Endpoints initiating a fax call to an Asterisk running the ReceiveFax application in the dialplan or acting as a T.38 gateway for another endpoint.
> The issue manifests as follows:
> # Incoming INVITE from remote (Cisco) endpoint
> # Asterisk answers with 200 OK
> # Asterisk sends re-INVITE with a single offer for UDPTL in SDP
> # Cisco endpoint replies with 200 OK, and the has the following contents:
> {noformat}
>     v=0
>     o=- 29768103 29768104 IN IP4 0.0.0.0
>     s=SBC call
>     c=IN IP4 0.0.0.0
>     t=0 0
>     m=image 0 udptl t38
>     a=sendrecv
> {noformat}
> # Fax transmission fails, instead of Asterisk issuing a re-INVITE with an audio offer in either alaw or ulaw



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list