Disconnect Tone подобрал. Во время разговора теперь детектит отбой со стороны пстн абонента.
А вот проблема с IVR так и не решилась. Если во время болтовни электронной тети вызывающий вешает трубку - вызовы все равно поступают к секретарю и звонят до победного.
Вот дп:
Код: Выделить всё
exten = 1111, Answer
same = n, BackGround(/var/lib/asterisk/sounds/records/privetstvie_operator)
same = n, Set(flag=0)
same = n(donabor), WaitExten(5)
same = n, Set(CALLERID(name)=SPb)
same = n, Set(CALLERID(num)=7777777)
same = n(operator), Dial(SIP/2222,20,m)
same = n, Dial(SIP/3333,20,m)
same = n, PlayBack(vm-nobodyavail)
same = n, PlayBack(vm-goodbye)
same = n, HangUp()
exten = _XXXX, 1, PlayBack(/var/lib/asterisk/sounds/records/perevod_vizova)
same = n, GoToIf($[${DEVICE_STATE(SIP/${EXTEN})}=INUSE]?busy)
same = n, GoToIf($[${DEVICE_STATE(SIP/${EXTEN})}=UNAVAILABLE]?off)
same = n, Set(CALLERID(name)=SPb)
same = n, Set(CALLERID(num)=7777777)
same = n, Dial(SIP/${EXTEN},20,m)
same = n, GoToIf($["${DIALSTATUS}"="NOANSWER"]?noanswer)
same = n, HangUp()
same = n(busy), PlayBack(/var/lib/asterisk/sounds/records/abonent_zanyat)
same = n, Set(CALLERID(name)=SPb)
same = n, Set(CALLERID(num)=7777777)
same = n, Dial(SIP/${EXTEN},30,m)
same = n(noanswer), Read(vm,/var/lib/asterisk/sounds/records/abonent_nedostupen,1)
same = n, GoToIf($[${vm}=1]?voicemail)
same = n, HangUp()
same = n(voicemail), VoiceMail(${EXTEN})
same = n, HangUp()
same = n(off), Read(vm,/var/lib/asterisk/sounds/records/abonent_nedostupen,1)
same = n, GoToIf($[${vm}=1]?voicemail)
same = n, HangUp()
exten = i, 1, Set(flag=$[${flag}+1])
same = n, Playback(pbx-invalid)
same = n, GoToIf($[${flag}<4]?ok:notok)
same = n(ok), GoTo(1111,donabor)
same = n(notok), Playback(/var/lib/asterisk/sounds/records/nomer_ne_obsluzhivaetsya)
same = n, GoTo(1111,operator)
same = n, HangUp()
exten = t, 1, HangUp()
я уже грешным делом думаю, мб в дп проблема? но причем же тут дп - непричем 100%