[Asterisk-Users] RXFax and Hangup context Question.

pbx at itsngroup.com pbx at itsngroup.com
Sun Jun 5 21:15:33 MST 2005


Hello:

I have been using the asterisk system now for almost 5 months. I'm very
happy with it's performance, however I have been using the RXFAX on and
off for the last month or so. I gave up after a while and just had it
route to my analog fax machine in the fax context.

However, I have always had the implementation that it would go to a
macro.. macro-faxreceive, and to the rxfax of the tif file etc etc etc.

Then, at the hangup context, it would run the system command to actually
email the TIF file.

One thing though, when the line hangs up it executes the hangup from the
original source of the call. If the original source of the call was an IVR
menu, it would execute the hangup context for that rather than the hangup
context for the macro.
My question is, is this normal behaviour that it executes the hangup
context of the first context of the call, and not the hangup context of
the current context that the call is executing through?

When a fax is received, it "goto's" the fax context, as described by the
CLI output, but when the hangup occurs, it never executes the system
command?

[macro-faxreceive]
exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID})
exten => s,2,SetVar(EXTEMAIL=${FAXTOEMAIL})
exten => s,3,SetVar(EXTNAME=YourName)
exten => s,4,SetVar(EXTCOMPANY=YourCompany)
exten => s,5,RxFax(${FAXFILE}.tif)
exten => h,1,System(/usr/local/bin/faxmail "${CALLERIDNUM}" "${CALLEDFAX}"
"${EXTNAME}" "${EXTEMAIL}" "${FAXFILE}" "${EXTCOMPANY}")

This is the example that i'm following.

I have in the original context (where the call comes in)
context = fax, priority 1, macro-faxreceive

should i just create  a generic context [faxreceive]
and do a GOTO instead of running the macro? Does a macro jump out when the
hangup is done? is that why this is happening?

thanks...






More information about the asterisk-users mailing list