logfiles and full extension context/section you’re using. i just used your example on my Asterisk box and it worked. Asterisk running as user asterisk.
[custom-default]
exten => 10000,1,Answer
exten => 10000,2,DigitTimeout(7)
exten => 10000,3,ResponseTimeout(10)
exten => 10000,4,Flite("Welcome to XXX house heating")
exten => 10000,5,Festival("At the beep enter the code to start or stop the heating system")
exten => 10000,6,SIPDtmfMode(rfc2833)
exten => 10000,7,Read(data,beep,10)
exten => 10000,8,Flite("You entered the following code")
exten => 10000,9,SayDigits("${data}")
exten => 10000,10,Flite("Please hold a moment while sending command")
exten => 10000,11,System(/var/lib/asterisk/agi-bin/post.sh ${data})
exten => 10000,12,Set(CALLERID(name)=${data})
exten => 10000,13,Dial(SIP/200,10)
exten => 10000,14,Hangup
this is what i get while running the script in the log
-- Executing TrySystem("SIP/100-088c88e0", "/var/lib/asterisk/agi-bin/post.sh "1234"") in new stack
-- Executing Set("SIP/100-088c88e0", "CALLERID(name)=1234") in new stack
-- Executing Dial("SIP/100-088c88e0", "SIP/200|10") in new stack
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Dial("SIP/100-088c88e0", "SIP/100|10") in new stack
-- Called 100
-- SIP/100-088d3d58 is ringing
== Spawn extension (from-internal, 10000, 112) exited non-zero on 'SIP/100-088c88e0'
-- Executing Macro("SIP/100-088c88e0", "hangupcall") in new stack
-- Executing ResetCDR("SIP/100-088c88e0", "w") in new stack
-- Executing NoCDR("SIP/100-088c88e0", "") in new stack
-- Executing Wait("SIP/100-088c88e0", "5") in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/100-088c88e0' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/100-088c88e0'
asterisk works with root privilages ?
try chmod 777 post.sh (for test)
what post.sh do ?
can asterisk (privilages) do what is defined inside the script ?
it is not a AGI script, i just tried to change the file to *.agi to se if there would be a diffrens but there wasn’t one.
[quote=“fdragowski”]asterisk works with root privilages ?
try chmod 777 post.sh (for test)
what post.sh do ?
can asterisk (privilages) do what is defined inside the script ?[/quote]
post.sh runs a java program that in turn connects to a SocketServer…
#!/bin/bash
#exec the Java VM
/usr/java/jdk1.5.0_09/bin/java SocketClient $BASH_ARGV
[quote=“fdragowski”]did You try
exten => 100,2,System(/usr/java/jdk1.5.0_09/bin/java SocketClient ${data})
instead of running a bash script ?
any results ?[/quote]
same problem…
Playing '/tmp/flite_buf_aaIjKI' (language 'en')
-- Executing TrySystem("SIP/100-088da1e0", "/usr/java/jre1.5.0_07/bin/java SocketClient 1234") in new stack
-- Executing Set("SIP/100-088da1e0", "CALLERID(name)=1234") in new stack
-- Executing Dial("SIP/100-088da1e0", "SIP/200|10") in new stack
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Dial("SIP/100-088da1e0", "SIP/100|10") in new stack
-- Called 100
-- SIP/100-b7910dd0 is ringing
it looks like it’s runing but it never make the connection to my socket server…
btw, i am using trixbox 2.0 beta and i just found out that i can’t connect through WAN (I have set DMZ to Trixbox server) to register but i can ssh in to the server throug WAN…
maybe there is a connection problem? trixbox is blocking my java app?