[asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

2012-07-18 Thread Alejandro Recarey
Hi all, and thanks for taking the time to read this.

I am trying to configure Asterisk 10.6 as a T38 Fax gateway. I am
receiving calls through the PSTN and want to send them to my VoIP
carriers as T38. This is my dialplan:

[fax]
exten = _X.,1,Set(FAXOPT(t38gateway)=yes,20)
exten = _X.,n,Dial(SIP/${EXTEN}@x.x.x.x)

I have tried with both FAXOPT(t38gateway) and FAXOPT(gateway). I have
also tried setting t38pt_udptl = yes,redundancy in sip.conf. None of
these things work. When we send a fax:

1. Asterisk does NOT send a REINVITE with the t38 offered. Reading the
documentation, it should detect the fax tone with the audiohook and
then send a REINVITE with t38 capability.

2. Asterisk does not offer t38 in the SDP of the initial INVITE. This
is not a problem if it correctly detects and REINVITES for faxes, but
our destination carriers tell us that they cannot do the REINVITE
themselves because we do not offer t38 in our SDP, so they believe we
do not have that capability.

Obviously I would prefer to just detect the fax myself and have
asterisk do the REINVITE.

I have read all of the documentation on the asterisk wiki (which is
rather short) and anything else I could find online. Unfortunately
most of it is out of date and refers to asterisk versions 1.4 to 1.8,
which do not have T38 Gateway capability.

Does anybody have any experience in making this work?

Thank you!

Alex

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

2012-07-18 Thread Alejandro Recarey
I forgot to ask:

Do I have to load res_fax or app_fax to use the T38 gateway capability?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

2012-07-18 Thread Matthew Jordan


- Original Message -
 From: Alejandro Recarey a...@recarey.org
 To: Asterisk Users Mailing List asterisk-users@lists.digium.com
 Sent: Wednesday, July 18, 2012 6:30:26 AM
 Subject: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway
 
 Hi all, and thanks for taking the time to read this.
 
 I am trying to configure Asterisk 10.6 as a T38 Fax gateway. I am
 receiving calls through the PSTN and want to send them to my VoIP
 carriers as T38. This is my dialplan:
 
 [fax]
 exten = _X.,1,Set(FAXOPT(t38gateway)=yes,20)
 exten = _X.,n,Dial(SIP/${EXTEN}@x.x.x.x)

The correct setting is not FAXOPT(t38gateway) - that is not a valid parameter
to pass to the FAXOPT function.  As you mention below, the correct setting
is Set(FAXOPT(gateway)=yes).  The optional timeout is fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Function_FAXOPT

 I have tried with both FAXOPT(t38gateway) and FAXOPT(gateway). I have
 also tried setting t38pt_udptl = yes,redundancy in sip.conf. None of
 these things work. When we send a fax:
 
 1. Asterisk does NOT send a REINVITE with the t38 offered. Reading
 the
 documentation, it should detect the fax tone with the audiohook and
 then send a REINVITE with t38 capability.

Have you confirmed that Asterisk does not send the re-INVITE using either
a packet sniffer or by monitoring the log with 'sip set debug on'?  Without
seeing the SIP message traffic and a DEBUG log, its hard to say what
might be the cause of your issues.  

Typically, I would expect to see something like the following in a DEBUG log:

[Jul 18 08:29:18] DEBUG[20234] res_fax.c: detected v21 preamble from 
SIP/ast1-g711-0001
[Jul 18 08:29:18] DEBUG[20234] res_fax.c: requesting T.38 for gateway session 
for SIP/ast1-t38-
 
Note that this also answers your question in a subsequent e-mail: you
should be using res_fax, with either res_fax_spandsp or Fax for Asterisk.

 2. Asterisk does not offer t38 in the SDP of the initial INVITE. This
 is not a problem if it correctly detects and REINVITES for faxes, but
 our destination carriers tell us that they cannot do the REINVITE
 themselves because we do not offer t38 in our SDP, so they believe we
 do not have that capability.
 
 Obviously I would prefer to just detect the fax myself and have
 asterisk do the REINVITE.
 
 I have read all of the documentation on the asterisk wiki (which is
 rather short) and anything else I could find online. Unfortunately
 most of it is out of date and refers to asterisk versions 1.4 to 1.8,
 which do not have T38 Gateway capability.

There typically isn't a lot of configuration that is needed for T.38
gateway support.  The necessary dialplan configuration is documented
here:

https://wiki.asterisk.org/wiki/display/AST/T.38+Fax+Gateway

 Does anybody have any experience in making this work?
 
 Thank you!
 
 Alex
 


--
Matthew Jordan
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

2012-07-18 Thread Steve Underwood

On 07/18/2012 09:43 PM, Matthew Jordan wrote:


- Original Message -

From: Alejandro Recarey a...@recarey.org
To: Asterisk Users Mailing List asterisk-users@lists.digium.com
Sent: Wednesday, July 18, 2012 6:30:26 AM
Subject: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

Hi all, and thanks for taking the time to read this.

I am trying to configure Asterisk 10.6 as a T38 Fax gateway. I am
receiving calls through the PSTN and want to send them to my VoIP
carriers as T38. This is my dialplan:

[fax]
exten = _X.,1,Set(FAXOPT(t38gateway)=yes,20)
exten = _X.,n,Dial(SIP/${EXTEN}@x.x.x.x)

The correct setting is not FAXOPT(t38gateway) - that is not a valid parameter
to pass to the FAXOPT function.  As you mention below, the correct setting
is Set(FAXOPT(gateway)=yes).  The optional timeout is fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Function_FAXOPT


I have tried with both FAXOPT(t38gateway) and FAXOPT(gateway). I have
also tried setting t38pt_udptl = yes,redundancy in sip.conf. None of
these things work. When we send a fax:

1. Asterisk does NOT send a REINVITE with the t38 offered. Reading
the
documentation, it should detect the fax tone with the audiohook and
then send a REINVITE with t38 capability.

Have you confirmed that Asterisk does not send the re-INVITE using either
a packet sniffer or by monitoring the log with 'sip set debug on'?  Without
seeing the SIP message traffic and a DEBUG log, its hard to say what
might be the cause of your issues.

Typically, I would expect to see something like the following in a DEBUG log:

[Jul 18 08:29:18] DEBUG[20234] res_fax.c: detected v21 preamble from 
SIP/ast1-g711-0001
[Jul 18 08:29:18] DEBUG[20234] res_fax.c: requesting T.38 for gateway session 
for SIP/ast1-t38-
  
Note that this also answers your question in a subsequent e-mail: you

should be using res_fax, with either res_fax_spandsp or Fax for Asterisk.


2. Asterisk does not offer t38 in the SDP of the initial INVITE. This
is not a problem if it correctly detects and REINVITES for faxes, but
our destination carriers tell us that they cannot do the REINVITE
themselves because we do not offer t38 in our SDP, so they believe we
do not have that capability.

Obviously I would prefer to just detect the fax myself and have
asterisk do the REINVITE.

I have read all of the documentation on the asterisk wiki (which is
rather short) and anything else I could find online. Unfortunately
most of it is out of date and refers to asterisk versions 1.4 to 1.8,
which do not have T38 Gateway capability.

There typically isn't a lot of configuration that is needed for T.38
gateway support.  The necessary dialplan configuration is documented
here:

https://wiki.asterisk.org/wiki/display/AST/T.38+Fax+Gateway

One thing that page doesn't mention is only spandsp supports T.38 
gateway right now. The Digium FAX module does not.


Regards,
Steve


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using Asterisk 10.6 as a T38 Fax gateway

2012-07-18 Thread Kevin P. Fleming

On 07/18/2012 06:30 AM, Alejandro Recarey wrote:

Hi all, and thanks for taking the time to read this.

I am trying to configure Asterisk 10.6 as a T38 Fax gateway. I am
receiving calls through the PSTN and want to send them to my VoIP
carriers as T38. This is my dialplan:

[fax]
exten = _X.,1,Set(FAXOPT(t38gateway)=yes,20)
exten = _X.,n,Dial(SIP/${EXTEN}@x.x.x.x)

I have tried with both FAXOPT(t38gateway) and FAXOPT(gateway). I have
also tried setting t38pt_udptl = yes,redundancy in sip.conf. None of
these things work. When we send a fax:


You say they don't work, but you don't provide any details (console 
output, log messages, etc.) The configuration you have provided above is 
*required* for T.38 support and T.38 gateway mode. If it's not working, 
we are going to need more details about what is actually happening (if 
anything is at all).



1. Asterisk does NOT send a REINVITE with the t38 offered. Reading the
documentation, it should detect the fax tone with the audiohook and
then send a REINVITE with t38 capability.


This is expected behavior. Proper implementations of T.38 require that 
the gateway in front of the *called* endpoint monitor for FAX tones and 
initiate the switch to T.38 mode. In your configuration, that would be 
your carrier's gateway, assuming it is terminating the call to a 
non-T.38 endpoint. If your carrier is handing off the call to another 
SIP provider, then the responsibility lies with them, and so on.


However, Asterisk's T.38 gateway functionality should still detect the 
V.21 preamble generated by the called FAX endpoint and initiate a switch 
to T.38, if the carrier does not do it first. If this is not happening, 
we'll need to see logs and console output to figure out why. What codec 
are you using for your SIP calls?



2. Asterisk does not offer t38 in the SDP of the initial INVITE. This
is not a problem if it correctly detects and REINVITES for faxes, but
our destination carriers tell us that they cannot do the REINVITE
themselves because we do not offer t38 in our SDP, so they believe we
do not have that capability.


This is bizarre; there is no specification anywhere that would indicate 
that a carrier should do this, and there are plenty of documents 
describing how it is a *bad* idea to offer a second media stream for 
T.38 in the initial INVITE of a call. I would urge you to ask them to 
reconsider this behavior.



Obviously I would prefer to just detect the fax myself and have
asterisk do the REINVITE.


This is not as reliable as the far-end gateway doing it, especially if 
the codec in use for the VoIP leg(s) of the call distorts the V.21 
preamble in any significant way.



I have read all of the documentation on the asterisk wiki (which is
rather short) and anything else I could find online. Unfortunately
most of it is out of date and refers to asterisk versions 1.4 to 1.8,
which do not have T38 Gateway capability.


The documentation on the wiki is short, but it's complete. Enabling T.38 
gateway functionality in Asterisk 10 is in fact pretty simple :-) 
Problems arise, as they always do in T.38-land, because no two T.38 
implementations are the same, and the choices made by carriers, 
gateway/softswitch/SBC manufacturers, and others, result in 
interoperability problems.


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users