pan-user писал(а):для запуска макросов M
для запуска подпрограмм U
G сильно из другой оперы
Код: Выделить всё
[dostavka2]
exten => _X.,1,Dial(SIP/501,30,M(create-file))
[macro-create-file]
exten => s,1,system(touch /var/"${DIALEDPEERNUMBER}".txt)
exten => s,n,Wait(1)
exten => s,n,system(echo "${CALLERID(name)}-${ARG1}" >> /var/dostavka/"${DIALEDPEERNUMBER}".txt)
exten => s,n,Wait(60)
exten => s,n,system(mv /var/dostavka/"${DIALEDPEERNUMBER}".txt /var/dostavka/old/"${DIALEDPEERNUMBER}".txt)
Код: Выделить всё
-- Called SIP/501
-- SIP/501-000001e2 is ringing
-- SIP/501-000001e2 is ringing
-- SIP/501-000001e2 is ringing
-- SIP/501-000001e2 answered SIP/westcall-out-000001e1
-- Executing [s@macro-create-file:1] System("SIP/501-000001e2", "touch /var/"501".txt") in new stack
-- Executing [s@macro-create-file:2] Wait("SIP/501-000001e2", "1") in new stack
-- Executing [s@macro-create-file:3] System("SIP/501-000001e2", "echo "device-" >> /var/dostavka/"501".txt") in new stack
-- Executing [s@macro-create-file:4] Wait("SIP/501-000001e2", "60") in new stack
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- Executing [s@macro-create-file:5] System("SIP/501-000001e2", "mv /var/dostavka/"501".txt /var/dostavka/old/"501".txt") in new stack
== Spawn extension (dostavka2, 78126400011, 1) exited non-zero on 'SIP/westcall-out-000001e1'
Код: Выделить всё
[dostavka2]
exten => _X.,1,Set(_CID=${CALLERID(name)})
exten => _X.,2,Dial(SIP/501,30,M(create-file))
[macro-create-file]
exten => s,1,system(touch /var/"${DIALEDPEERNUMBER}".txt)
exten => s,n,Wait(1)
exten => s,n,system(echo "${CID}" >> /var/dostavka/"${DIALEDPEERNUMBER}".txt)
exten => s,n,Wait(10)
exten => s,n,system(mv /var/dostavka/"${DIALEDPEERNUMBER}".txt /var/dostavka/old/"${DIALEDPEERNUMBER}".txt)