.
.
.
[some-other-context]
exten => 128,1,Gosub(ReadCode,s,1)
exten => 128,n,NoOp(${CODE})[/code]
The 128 is just a test exten. The NoOp is just for test. WaitExten(10) waits for input for 10 sec. Background could be used to play music etc.
Do NOT “include” ReadCode context into your default context.
I’d forgotten this cuestions and this post for a long time and I’ve recovered the works this days…
The ReadCode suboutine really do the job and it has let me solved both problems; I can capture # insaide the codes and I can capture codes in video calls using a clip inside the subroutine that remains while the user is introducing the code, something like that:
Next step would be to show the introduced code to the videocall user in the following screen. Something like:
You have introduced: 345*#3
Anyone knows if exists the posibility of show variables on screen? Something like a text-to-video function? I haven’t found anything like that but would be great…
If your channel/device can handle displaying static pictures (jpeg etc?) then maybe you could use imagemagick’s convert command to create a picture with the text in and then SendImage() to display it to the user?