Sent to invalid extension but no invalid handler

Hello,

I m trying to make this Record Application work, following the documentation:

https://wiki.asterisk.org/wiki/display/AST/Record+Application

I m getting the following error :

[Aug 8 12:20:52] WARNING[9549][C-0000000f]: pbx.c:6796 __ast_pbx_run: Channel 'SIP/demo-alice-0000000f' sent to invalid extension but no invalid handler: context,exten,priority=users,6001,1

Here the coded added in extentions.conf

[day-menu]
exten => s,1,Answer(500)
same => n(loop),Background(dictate/record)
same => n,WaitExten()
 
exten => 1,1,Goto(users,6001,1)
 
exten => 2,1,Goto(users,6002,1)
 
exten => 9,1,Directory(vm-demo,users,fe)
exten => *,1,VoiceMailMain(@vm-demo)
 
exten => i,1,Playback(option-is-invalid)
same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
same => n,Goto(s,loop)

[demo-menu]
exten => s,1,Answer(500)
   same => n(loop),Background(press-1&or&press-2)
   same => n,WaitExten()
 
exten => 1,1,Playback(you-entered)
   same => n,SayNumber(1)
   same => n,Goto(s,loop)
 
exten => 2,1,Playback(you-entered)
   same => n,SayNumber(2)
   same => n,Goto(s,loop)
 
exten => i,1,Playback(option-is-invalid)
   same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
   same => n,Goto(s,loop)

[from-internal]
exten=>6001,1,Dial(SIP/demo-alice,20)
exten=>6002,1,Dial(SIP/demo-bob,20)
exten=>6598,1,Goto(demo-menu,s,1)
exten=>6599,1,Goto(day-menu,s,1)

Thanks.

You have no “users” context.

Hmmm so i added the users contex and it look like this :

[day-menu]
exten => s,1,Answer(500)
same => n(loop),Background(dictate/record)
same => n,WaitExten()
 
exten => 1,1,Goto(users,6001,1)
 
exten => 2,1,Goto(users,6002,1)
 
exten => 9,1,Directory(vm-demo,users,fe)
exten => *,1,VoiceMailMain(@vm-demo)
 
exten => i,1,Playback(option-is-invalid)
same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
same => n,Goto(s,loop)

[users]
exten=>6001,1,Dial(SIP/demo-alice,20)
exten=>6002,1,Dial(SIP/demo-bob,20)
exten=>6598,1,Goto(demo-menu,s,1)
exten=>6599,1,Goto(day-menu,s,1)

[demo-menu]
exten => s,1,Answer(500)
   same => n(loop),Background(press-1&or&press-2)
   same => n,WaitExten()
 
exten => 1,1,Playback(you-entered)
   same => n,SayNumber(1)
   same => n,Goto(s,loop)
 
exten => 2,1,Playback(you-entered)
   same => n,SayNumber(2)
   same => n,Goto(s,loop)
 
exten => i,1,Playback(option-is-invalid)
   same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
   same => n,Goto(s,loop)

[from-internal]
exten=>6001,1,Dial(SIP/demo-alice,20)
exten=>6002,1,Dial(SIP/demo-bob,20)
exten=>6598,1,Goto(demo-menu,s,1)
exten=>6599,1,Goto(day-menu,s,1) 

But I think it’s not the right way i think because I duplicated the users in 2 context internal one and the users !!? I cant use the same one ?

The other interpretation is that you used the wrong context in the Goto.

However, you can also use

include =>

So like this is the right one ? i took off the duplicated users and edited the contect users with from-internal in the Goto.

[day-menu]
exten => s,1,Answer(500)
same => n(loop),Background(dictate/record)
same => n,WaitExten()
 
exten => 1,1,Goto(from-internal,6001,1)
 
exten => 2,1,Goto(from-internal,6002,1)
 
exten => 9,1,Directory(vm-demo,users,fe)
exten => *,1,VoiceMailMain(@vm-demo)
 
exten => i,1,Playback(option-is-invalid)
same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
same => n,Goto(s,loop)

[demo-menu]
exten => s,1,Answer(500)
   same => n(loop),Background(press-1&or&press-2)
   same => n,WaitExten()
 
exten => 1,1,Playback(you-entered)
   same => n,SayNumber(1)
   same => n,Goto(s,loop)
 
exten => 2,1,Playback(you-entered)
   same => n,SayNumber(2)
   same => n,Goto(s,loop)
 
exten => i,1,Playback(option-is-invalid)
   same => n,Goto(s,loop)
 
exten => t,1,Playback(are-you-still-there)
   same => n,Goto(s,loop)

[from-internal]
exten=>6001,1,Dial(SIP/demo-alice,20)
exten=>6002,1,Dial(SIP/demo-bob,20)
exten=>6598,1,Goto(demo-menu,s,1)
exten=>6599,1,Goto(day-menu,s,1)