Pjsip T.38 Gateway


we are trying to switch from the legacy SIP-stack to PJSIP. We need to provide a gateway between G.711 and T.38 for faxes. This used to work (more or less) with the legacy SIP-stack, however it doesn’t seem to work with PJSIP any more.
Some older sources claim, that the gateway feature is not present with PJSIP, so we’d need to know if it actually exists in current versions.

Thank you very much
Christian Berger

The chan_pjsip module supports T.38, and the fax gateway requires nothing special in the channel driver to operate. You’d need to show configuration and state how it doesn’t work as well as what version of Asterisk is in use.

1 Like

extensions.conf.txt (5.6 KB) pjsip.conf.txt (469 Bytes)

Thank you for your quick reply. In the wireshark.png file you can see the call flow of the second leg of the call. We are using Asterisk as a B2B user agent.
From the market packet, a re-invite to T.38 Asterisk stops sending any voice frames to the B-side. This causes the fax to fail.

We can replicate this issue with both Asterisk 13.32.0 as well as 16.11.1 with no obvious difference.

Thank you very much for your time and consideration.

Looks like there is already a filed issue[1].

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28441

I’ve adapted and tried that patch, and it doesn’t seem to change anything. It seems to go into t38_fallback_response_cb instead of t38_reinvite_response_cb

What I’ve noticed is that somehow when the “488 Not Acceptable Here” arives from the B-side, Asterisk logs this:
[Jul 3 17:37:06] DEBUG[29529] res_pjsip_t38.c: channel PJSIP/sgw-00000001 refused audio fallback... don't know what to do...[Jul 3 17:37:06] DEBUG[29557][C-00000000] res_fax.c: PJSIP/sgw-00000000 attempted to negotiate T.38 but PJSIP/sgw-00000001 refused the request

The 488 Response, however, includes valid SDP:

SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP;rport=5060;branch=z9hG4bKPj2f1a2771-720c-48d9-89e2-335cfd40f499
From: <sip:sbctest@>;tag=2f93ee74-5fde-4bf3-9e51-7df03808b99f
To: <sip:092811448123@>;tag=6D95C07AC9DBC2C0
Call-ID: da5600ec-5c99-49d7-b72e-a263b435defd
CSeq: 22612 INVITE
Warning: 399 "successful but result empty"
User-Agent: FRITZ!OS
Content-Type: application/sdp
Content-Length:   377

o=user 15824697 15824698 IN IP4
c=IN IP4
t=0 0
m=audio 7082 RTP/AVP 8 0 2 102 100 99 97 101
a=rtpmap:2 G726-32/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:100 G726-40/8000
a=rtpmap:99 G726-24/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.