Dear all: I want to change the content of request uri. I use this function ,exec_dset(), to change it.
This is my configuration:
if (!lookup("location")) { exec_dset("/usr/local/etc/openser/shell/sh1"); #sl_send_reply("404", "Not Found"); exit; };
shell scrip: sh1 #!/bin/sh num=200@xx.xx.xx.xx if [! -z "$num" ] then echo "$*" else echo "sip:$num" fi
but it doesn't work.
error message: ERROR:exec_str: no uri from /usr/local/etc/openser/shell/sh1 XX@xx.xx.xx.....
Can somebody tell me what's wrong with my shell script. Thank you for your response
chungyu 2007/06/4
Hello,
very strange ... seems that exec module was not able to read anything from the standard output. Is the script executable?
What is the output when you run: /usr/local/etc/openser/shell/sh1 XX@xx.xx.xx mailto:XX@xx.xx.xx
Cheers, Daniel
On 06/04/07 12:39, chungyu wrote:
Dear all: I want to change the content of request uri. I use this function ,exec_dset(), to change it. This is my configuration: if (!lookup("location")) { exec_dset("/usr/local/etc/openser/shell/sh1"); #sl_send_reply("404", "Not Found"); exit; }; shell scrip: sh1 #!/bin/sh num=200@xx.xx.xx.xx mailto:num=200@xx.xx.xx.xx if [! -z "$num" ] then echo "$*" else echo "sip:$num" fi
but it doesn't work. error message: ERROR:exec_str: no uri from /usr/local/etc/openser/shell/sh1 XX@xx.xx.xx mailto:XX@xx.xx.xx..... Can somebody tell me what's wrong with my shell script. Thank you for your response chungyu 2007/06/4
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users