Hi Alan
Sorry for being vague.
I can follow the prompts to aparantely lock the extension but once set I can still make calls as if nothings set. Making the call afterwords the trace is just like a normal call but the trace below is setting the extension to ‘lock’ which seems to do what it says on the tin correctly, I’m thinking it’s something to do with the DB AMPUSER line that’s wrong for Asterisk 11
I’ve just spotted the part where it says I need to put the extension into custom-checklock context however it does not say how to do that. Can that be done with the Custom Contexts module?
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [*77@restricted-group-6:1] NoOp("SIP/5004-00002475", "Running miscapp 35: Padlock Ext") in new stack
-- Executing [*77@restricted-group-6:2] Macro("SIP/5004-00002475", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/5004-00002475", "TOUCH_MONITOR=1413818084.25178") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/5004-00002475", "AMPUSER=5004") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/5004-00002475", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/5004-00002475", "1?Set(REALCALLERIDNUM=5004)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/5004-00002475", "AMPUSER=5004") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/5004-00002475", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/5004-00002475", "AMPUSERCIDNAME=IT Workshop") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/5004-00002475", "0?report") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/5004-00002475", "AMPUSERCID=5004") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/5004-00002475", "__DIAL_OPTIONS=trw") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/5004-00002475", "CALLERID(all)="IT Workshop" <5004>") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/5004-00002475", "0?limit") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/5004-00002475", "0?Set(GROUP(concurrency_limit)=5004)") in new stack
-- Executing [s@macro-user-callerid:14] GosubIf("SIP/5004-00002475", "7?sub-ccss,s,1(restricted-group-6,*77)") in new stack
-- Executing [s@sub-ccss:1] ExecIf("SIP/5004-00002475", "0?Return()") in new stack
-- Executing [s@sub-ccss:2] Set("SIP/5004-00002475", "CCSS_SETUP=TRUE") in new stack
-- Executing [s@sub-ccss:3] GosubIf("SIP/5004-00002475", "0?monitor_config,1(restricted-group-6,*77):monitor_default,1(restricted-group-6,*77)") in new stack
-- Executing [monitor_default@sub-ccss:1] GotoIf("SIP/5004-00002475", "0?is_exten") in new stack
-- Executing [monitor_default@sub-ccss:2] StackPop("SIP/5004-00002475", "") in new stack
-- Executing [monitor_default@sub-ccss:3] Return("SIP/5004-00002475", "FALSE") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("SIP/5004-00002475", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("SIP/5004-00002475", "0?continue") in new stack
-- Executing [s@macro-user-callerid:17] ExecIf("SIP/5004-00002475", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:18] Set("SIP/5004-00002475", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("SIP/5004-00002475", "1?continue") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] Set("SIP/5004-00002475", "CALLERID(number)=5004") in new stack
-- Executing [s@macro-user-callerid:31] Set("SIP/5004-00002475", "CALLERID(name)=IT Workshop") in new stack
-- Executing [s@macro-user-callerid:32] Set("SIP/5004-00002475", "CDR(cnum)=5004") in new stack
-- Executing [s@macro-user-callerid:33] Set("SIP/5004-00002475", "CDR(cnam)=IT Workshop") in new stack
-- Executing [s@macro-user-callerid:34] Set("SIP/5004-00002475", "CHANNEL(language)=en") in new stack
-- Executing [*77@restricted-group-6:3] Goto("SIP/5004-00002475", "custom-setlock,s,1") in new stack
-- Goto (custom-setlock,s,1)
-- Executing [s@custom-setlock:1] NoOp("SIP/5004-00002475", "In Set Lock") in new stack
-- Executing [s@custom-setlock:2] Read("SIP/5004-00002475", "PIN1,vm-password,,,,") in new stack
-- <SIP/5004-00002475> Playing 'vm-password.alaw' (language 'en')
-- User entered '5432'
-- Executing [s@custom-setlock:3] Read("SIP/5004-00002475", "PIN2,vm-password,,,,") in new stack
-- <SIP/5004-00002475> Playing 'vm-password.alaw' (language 'en')
-- User entered '5432'
-- Executing [s@custom-setlock:4] GotoIf("SIP/5004-00002475", "1?okey") in new stack
-- Goto (custom-setlock,s,7)
-- Executing [s@custom-setlock:7] Set("SIP/5004-00002475", "DB(AMPUSER/5004/locked)=5432") in new stack
-- Executing [s@custom-setlock:8] Playback("SIP/5004-00002475", "vm-goodbye") in new stack
-- <SIP/5004-00002475> Playing 'vm-goodbye.alaw' (language 'en')
-- Executing [s@custom-setlock:9] Hangup("SIP/5004-00002475", "") in new stack
== Spawn extension (custom-setlock, s, 9) exited non-zero on 'SIP/5004-00002475'
-- Executing [h@custom-setlock:1] Hangup("SIP/5004-00002475", "") in new stack
== Spawn extension (custom-setlock, h, 1) exited non-zero on 'SIP/5004-00002475'