[asterisk-bugs] [JIRA] (ASTERISK-28370) res_pjsip_t38: Not accepting Audio Re-invite after T.38 rejection

Thomas Weber (JIRA) noreply at issues.asterisk.org
Tue Oct 1 04:36:48 CDT 2019


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

Thomas Weber commented on ASTERISK-28370:
-----------------------------------------

@pnlarsson: recently asterisk 16.5.1 was released, it includes ASTERISK-28495 and i was wondering if it fixes this issue as well. Did you try 16.5.1? 

You can try my fix/workaround for 16.5.0:

{code}
diff -Naur asterisk-16.5.0/res/res_pjsip_session.c asterisk-16.5.0_fix/res/res_pjsip_session.c
--- asterisk-16.5.0/res/res_pjsip_session.c	2019-07-25 09:38:14.000000000 +0000
+++ asterisk-16.5.0_fix/res/res_pjsip_session.c	2019-08-07 15:29:36.048479446 +0000
@@ -469,9 +469,16 @@
 	/* It is possible for this media state to already contain a session for the stream. If this
 	 * is the case we simply return it.
 	 */
-	if (position < AST_VECTOR_SIZE(&media_state->sessions)) {
-		return AST_VECTOR_GET(&media_state->sessions, position);
-	}
+        if (position < AST_VECTOR_SIZE(&media_state->sessions)) {
+                session_media = AST_VECTOR_GET(&media_state->sessions, position);
+                // WORKAROUND for https://issues.asterisk.org/jira/browse/ASTERISK-28370
+                if (session_media->type == AST_MEDIA_TYPE_IMAGE && type != AST_MEDIA_TYPE_IMAGE) {
+                        session_media = NULL;
+                } else {
+                        return session_media;
+                }
+        }
+
 
 	/* Determine if we can reuse the session media from the active media state if present */
 	if (position < AST_VECTOR_SIZE(&session->active_media_state->sessions)) {
{code}

It survived some internal testing but i am not an expert on asterisk internals.
Some feedback would be nice.

> res_pjsip_t38: Not accepting Audio Re-invite after T.38 rejection
> -----------------------------------------------------------------
>
>                 Key: ASTERISK-28370
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28370
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_session, Resources/res_pjsip_t38
>    Affects Versions: 16.2.1
>         Environment: Asterisk Version: Asterisk 16.2.1
> Operationg System: Ubuntu 18.04.1 
> Kernel: 4.15.0-44-generic
> PJSIP Version: PJPROJECT version currently running against: 2.8
>            Reporter: Shane Short
>            Severity: Minor
>              Labels: fax, pjsip
>         Attachments: debug, pjsip.conf, sip_trace_11.txt
>
>
> When sending an audio based fax, asterisk rejects any re-invites (including back to audio after a T.38 rejection). Call flow is as follows:
> - Normal call setup using G711A
> - Upstream detects Fax Preamble and sends T.38 re-invite
> - As I have T.38 gateway disabled (due to crashes which I shall report in future), we reject the re-invite with 488.
> - The Upstream then re-invites us with G711A 
> - Asterisk rejects this re-invite with another 488. 
> - The upstream then sends a BYE.
> I've tested this behavior using the same upstream and target number on Asterisk 11 w/chan-sip, and the call flow proceeds as you would expect. 
> I have attached debug logging and a successful Asterisk 11/chan-sip Negotiation with the same upstream peer.



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



More information about the asterisk-bugs mailing list