M(x): Заставляет выполнить macro (x) в момент ответа на вызов
Код: Выделить всё
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,tM(otvet)
[macro-otvet]
exten => s,1,NoOp(подняли трубку)
exten => s,n,Return()
Код: Выделить всё
27. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,tL(${OUT_TIME_LIMIT})) [pbx_config]
28. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,tM(otvet) [pbx_config]
29. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS}) [pbx_config]
Код: Выделить всё
Executing [s@macro-dialout-trunk:24] AGI("SIP/107-00000035", "/php-agi/1.php") in new stack
-- Launched AGI Script /php-agi/1.php
-- <SIP/107-00000035>AGI Script /php-agi/1.php completed, returning 0
-- Executing [s@macro-dialout-trunk:25] ExecIf("SIP/107-00000035", "0?Playback(/php-agi/no-bablo)") in new stack
-- Executing [s@macro-dialout-trunk:26] ExecIf("SIP/107-00000035", "0?Hangup") in new stack
-- Executing [s@macro-dialout-trunk:27] Dial("SIP/107-00000035", "SIP/7916862/100,300,tL(9999990)") in new stack
-- Setting call duration limit to 9999.990 seconds.
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/7916862/100
-- SIP/7916862-00000036 is ringing
-- SIP/7916862-00000036 answered SIP/107-00000035
-- Executing [h@macro-dialout-trunk:1] AGI("SIP/107-00000035", "/tmp/date-off.php") in new stack
-- Launched AGI Script /tmp/date-off.php
Код: Выделить всё
27. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,tM(otvet)) [pbx_config]
28. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,tL(${OUT_TIME_LIMIT}))
Код: Выделить всё
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS}tM(otvet^${AMPUSER}^${OUTNUM}^${OUT_${DIAL_TRUNK}})tL(${OUT_TIME_LIMIT}))