<html><head>
<meta name="viewport" content="width=device-width" /><meta http-equiv="Content-Type" content="text/vnd.ui.secure+html;charset=utf-8" /></head><body bgcolor="#FFFFFF" text="#000000"><div class="mail_android_message" style="line-height: 1; padding: 0.5em">Hi. Since I am messing a lot with it without seeing the end of, may I ask if there is any solid guide for that please?<br>
</div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em">On 13/11/2016, 07:42 Larry Moore <lmoore@starwon.com.au> wrote:<blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Some additional information which may help you with your installation.<br />
<br />
I have 4 IAX Modems named iaxmodem0 - iaxmodem3. I use iaxmodem3 for outbound fax transmissions.<br />
<br />
I created a queue for the other 3 modems, here is my entry in queues.conf:<br />
<blockquote>
[hylafax-iax]<br />
strategy=linear<br />
ringinuse=yes<br />
autopause=no<br />
retry=4<br />
timeout=5<br />
timeoutpriority=conf<br />
reportholdtime=no<br />
joinempty=strict<br />
leavewhenempty=strict<br />
musicclass=silence<br />
<br />
member => IAX2/iaxmodem2<br />
member => IAX2/iaxmodem1<br />
member => IAX2/iaxmodem0<br />
<br />
</blockquote>
In case you are wondering about the 'musicclass' I have used, here is the section from musiconhold.conf, the actual location of the files may be elsewhere on your system:<br />
<blockquote>
[silence]<br />
mode=files<br />
directory=/usr/local/share/asterisk/silence<br />
; ls /usr/local/share/asterisk/silence<br />
; 10.gsm<br />
;<br />
; The file 10.gsm came from /usr/local/share/asterisk/sounds/en/silence<br />
<br />
</blockquote>
I changed 'callbackextension' in my sip.conf for the trunk so that it would go directly to the 'fax' extension in the dialplan i.e. 'callbackextension=fax'.<br />
<br />
I've included the console output when an incoming fax is received:<br />
<blockquote>
== Using SIP RTP TOS bits 184<br />
-- Executing [fax@from-itsp:1] NoOp("SIP/itsp-00000044", "Fax Detected 2016-11-13 12:33:40 +0800") in new stack<br />
-- Executing [fax@from-itsp:2] GotoIf("SIP/itsp-00000044", "0?3:8") in new stack<br />
-- Goto (from-itsp,fax,8)<br />
-- Executing [fax@from-itsp:8] NoOp("SIP/itsp-00000044", "Finish if_from-itsp_237") in new stack<br />
-- Executing [fax@from-itsp:9] GotoIf("SIP/itsp-00000044", "0?10:13") in new stack<br />
-- Goto (from-itsp,fax,13)<br />
-- Executing [fax@from-itsp:13] NoOp("SIP/itsp-00000044", "Finish if_from-itsp_238") in new stack<br />
-- Executing [fax@from-itsp:14] Set("SIP/itsp-00000044", "FAXOPT(gateway)=yes") in new stack<br />
-- Executing [fax@from-itsp:15] Queue("SIP/itsp-00000044", "hylafax-iax,dRt,,,15") in new stack<br />
-- Started music on hold, class 'silence', on SIP/itsp-00000044<br />
-- Call accepted by 127.0.0.1 (format alaw)<br />
-- Format for call is (alaw)<br />
-- IAX2/iaxmodem2-3086 is ringing<br />
-- Stopped music on hold on SIP/itsp-00000044<br />
-- IAX2/iaxmodem2-3086 answered SIP/itsp-00000044<br />
> 0x89bac000 -- Probation passed - setting RTP source address to <ITSP IP Address>:18998<br />
== Using UDPTL TOS bits 184<br />
-- Executing [h@from-itsp:1] GotoIf("SIP/itsp-00000044", "0?2:3") in new stack<br />
-- Goto (from-itsp,h,3)<br />
-- Executing [h@from-itsp:3] NoOp("SIP/itsp-00000044", "Finish if_from-itsp_239") in new stack<br />
-- Executing [h@from-itsp:4] NoOp("SIP/itsp-00000044", "Call/Fax Ended 2016-11-13 12:36:41 +0800") in new stack<br />
-- Hungup 'IAX2/iaxmodem2-3086'<br />
== Spawn extension (from-itsp, fax, 15) exited non-zero on 'SIP/itsp-00000044'<br />
<br />
</blockquote>
I'm sure you've already checked and confirmed you have 'alaw' and 'ulaw' codecs permitted in your IAX Modems, iax.conf and sip.conf configurations<br />
<br />
To test your configuration you could set it up your environment so that you send an outgoing fax to yourself i.e. your dial your number at the VoIP provider, this assumes when you dial your VoIP number a connection is made back to you, you can then troubleshoot the communication.<br />
<br />
This is how I performed the majority of my tests.<br />
<br />
Not sure why you haven't explored the option of terminating a fax call in Asterisk, you will need some scripts to convert the received image to a PDF which is then e-mailed. An offer was made to you to provide scripts, if you set this up when your iaxmodem's aren't working a fallback will be for Asterisk to accept the call as it falls through, one thing you should know, if you use the T.38 Gateway in your dialplan you will need to disabled it prior to Asterisk terminating the call. I use extensions.ael so here is an example, I've included the macro I use to receive a fax in Asterisk:<br />
<blockquote>
context from-itsp {<br />
<br />
s => {<br />
NoOp(Call Received ${STRFTIME(,,%F %T %z)});<br />
Set(CHANNEL(language)=en_AU);<br />
Set(DIALTIMEOUT=30);<br />
Progress();<br />
NoOp(Call Received from ${CALLERID(name)}, Tel: ${CALLERID(num)});<br />
.<br />
. other conditions checked and extensions dialled<br />
.<br />
};<br />
<br />
fax => {<br />
NoOp(Fax Detected ${STRFTIME(,,%F %T %z)});<br />
Set(FAXOPT(gateway)=yes);<br />
Queue(hylafax-iax,dRt,,,15);<br />
<br />
Set(FAXOPT(gateway)=no);<br />
&fax-receive(<TSID>,<Header>,FaxMaster,lmoore);<br />
Hangup();<br />
};<br />
<br />
h => {<br />
if ( "X${FAXRXFILE}" != "X" )<br />
{<br />
&email_rxfax();<br />
}<br />
NoOp(Call/Fax Ended ${STRFTIME(,,%F %T %z)});<br />
};<br />
};<br />
<br />
macro fax-receive( fax-number, header-info, sender, recipient ) {<br />
/*<br />
${ARG1} is Receiving Station Fax Number<br />
${ARG2} is Fax Header Information<br />
${ARG3} is Fax Sender E-mail Address<br />
${ARG4} is Fax Recipient E-mail Address<br />
*/<br />
NoOp(**** FAX RECEIVE ****);<br />
Set(FAXOPT(localstationid)=${LOCAL(fax-number)});<br />
Set(FAXOPT(headerinfo)=${LOCAL(header-info)});<br />
Set(FROMADDR=${LOCAL(sender)});<br />
Set(TOADDR=${LOCAL(recipient)});<br />
NoOp(**** SETTING FAXOPT ****);<br />
NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)});<br />
NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)});<br />
NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)});<br />
Set(RXSTART=${EPOCH});<br />
Set(FAXRXPATH=/var/spool/asterisk/fax/received);<br />
Set(FAXRXFILE=fax-${CALLERID(number)}-${UNIQUEID});<br />
NoOp(**** RECEIVING FAX : ${FAXRXFILE} ****);<br />
ReceiveFAX(${FAXRXPATH}/${FAXRXFILE}.tif,f);<br />
NoOp(**** Subroutine Return ****);<br />
return;<br />
};<br />
</blockquote>
Cheers,<br />
<br />
Larry.<br />
<br />
<br />
<div class="moz-cite-prefix">
On 13/11/2016 8:07 AM, Larry Moore wrote:<br />
</div>
<blockquote>
Is your network/firewall configuration permitting the ports for UDPTL, runn the command: udptl show config<br />
<br />
<blockquote>
UDPTL Global options<br />
--------------------<br />
udptlstart: 4000<br />
udptlend: 4999<br />
udptlfecentries: 3<br />
udptlfecspan: 3<br />
use_even_ports: No<br />
udptlchecksums: Yes<br />
<br />
</blockquote>
In your sip configuration for your 'mytrunk' peer have you set applicable options e.g.:<br />
<blockquote>
t38pt_udptl=yes,redundancy,maxdatagram=400<br />
</blockquote>
In your extensions.conf you could and probably should set the following option prior to dialing the IAX channel, this is to enable the T.38 gateway feature of Asterisk 11:<br />
<blockquote>
Set(FAXOPT(gateway)=yes)<br />
</blockquote>
I have it working in my installation however I have incoming voice calls too hence I use 'faxdetect' to direct the call to the 'fax' extension.<br />
<br />
Cheers,<br />
<br />
Larry.<br />
<br />
<div class="moz-cite-prefix">
On 12/11/2016 5:24 AM, tux john wrote:<br />
</div>
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
hi. i am using asterisk 11.24.1 in my raspberry. i do have a sip trunk with a provider with g711a. I am trying to setup a fax server by following the guide in<a class="moz-txt-link-freetext" href="http://the-asterisk-book.com/1.6/faxserver.html" target="_blank"></a><a class="moz-txt-link-freetext" href="http://the-asterisk-book.com/1.6/faxserver.html" target="_blank"> http://the-asterisk-book.com/1.6/faxserver.html</a>.
</div>
<div>
</div>
<div>
i do live in Greece and the number is 00302112152130
</div>
<div>
the problem is that i am getting the following error and i am stuck:
</div>
<div>
</div>
<div>
<div>
== Using SIP RTP TOS bits 184<br />
== Using SIP RTP CoS mark 5<br />
-- Executing [00302112152130@fax-in:1] Dial("SIP/mytrunk-00000001", "IAX2/iaxmodem") in new stack<br />
-- Called IAX2/iaxmodem<br />
-- Hungup 'IAX2/iaxmodem-3818'<br />
== Everyone is busy/congested at this time (1:0/0/1)<br />
-- Auto fallthrough, channel 'SIP/mytrunk-00000001' status is 'CHANUNAVAIL'<br />
RasPBX*CLI>
</div>
<div>
</div>
<div>
</div>
<div>
the extensions.conf has
</div>
<div>
<div>
[fax-in]<br />
exten => 00302112152130,1,Dial(IAX2/iaxmodem)
</div>
<div>
</div>
</div>
<div>
</div>
<div>
any ideas, please?
</div>
</div>
</div>
<br />
<fieldset class="mimeAttachmentHeader"></fieldset><br />
</blockquote>
<br />
<br />
<fieldset class="mimeAttachmentHeader"></fieldset><br />
</blockquote>
<br />
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by<a href="http://www.api-digital.com" target="_blank"> http://www.api-digital.com</a> -- Check out the new Asterisk community forum at:<a href="https://community.asterisk.org/" target="_blank"> https://community.asterisk.org/</a> New to Asterisk? Start here:<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank"> https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a> asterisk-users mailing list To UNSUBSCRIBE or update options visit:<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"> http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</blockquote></div></body></html>