ok, let me draw the picture:
there is a FreePBX, with a SIP channel, purpose of FreePBX is to act as IVR for external “dialers”.
for exapmle: anyone outside, when calling the number of SIP channel, is greeted with IVR`s welcome menu. then is offered to choose submenu: dial 1 to send congratulation, dial 2 to send anecdotes, dial 3 to send love declaration.
if he dials 1, then he hear : pres 1 to listen the first congratulation content, dial 2 ot listen to previos, dial 3 to listen to next.
after listening, he is offered to send the content listened, pressing 8.
when pressing 8, he should dial the tel number to send the congratulation.
afterwards, the receiver must receive the call from FreePBX and listen to the congratulation.
i created IVR, but am stuck at sending this content.
as i wrote b4, there is ext 8 in IVR entries, which point to a custom context:
extensions_custom.conf [----] 18 L:[ 1+12 13/ 13] *(407 / 407b)
[afterpressing8_tabrik]
exten=>s,1,Set(home="/var/lib/asterisk/sounds/custom")
exten=>s,n,Wait(2)
exten=>s,n,Answer()
exten=>a,n,Wait(1)
exten=>s,n,Background(${home}/ivr_tabrik5)
exten=>s,n,Read(digits, ,12)
exten=>s,n,Set(CHANNEL(language)=ru)
exten=>s,n,Background(${home}/ivr_tabrik6)
exten=>s,n,Saydigits(${digits})
exten=>s,n,Read(digit, ,1)
exten=>s,n,Gotoif($[${digit=1}?10:20])
exten=>s,10,Dial()
so, when pressing 8, the call is hanged, by Verbose the error is in last rows of:
-- Executing [t@ivr-12:2] Goto("SIP/sip-in-00000056", "ivr-16,s,1") in new stack
-- Goto (ivr-16,s,1)
-- Executing [s@ivr-16:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-16:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-16:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-16=ivr-12") in new stack
-- Executing [s@ivr-16:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-16") in new stack
-- Executing [s@ivr-16:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-16:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
-- Goto (ivr-16,s,9)
-- Executing [s@ivr-16:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_menu") in new stack
-- Executing [s@ivr-16:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-16:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_menu)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/ivr_menu.slin' (language 'en')
-- Executing [1@ivr-16:1] Goto("SIP/sip-in-00000056", "ivr-13,s,1") in new stack
-- Goto (ivr-13,s,1)
-- Executing [s@ivr-13:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-13:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-13:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-13=ivr-16") in new stack
-- Executing [s@ivr-13:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-13") in new stack
-- Executing [s@ivr-13:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-13:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
-- Goto (ivr-13,s,9)
-- Executing [s@ivr-13:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik1") in new stack
-- Executing [s@ivr-13:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-13:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik1)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik1.slin' (language 'en')
-- Executing [s@ivr-13:12] WaitExten("SIP/sip-in-00000056", "1,") in new stack
-- Timeout on SIP/sip-in-00000056, going to 't'
-- Executing [t@ivr-13:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=1") in new stack
-- Executing [t@ivr-13:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
-- Executing [t@ivr-13:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik2") in new stack
-- Executing [t@ivr-13:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
-- Goto (ivr-13,s,10)
-- Executing [s@ivr-13:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-13:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik2)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik2.slin' (language 'en')
-- Executing [s@ivr-13:12] WaitExten("SIP/sip-in-00000056", "1,") in new stack
== CDR updated on SIP/sip-in-00000056
-- Executing [1@ivr-13:1] Goto("SIP/sip-in-00000056", "ivr-17,s,1") in new stack
-- Goto (ivr-17,s,1)
-- Executing [s@ivr-17:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-17:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-17:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-17=ivr-13") in new stack
-- Executing [s@ivr-17:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-17") in new stack
-- Executing [s@ivr-17:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-17:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
-- Goto (ivr-17,s,9)
-- Executing [s@ivr-17:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/pozdrav01") in new stack
-- Executing [s@ivr-17:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-17:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/pozdrav01)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/pozdrav01.slin' (language 'en')
-- Invalid extension '1' in context 'ivr-17' on SIP/sip-in-00000056
== CDR updated on SIP/sip-in-00000056
-- Executing [i@ivr-17:1] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=1") in new stack
-- Executing [i@ivr-17:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
-- Executing [i@ivr-17:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik3") in new stack
-- Executing [i@ivr-17:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
-- Goto (ivr-17,s,10)
-- Executing [s@ivr-17:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-17:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik3)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik3.slin' (language 'en')
-- Executing [3@ivr-17:1] Goto("SIP/sip-in-00000056", "ivr-18,s,1") in new stack
-- Goto (ivr-18,s,1)
-- Executing [s@ivr-18:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-18:2] Set("SIP/sip-in-00000056", "INVALID_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-18:3] Set("SIP/sip-in-00000056", "_IVR_CONTEXT_ivr-18=ivr-17") in new stack
-- Executing [s@ivr-18:4] Set("SIP/sip-in-00000056", "_IVR_CONTEXT=ivr-18") in new stack
-- Executing [s@ivr-18:5] Set("SIP/sip-in-00000056", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-18:6] GotoIf("SIP/sip-in-00000056", "1?skip") in new stack
-- Goto (ivr-18,s,9)
-- Executing [s@ivr-18:9] Set("SIP/sip-in-00000056", "IVR_MSG=custom/pozdrav02") in new stack
-- Executing [s@ivr-18:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-18:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/pozdrav02)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/pozdrav02.slin' (language 'en')
-- Executing [s@ivr-18:12] WaitExten("SIP/sip-in-00000056", "2,") in new stack
-- Timeout on SIP/sip-in-00000056, going to 't'
-- Executing [t@ivr-18:1] Set("SIP/sip-in-00000056", "TIMEOUT_LOOPCOUNT=1") in new stack
-- Executing [t@ivr-18:2] GotoIf("SIP/sip-in-00000056", "0?final") in new stack
-- Executing [t@ivr-18:3] Set("SIP/sip-in-00000056", "IVR_MSG=custom/ivr_tabrik3") in new stack
-- Executing [t@ivr-18:4] Goto("SIP/sip-in-00000056", "s,start") in new stack
-- Goto (ivr-18,s,10)
-- Executing [s@ivr-18:10] Set("SIP/sip-in-00000056", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-18:11] ExecIf("SIP/sip-in-00000056", "1?Background(custom/ivr_tabrik3)") in new stack
-- <SIP/sip-in-00000056> Playing 'custom/ivr_tabrik3.slin' (language 'en')
-- Executing [s@ivr-18:12] WaitExten("SIP/sip-in-00000056", "2,") in new stack
== CDR updated on SIP/sip-in-00000056
-- Executing [8@ivr-18:1] Goto("SIP/sip-in-00000056", "afterpressing8_tabrik,8,1") in new stack
-- Goto (afterpressing8_tabrik,8,1)
-- Executing [h@afterpressing8_tabrik:1] Macro("SIP/sip-in-00000056", "XMPPSend,") in new stack
-- Executing [h@afterpressing8_tabrik:2] Macro("SIP/sip-in-00000056", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/sip-in-00000056", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/sip-in-00000056", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/sip-in-00000056", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/sip-in-00000056' in macro 'hangupcall'
== Spawn extension (afterpressing8_tabrik, h, 2) exited non-zero on 'SIP/sip-in-00000056'