Re: [asterisk-users] Any 1.6 SendFAX example ?

2008-11-28 Thread Anthony Messina
On Thursday 27 November 2008 05:03:00 Olivier wrote:
 Hi,

 Do you have any example showing how to use SendFAX ?
 I can see several examples of ReceiveFAX but not a single one showing
 SendFAX.

i'm working on a script to incorporate e-mail - fax gatewaying with asterisk 
using programs that are already available in linux.

there are simple examples here:

http://messinet.com/viewvc/asterisk-fax-gw/trunk/

-- 
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E



signature.asc
Description: This is a digitally signed message part.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] Any 1.6 SendFAX example ?

2008-11-27 Thread Olivier
Hi,

Do you have any example showing how to use SendFAX ?
I can see several examples of ReceiveFAX but not a single one showing
SendFAX.

Regards
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Any 1.6 SendFAX example ?

2008-11-27 Thread Atis Lezdins
On Thu, Nov 27, 2008 at 1:03 PM, Olivier [EMAIL PROTECTED] wrote:
 Hi,

 Do you have any example showing how to use SendFAX ?
 I can see several examples of ReceiveFAX but not a single one showing
 SendFAX.

This is not from 1.6, but rather from callweaver attached to Asterisk 1.4.
When i'll finally switch to 1.6, i intend to just move those contexts
to Asterisk dialplan.

extensions.conf:

[fax_out]
exten = _X.,1,NoOp(--- sending fax to ${EXTEN} ---)
exten = _X.,n,SipDTMFMode(inband)
exten = _X.,n,TxFAX(${TIFF},caller,debug,ecm)
exten = _X.,n,Hangup()

exten = h,1,NoOp(--- done sending fax ---)
exten = h,n,NoOp(TX: REMOTESTATIONID is ${REMOTESTATIONID})
exten = h,n,NoOp(TX: FAXPAGES is ${FAXPAGES})
exten = h,n,NoOp(TX: FAXRESOLUTION  is ${FAXRESOLUTION})
exten = h,n,NoOp(TX: FAXBITRATE is ${FAXBITRATE})
exten = h,n,NoOp(TX: PHASEESTATUS is ${PHASEESTATUS})
exten = h,n,NoOp(TX: PHASEESTRING is ${PHASEESTRING})
exten = h,n,NoOp(TX: DIALSTATUS is ${DIALSTATUS})
exten = h,n,System(${SCRIPT}/fax_out_end.php --status
${uniqueid_storage} --pages ${FAXPAGES} --resolution ${FAXRESOLUTION}
--bitrate ${FAXBITRATE} --phase

exten = failed,1,NoOp(--- failed sending fax ---)


Then, to send a fax, generate tiff file and call-file.

Snapshot of my PHP generating call-file from hylafax job:

$channel = 'SIP/'.$job['number'].'@asterisk-t38';
$destination =
array('context'='fax_out','extension'=$job['number'],'priority'='1');
$vars = array(
  'LOCALSTATIONID' = 'CallWeaver-T38-TxFax',
  'T38CALL'='1',
  'TIFF'=$job['private']['tiff_file'],
);
$callerid = 'CallWeaver T38 TxFax';
$waittime = 180;
$deliver_time = NULL;
$filename = NULL;
$retries = array();
$callfile_dir = T38_CALLFILE_DIR.'/';

$result = 
ast_originate_callfile($channel,$destination,$vars,$callerid,$waittime,$deliver_time,$filename,$retries,$callfile_dir);

Of course you'll need ast_originate_callfile which writes data to file
and then moves to correct dir. I would publish that, but it's full of
my constants and realted to much other libs..

Basically, you dial destination number (SIP/[EMAIL PROTECTED]) and send
local side of channel to fax_out,${NUMBER},1 which does SendFax.


Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Any 1.6 SendFAX example ?

2008-11-27 Thread Olivier
Thanks for this detailed reply.

I was trying to test SendFAX, ReceiveFAX as first on my way to Hylafax with
either iaxmodem or t38modem.
Have you tried any of those 2 (iaxmodem or t38modem) ?
Which one would you pick ?
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Any 1.6 SendFAX example ?

2008-11-27 Thread Steve Underwood
Olivier wrote:
 Thanks for this detailed reply.

 I was trying to test SendFAX, ReceiveFAX as first on my way to Hylafax 
 with either iaxmodem or t38modem.
 Have you tried any of those 2 (iaxmodem or t38modem) ?
 Which one would you pick ?
iaxmodem only does audio FAXing (for the present). t38modem only does 
T.38 FAXing. You pick the one you need.

Steve


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Any 1.6 SendFAX example ?

2008-11-27 Thread Atis Lezdins
On Thu, Nov 27, 2008 at 4:39 PM, Olivier [EMAIL PROTECTED] wrote:
 Thanks for this detailed reply.

 I was trying to test SendFAX, ReceiveFAX as first on my way to Hylafax with
 either iaxmodem or t38modem.
 Have you tried any of those 2 (iaxmodem or t38modem) ?
 Which one would you pick ?


We had IAXmodem with Hylafax installation base, and we sent our faxes
out trough PRI. Then we switched to pure SIP, but were unable to get
T38modem to work with our provider.

So, we wrote a wrapper for Hylafax that grabs processed tiff file from
outgoing spool and generates call file for Callweaver (which sends
trough Asterisk with T38 passtrough).

So, if you have PRI ir analogue lines, use IAXmodem, otherwise you
have to do either T38modem or SendFax.

Regards,
Atis


-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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