[Freeswitch-users] bash script with variables
Abel Monzon
abelcubano at gmail.com
Mon Dec 2 01:32:33 UTC 2019
what is the dialplan command to run /root/scripts/test1.sh?
El jue., 28 nov. 2019 a las 8:15, Dragos Oancea (<dragos at freeswitch.org>)
escribió:
> Maybe it has something to do with mutt config and maybe mutt is even
> clearing an env variable with the same name when it's getting executed as
> user 'freeswitch' from the dialplan. When you execute that script from
> command line you do it as a regular user, try to become the freeswitch user
> (su) and see if it still works.
>
>
> On Wed, Nov 27, 2019 at 8:31 PM Mike Jerris <mike at freeswitch.org> wrote:
>
>> Do you not see the file at all? Might be a permissions or working
>> directory issue.
>>
>> > On Nov 27, 2019, at 8:54 AM, thomas peterseil <
>> thomas.peterseil at mine-project.eu> wrote:
>> >
>> > hello freeswitch-list,
>> > i would like to start from the dialplan a bash script and the
>> > freeswitch is handing over one variable to the script. in the cli i
>> > see the correct start of the script:
>> >
>> > [NOTICE] mod_dptools.c:2120 Executing command: /root/scripts/test1.sh
>> 3333
>> >
>> > the script is very simple:
>> >
>> > #!/bin/bash
>> > number=$1
>> >
>> > mutt -s "Call $number" thomas.peterseil at mine-project.eu <
>> > /root/mailtexte/registrierung.txt
>> > echo "$number" > test1.txt
>> >
>> > i get the email with the variable in the subject, that works fine, but
>> > i can´t see the 3333 in the test1.txt file.
>> > when i start the script from the command line with ./test1.sh 3333 all
>> > is working fine. can somebody give me a hint why it doesn´t work from
>> > the dialplan.
>>
>>
>> _________________________________________________________________________
>>
>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>> services.
>> Build your next product on our scalable cloud platform.
>>
>> Join our online community to chat in real time
>> https://signalwire.community
>>
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> https://freeswitch.com
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20191201/dc17197a/attachment.html>
More information about the FreeSWITCH-users
mailing list