stepatchin
26/11/2010, 18h17
Bonjour
J'ai ecris un script AGI pour s'excuter a la fin d'un appel, sur le CLI, l' AGI s'excute bien mais au niveau fonctionelle rien n'est fait :(; l'agi est suposer envoyer un petit fichier texte par FTP, j'ai verifier son fonctionnement il est nike (il s'excute normalement a partir d'un terminal et copie le fichier sur le serveur distant)
#!/bin/bash
retour=/tmp/ConvertFile/retour.txt
{
sleep 1
echo "user Administrateur \$agem001"
sleep 1
echo "put retour.txt"
sleep 5
} | ftp -n 192.168.2.10
-- Attempting call on SIP/4000 for s@outboundmsg1:1 (Retry 1)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [s@outboundmsg1:1] Set("SIP/4000-0000001f", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@outboundmsg1:2] Set("SIP/4000-0000001f", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@outboundmsg1:3] Answer("SIP/4000-0000001f", "") in new stack
-- Executing [s@outboundmsg1:4] Wait("SIP/4000-0000001f", "1") in new stack
-- Executing [s@outboundmsg1:5] BackGround("SIP/4000-0000001f", "outboundmsgs/Msgvocal,m") in new stack
-- <SIP/4000-0000001f> Playing 'outboundmsgs/Msgvocal.slin' (language 'en')
-- Executing [2@outboundmsg1:1] Goto("SIP/4000-0000001f", "msgack,s,1") in new stack
-- Goto (msgack,s,1)
-- Executing [s@msgack:1] Playback("SIP/4000-0000001f", "outboundmsgs/byefr") in new stack
-- <SIP/4000-0000001f> Playing 'outboundmsgs/byefr.slin' (language 'en')
-- Executing [s@msgack:2] NoOp("SIP/4000-0000001f", "Ecriture dans le fichier retour.txt") in new stack
-- Executing [s@msgack:3] Hangup("SIP/4000-0000001f", "") in new stack
== Spawn extension (msgack, s, 3) exited non-zero on 'SIP/4000-0000001f'
-- Executing [h@msgack:1] System("SIP/4000-0000001f", "echo -e "resultat : 1 ok" >> /tmp/ConvertFile/retour.txt") in new stack
-- Executing [h@msgack:2] AGI("SIP/4000-0000001f", "/tmp/ConvertFile/test_2.agi") in new stack
-- Launched AGI Script /tmp/ConvertFile/test_2.agi
-- <SIP/4000-0000001f>AGI Script /tmp/ConvertFile/test_2.agi completed, returning 0
-- Executing [h@msgack:3] AGI("SIP/4000-0000001f", "/tmp/ConvertFile/test_3.agi") in new stack
-- Launched AGI Script /tmp/ConvertFile/test_3.agi
-- <SIP/4000-0000001f>AGI Script /tmp/ConvertFile/test_3.agi completed, returning 0
[msgack]
exten => s,1,Playback(outboundmsgs/byefr)
exten => s,n,NoOp(Ecriture dans le fichier retour.txt)
exten => s,n,Hangup()
exten => h,1,system(echo -e "resultat : 1 ok" >> /tmp/ConvertFile/retour.txt)
exten => h,n,AGI(/tmp/ConvertFile/test_2.agi)
exten => h,n,AGI(/tmp/ConvertFile/test_3.agi)
Au debut les deux script 2 et 3 etaient ensemble mais j'ai ceparer pour etre sure que c pas une erreur au debut du script
Voyez vous un probleme quelque part ??
J'ai ecris un script AGI pour s'excuter a la fin d'un appel, sur le CLI, l' AGI s'excute bien mais au niveau fonctionelle rien n'est fait :(; l'agi est suposer envoyer un petit fichier texte par FTP, j'ai verifier son fonctionnement il est nike (il s'excute normalement a partir d'un terminal et copie le fichier sur le serveur distant)
#!/bin/bash
retour=/tmp/ConvertFile/retour.txt
{
sleep 1
echo "user Administrateur \$agem001"
sleep 1
echo "put retour.txt"
sleep 5
} | ftp -n 192.168.2.10
-- Attempting call on SIP/4000 for s@outboundmsg1:1 (Retry 1)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [s@outboundmsg1:1] Set("SIP/4000-0000001f", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@outboundmsg1:2] Set("SIP/4000-0000001f", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@outboundmsg1:3] Answer("SIP/4000-0000001f", "") in new stack
-- Executing [s@outboundmsg1:4] Wait("SIP/4000-0000001f", "1") in new stack
-- Executing [s@outboundmsg1:5] BackGround("SIP/4000-0000001f", "outboundmsgs/Msgvocal,m") in new stack
-- <SIP/4000-0000001f> Playing 'outboundmsgs/Msgvocal.slin' (language 'en')
-- Executing [2@outboundmsg1:1] Goto("SIP/4000-0000001f", "msgack,s,1") in new stack
-- Goto (msgack,s,1)
-- Executing [s@msgack:1] Playback("SIP/4000-0000001f", "outboundmsgs/byefr") in new stack
-- <SIP/4000-0000001f> Playing 'outboundmsgs/byefr.slin' (language 'en')
-- Executing [s@msgack:2] NoOp("SIP/4000-0000001f", "Ecriture dans le fichier retour.txt") in new stack
-- Executing [s@msgack:3] Hangup("SIP/4000-0000001f", "") in new stack
== Spawn extension (msgack, s, 3) exited non-zero on 'SIP/4000-0000001f'
-- Executing [h@msgack:1] System("SIP/4000-0000001f", "echo -e "resultat : 1 ok" >> /tmp/ConvertFile/retour.txt") in new stack
-- Executing [h@msgack:2] AGI("SIP/4000-0000001f", "/tmp/ConvertFile/test_2.agi") in new stack
-- Launched AGI Script /tmp/ConvertFile/test_2.agi
-- <SIP/4000-0000001f>AGI Script /tmp/ConvertFile/test_2.agi completed, returning 0
-- Executing [h@msgack:3] AGI("SIP/4000-0000001f", "/tmp/ConvertFile/test_3.agi") in new stack
-- Launched AGI Script /tmp/ConvertFile/test_3.agi
-- <SIP/4000-0000001f>AGI Script /tmp/ConvertFile/test_3.agi completed, returning 0
[msgack]
exten => s,1,Playback(outboundmsgs/byefr)
exten => s,n,NoOp(Ecriture dans le fichier retour.txt)
exten => s,n,Hangup()
exten => h,1,system(echo -e "resultat : 1 ok" >> /tmp/ConvertFile/retour.txt)
exten => h,n,AGI(/tmp/ConvertFile/test_2.agi)
exten => h,n,AGI(/tmp/ConvertFile/test_3.agi)
Au debut les deux script 2 et 3 etaient ensemble mais j'ai ceparer pour etre sure que c pas une erreur au debut du script
Voyez vous un probleme quelque part ??