On Dec 13, 2008, at 12:43 PM, William Suffill wrote:

> You would need to quote it correctly when using the system command  to
> make sure it isn't handled different by the shell since arguments are
> separated by spaces unless quoted. That's all that jumped out at me
> after looking at it briefly perhaps someone else will have something
> more detailed to add.
>
> -- William

Thanks William. I agree about the spaces in an environment var that is  
being set before the call to the script could screw up the shell's  
parsing the command line. In particular the REMOTESTATIONID env var  
being set can have an arbitrary string with spaces as returned from  
RxFAX().

I forgot to put in the System() call from extensions.conf. Here it is  
(most of the env vars have the same name as the CHANNEL vars - got  
this from someone else):

exten => fax,n,System(FAXFILE="${FAXFILE}.tif" FAXPATH="${FAXPATH}"  
REMOTESTATIONID="${REMOTESTATIONID} " FAXPAGES="${OFAXPAGES}"   
FAXRESOLUTION="${FAXRESOLUTION}" FAXSENDER="${CID} " MYFAX="$ 
{MYFAX}1" /usr/local/bin/rxfaxdeliver)

Perhaps i should replace the double quotes with single? Will that keep  
CW from doing var substitution on the command line before calling  
System()? The only reason to switch to single from double quotes is if  
CW is throwing away the double quotes and wouldn't with single. I  
would guess that CW is not throwing away the double quotes as the  
console output seems to indicate as seen from my previous post:

-- Executing [...@incoming-did:13] System("SIP/516567524-edf9",  
"FAXFILE="pbx-isis-1229103591.48.tif" FAXPATH="/usr/local/callweaver/ 
var/spool/callweaver/rxfax/" REMOTESTATIONID="6179450496 "  
FAXPAGES="1"  FAXRESOLUTION="7700" FAXSENDER="+13238609370"  
MYFAX="unknown1" /usr/local/bin/rxfaxdeliver")

Peace,
Dan


_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users

Reply via email to