[asterisk-users] call files .vbs

C F shmaltz at gmail.com
Sun May 22 22:25:07 CDT 2011


I'm the original author of said VB Script.
Steve is right, I had lots of errors - related to the fact that
asterisk watches it too closely and reads the files even before they
are complete - and have since updated it that it first dumps it to a
temp directory, then use a bash script on the linux machine that moves
all files from the temp directory to the call directory using plink.
Both pscp and plink are windoz programs that utilize ssh for their
functions. Pscp xfers files, and plink executes any remote commands.
In the newer version pscp in the VB Script dumps it to
/root/calltemps/ and /root/mvcallfiles.sh moves the files from
/root/calltemps/* to /var/spool/asterisk/outgoing/
change this line:
strcmd="C:\pscp -pw password c:\direcotry\"&strcnt&"\*
root at asterisk:/var/spool/asterisk/outgoing"
to:
strcmd="C:\pscp -pw password c:\directory\"&strcnt&"\*
root at asterisk:/root/calltemps"
make sure the dir exists
then add:
Set objShell2 = CreateObject("WScript.Shell")
	strcmd2="C:\plink -pw password root at asterisk /root/mvcallfiles.sh"
	objShell2.Run strcmd2
/root/movcallfiles.sh:
#/bin/bash

mv /root/calltemps/* /var/spool/asterisk/outgoing/

Hope this helps.






On Sun, May 22, 2011 at 8:55 PM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> On Sun, 22 May 2011, Thomas Perron wrote:
>
>> Also, it seems like the pscp function is the way that I can tie together
>> the vb script with the logic of the Asterisk call files........ learning
>> curve!!
>
> pscp is a program, not a function. Part of or related to putty as I
> remember.
>
> Not a good idea. One of the 'bugaboos' of call files is that you are
> supposed to create the files in a temporary directory and move them into the
> spool directory.
>
> Also, you will have limited error detection ability if you are only dumping
> files 'willy-nilly.'
>
> Much better to do it all on the Asterisk host.
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
> Newline                                              Fax: +1-760-731-3000
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list