I need to make faxing easy for some very computer illiterate folk. I am using an email service and going to use procmail to print anything incoming automatically but they cant get the hang of scanning to an email app, so I am going to buy a Linksys PAP2T as per the wiki. Since the setup will never receive inbound remote faxes, I just need to direct all fax's sent from the FXS port (that extension) to the email script in the wiki substituting the destination # as the alias portion of the email. So if I create a dialplan that catches the caller_id_number of the FXS port, does the $1 variable exist in the following scenario: <action application="system" data="/opt/freeswitch/scripts/emailfax.sh $1@fax.com /tmp/${uuid}.rxfax.tiff"/> as that's how our service requires fax's, the 10 digit # at their domain, fax.com. Is this a plausible setup? Lastly, I see in the interop list that Audiocodes Mediapack 114 is supported, but the 202 is not listed, is that simply because its new or is it known to not work? Given that its the same price as the Linksys, I would rather get it. Thanks! jlc
On Wed, Nov 25, 2009 at 9:42 PM, Joseph L. Casale <JCasale@activenetwerx.com
wrote:
I need to make faxing easy for some very computer illiterate folk. I am using an email service and going to use procmail to print anything incoming automatically but they cant get the hang of scanning to an email app, so I am going to buy a Linksys PAP2T as per the wiki.
Since the setup will never receive inbound remote faxes, I just need to direct all fax's sent from the FXS port (that extension) to the email script in the wiki substituting the destination # as the alias portion of the email.
So if I create a dialplan that catches the caller_id_number of the FXS port, does the $1 variable exist in the following scenario:
<action application="system" data="/opt/freeswitch/scripts/emailfax.sh $ 1@fax.com /tmp/${uuid}.rxfax.tiff"/>
In this case, the $1 will only contain whatever is in the parens in your expression, i.e. <condition field="destination_number" expression="^(\d+)$"> What do you have for your expression? -MC
as that's how our service requires fax's, the 10 digit # at their domain, fax.com. Is this a plausible setup?
Lastly, I see in the interop list that Audiocodes Mediapack 114 is supported, but the 202 is not listed, is that simply because its new or is it known to not work? Given that its the same price as the Linksys, I would rather get it.
Thanks! jlc
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
In this case, the $1 will only contain whatever is in the parens in your expression, i.e. <condition field="destination_number" expression="^(\d+)$">
What do you have for your expression? -MC
Well, untested of course as I am busy with school:) But what I wrote up to try at Christmas (with your addition) was: <extension name="OutboundFax"> <condition field="caller_id_number" expression="^204$"/> <condition field="destination_number" expression="^(\d+)$"/> <action application="answer"/> <action application="playback" data="silence_stream://2000"/> <action application="rxfax" data="/tmp/${uuid}.rxfax.tiff"/> <action application="system" data="/opt/freeswitch/scripts/emailfax.sh $1@fax.com /tmp/${uuid}.rxfax.tiff"/> <action application="hangup"/> </condition> </extension> Am I correct in presuming that Freeswitch will answer a fax from a local zap based user just like it does from an FXO port connected to a POTS line? What I hope to do here is catch any call made from that extension (the zap based fax machine/user) and push its call into the fax module. Thanks for taking the time to help! jlc
On Tue, Dec 1, 2009 at 2:09 PM, Joseph L. Casale <JCasale@activenetwerx.com>wrote:
In this case, the $1 will only contain whatever is in the parens in your expression, i.e. <condition field="destination_number" expression="^(\d+)$">
What do you have for your expression? -MC
Well, untested of course as I am busy with school:) But what I wrote up to try at Christmas (with your addition) was:
<extension name="OutboundFax"> <condition field="caller_id_number" expression="^204$"/> <condition field="destination_number" expression="^(\d+)$"/> <action application="answer"/> <action application="playback" data="silence_stream://2000"/> <action application="rxfax" data="/tmp/${uuid}.rxfax.tiff"/> <action application="system" data="/opt/freeswitch/scripts/emailfax.sh $1@fax.com/tmp/${uuid}.rxfax.tiff"/> <action application="hangup"/> </condition> </extension>
Am I correct in presuming that Freeswitch will answer a fax from a local zap based user just like it does from an FXO port connected to a POTS line? What I hope to do here is catch any call made from that extension (the zap based fax machine/user) and push its call into the fax module.
Yes, when a device (phone/fax/modem/whatever) is plugged into the FXS it gets dialtone and dials. Whatever it dials is put into ${destination_number} just like any SIP phone that dials. This extension looks ok. Try it out and let us know how it goes. -MC
Just remove the terminating '/' at the end of the second condition tag.... <condition field="destination_number" expression="^(\d+)$"> From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Tuesday, December 01, 2009 5:23 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Faxing Advice On Tue, Dec 1, 2009 at 2:09 PM, Joseph L. Casale <JCasale@activenetwerx.com> wrote:
In this case, the $1 will only contain whatever is in the parens in your expression, i.e. <condition field="destination_number" expression="^(\d+)$">
What do you have for your expression? -MC
Well, untested of course as I am busy with school:) But what I wrote up to try at Christmas (with your addition) was: <extension name="OutboundFax"> <condition field="caller_id_number" expression="^204$"/> <condition field="destination_number" expression="^(\d+)$"/> <action application="answer"/> <action application="playback" data="silence_stream://2000"/> <action application="rxfax" data="/tmp/${uuid}.rxfax.tiff"/> <action application="system" data="/opt/freeswitch/scripts/emailfax.sh $1@fax.com /tmp/${uuid}.rxfax.tiff"/> <action application="hangup"/> </condition> </extension> Am I correct in presuming that Freeswitch will answer a fax from a local zap based user just like it does from an FXO port connected to a POTS line? What I hope to do here is catch any call made from that extension (the zap based fax machine/user) and push its call into the fax module. Yes, when a device (phone/fax/modem/whatever) is plugged into the FXS it gets dialtone and dials. Whatever it dials is put into ${destination_number} just like any SIP phone that dials. This extension looks ok. Try it out and let us know how it goes. -MC
Just remove the terminating '/' at the end of the second condition tag....
<condition field="destination_number" expression="^(\d+)$">
I tried to see based on examples if it was obvious to me why that should not be there but it didn't jump out:) Cuold you explain that please? The gateway will arrive at the end of the week, but I probably won't get to this now until Christmas as I missed my opportunity:) Once I get it working, I will update the wiki as I am sure it's useful to many others. Thanks everyone! jlc
"Joseph L. Casale" <JCasale@activenetwerx.com> said:
Just remove the terminating '/' at the end of the second condition tag....
<condition field="destination_number" expression="^(\d+)$">
I tried to see based on examples if it was obvious to me why that should not be there but it didn't jump out:) Cuold you explain that please?
It is a multi-line condition. If a condition is only one line long, it begins and ends on the same line. The "/>" combination is the sequence that closes the tag. -- Russell Mosemann ________________________________________________________ Concordia University, Nebraska See http://www.cune.edu/ for the latest news and events!
To expand on what Russell said: XML always has a start and an end tag, possibly with other stuff in between. <tag> ... content ... </tag> If there is no content, you get: <tag> </tag> Or, on one line, <tag></tag>. You're allowed to abbreviate that to just <tag/>. So in your case: <condition ... /> <condition ... > <action ... /> <--- these are themselves abbreviations of <action ...></action>!! <action ... /> </condition> Hope that helps! Peter -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Russell.Mosemann@cune.org Sent: Tuesday, December 01, 2009 6:22 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Faxing Advice "Joseph L. Casale" <JCasale@activenetwerx.com> said:
Just remove the terminating '/' at the end of the second condition tag....
<condition field="destination_number" expression="^(\d+)$">
I tried to see based on examples if it was obvious to me why that should not be there but it didn't jump out:) Cuold you explain that please?
It is a multi-line condition. If a condition is only one line long, it begins and ends on the same line. The "/>" combination is the sequence that closes the tag. -- Russell Mosemann ________________________________________________________ Concordia University, Nebraska See http://www.cune.edu/ for the latest news and events! _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
To expand on what Russell said: XML always has a start and an end tag, possibly with other stuff in between. <tag> ... content ... </tag>
/snip Ahh, so must all the actions be contained within at least one condition tag as content, or could have I kept the last "/" on the last condition and dropped the </condition> line? Thanks everyone :) jlc
Joseph L. Casale wrote:
Ahh, so must all the actions be contained within at least one condition tag as content,
Yes.
or could have I kept the last "/" on the last condition and dropped the </condition> line?
No. Think of the tags as a begin/end pair that surround the content. If there is no content, then you can use a one-line condition tag. <condition.../> or <condition> stuff </condition> -- Russell Mosemann
Indeed, all actions must be contained with a condition tag. FS just processes the conditions inside the extension top-to-bottom, so: <condition/> <condition> <action/> <action/> </condition> if the top condition (without actions in it) doesn't match, it stops processing that extension. -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Joseph L. Casale Sent: Tuesday, December 01, 2009 10:02 PM To: 'freeswitch-users@lists.freeswitch.org' Subject: Re: [Freeswitch-users] Faxing Advice
To expand on what Russell said: XML always has a start and an end tag, possibly with other stuff in between. <tag> ... content ... </tag>
/snip Ahh, so must all the actions be contained within at least one condition tag as content, or could have I kept the last "/" on the last condition and dropped the </condition> line? Thanks everyone :) jlc _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Am I correct in presuming that Freeswitch will answer a fax from a local zap based user just like it does from an FXO port connected to a POTS line? What I hope to do here is catch any call made from that extension (the zap based fax machine/user) and push its call into the fax module.
Yes, when a device (phone/fax/modem/whatever) is plugged into the FXS it gets dialtone and dials. Whatever it dials is put into ${destination_number} just like any SIP phone that dials. This extension looks ok. Try it out and let us know how it goes. -MC
Michael, It worked well, there was however a humorous moment: I was testing with my own shell script that simply emailed me directly to my postfix gateway, my exchange server and mua understood the uuencoded attachment so once it started working I modified the script to send to our fax service. Well they didn't understand uuencode so the attachment, a single page tiff, got faxed as 23 pages of binary :) I used mutt with a redirection to a specific muttrc which understands mime encoding which should work everywhere... Thanks for the help, you've made an office full of people happy... jlc
On Tue, Dec 22, 2009 at 7:58 PM, Joseph L. Casale <JCasale@activenetwerx.com
wrote:
Am I correct in presuming that Freeswitch will answer a fax from a local zap based user just like it does from an FXO port connected to a POTS line? What I hope to do here is catch any call made from that extension (the zap based fax machine/user) and push its call into the fax module.
Yes, when a device (phone/fax/modem/whatever) is plugged into the FXS it gets dialtone and dials. Whatever it dials is put into ${destination_number} just like any SIP phone that dials. This extension looks ok. Try it out and let us know how it goes. -MC
Michael, It worked well, there was however a humorous moment: I was testing with my own shell script that simply emailed me directly to my postfix gateway, my exchange server and mua understood the uuencoded attachment so once it started working I modified the script to send to our fax service.
Well they didn't understand uuencode so the attachment, a single page tiff, got faxed as 23 pages of binary :) I used mutt with a redirection to a specific muttrc which understands mime encoding which should work everywhere...
Thanks for the help, you've made an office full of people happy...
Thanks for letting us know that everything worked! I'm glad we didn't have to honor Tony's triple-your-money-back guarantee. :) -MC
participants (5)
-
Joseph L. Casale
-
Michael Collins
-
Peter J. Zandvoort
-
Russell Mosemann
-
Russell.Mosemann@cune.org