-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 30/07/2015 13:20, Larry Moore a écrit :
> Was it enabling alaw/ulaw which helped or did you need to use another
> method to route the IAX channel through PJSIP or some other
> configuration setting such as 'faxdetect' which may have been disabled
?

Well, first, I had SELinux enabled, which blocked Hylafax, and I didn't
notice :( I disabled it during testing.

Then, I had inconsistencies in my asterisks configurations: working
configuration is shown below. faxdetect is only needed when you want to
redirect the call to the fax extension. faxgateway is obviously needed
on both Asterisks.

With this configuration, I'm able to send faxes from Hylafax to the
PSTN. And receive fax from the PSTN on the same extension as my phone.
And T.38 is used on the network between the 2 asterisk, so faxing
reliability should be good.

Here is the relevant configuration on the gateway (Asterisk-11.18.0):
 * chan_dahdi.conf:
context=incoming_isdn
switchtype = euroisdn
faxdetect = no
faxbuffers => 64,full

 * sip.conf:
[general]
faxdetect = no
t38pt_udptl=yes,fec

[tiare] ; Real IPBX
type = friend
context = outgoing
host = tiare.sysnux.pf
disallow = all
allow = alaw
qualify = 153

 * extensions.conf:
[incoming_isdn]
exten => s,1,Goto(1040,1)
exten => _104[01234],1,NoOp(Appel entrant sur ligne RNIS)
             same => n,Set(FAXOPT(gateway)=yes)
             same => n,Dial(SIP/tiare/${EXTEN})

[outgoing] ; Real IPBX !
include => local
include => gsm
include => international

[local]
exten => _NXX.,1,Set(FAXOPT(gateway)=yes)
       same => n,Dial(${rnis}/${EXTEN})


Here is the configuration on the IPBX (Asterisk-13 git-309dd2a):
 * pjsip.conf:
[t0gw]
type = endpoint
transport = udp
context = incoming
allow = alaw
aors = t0gw
language=fr
fax_detect = no
t38_udptl=yes
t38_udptl_ec=fec

 * iax.conf
[iaxmodem0]
type=friend
secret=****
context=fax-outgoing
host=dynamic
disallow=all
allow=slin
qualify=200
jitterbuffer=no
forcejitterbuffer=no
requirecalltoken=no
auth=md5
port=4570

 * extensions.conf
[fax-outgoing]
include => local
include => international

[local]
exten => _4[09]XXXXXX,1,NoOp(${CALLERID()} calls ${EXTEN} (local))
              same => n,Set(FAXOPT(gateway)=yes)
              same => n,Dial(PJSIP/${EXTEN}@t0gw)

[stdexten] ; Extension "normale"
include => faxin
exten => _X.,1,NoOp(STDEXTEN ${EXTEN})
     same => n,Set(sip=${DB(exten/${EXTEN})}) ; Convert extension to SIP
user
     same => n,GotoIf($["${sip}" != ""]?sip_ok)
     same => n,Return
     same => n(sip_ok),Set(ext=${EXTEN}) ; Save extension
     same => n,Set(FAXOPT(faxdetect)=yes)
     same => n,Set(cfvm=${DB(CFVM/${sip})}) ; Check CFVM
     same => n,GotoIf(${cfvm}?:nocfvm)
     same => n,NoOp(Forward to voicemail ${ext})
     same => n,Voicemail(${ext}@astportal,u)
     same => n(nocfvm),Set(cfim=${DB(CFIM/${sip})})
     same => n,GotoIf($[${LEN(${cfim})} > 3]?${CHANNEL:4:8},${cfim},1)
     same => n,GotoIf(${cfim}?:nocfim)
     ; If caller is CFIM, pass the call (call screening)
     same => n,GotoIf($[${cfim} = ${DB(netxe/${CHANNEL:4:8})}]?nocfim)

     same => n,Set(sip=${DB(exten/${cfim})})
     same => n,NoOp(Forward immediate to ${sip})

     same => n,Dial(PJSIP/${sip},,)
     same => n(nocfim),Set(sip=${DB(exten/${ext})})
     same => n,Dial(${PJSIP_DIAL_CONTACTS(${sip})},25)

[faxin]
exten => fax,1,NoOp(FAXIN (${FAXEXTEN}) ${CALLERID(all)})
     same => n,Set(FAXOPT(gateway)=yes)
     same => n,Dial(IAX2/iaxmodem0/${FAXEXTEN})

 * /etc/iaxmodem/iaxmodem-cfg.ttyIAX
evice           /dev/ttyIAX
owner           uucp:uucp
mode            660
port            4570
refresh         300
server          127.0.0.1
peername        iaxmodem0
secret          hyla
cidname         SysNux
cidnumber       +689 40.50.10.40
codec           slin




Thanks,
- -- 
Jean-Denis Girard

SysNux                Systèmes   Linux   en   Polynésie   française
http://www.sysnux.pf/ Tél: +689 40.50.10.40 / GSM: +689 87.79.75.27
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAlW9PmMACgkQuu7Rv+oOo/gT/ACghbAWtT5tu8bvMIugvLe/ozf5
QnAAn08AFgIfKZaOXaSWgUfgx+hu2TD+
=jIT0
-----END PGP SIGNATURE-----

-- 
_____________________________________________________________________
-- 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

Reply via email to