Help understanding effects of dial plan edit

Hi
I configured Lenny as a virtual extension and he worked as expected. I then prepended a recording to the Lenny/talk dialplan:

[Lenny]
exten => talk,1,Set(i=${IF($["0${i}"="016"]?7:$[0${i}+1])})
    same => n,ExecIf($[${i}=1]?Playback(custom/ring3))
    same => n,ExecIf($[${i}=1]?MixMonitor(${UNIQUEID}.wav))
    same => n,Playback(Lenny/Lenny${i})
    same => n,BackgroundDetect(Lenny/backgroundnoise,1500)

This also works. Next I changed the extension name to something more descriptive: ‘lennytalk’.
This I did in the definition above, then I went in to freepbx and modified the references to it (existing custom destination and virtual ext).

Now, when calling the virtual extension, the rercordings play as expected until the first instance of silence detection, at which point the call goes to what sounds like an engaged tone.

I’d like to understand what’s happening. I grep’d the generated asterisk conf for any stray instances of ‘talk’ as opposed to ‘lennytalk’, but seems I had addressed the name change as far as any reference to it in the config.
Does ‘talk’ as an extension name have some other significance?

log of a failing call needed

I don’t seem to have any call detail other than what is in the CEL.

Where’s best to configure logging in order to capture more detail?

For BackgroundDetect, the talk extension is used for when it detects talking based on the options given.

Plays back filename , waiting for interruption from a given digit (the digit must start the beginning of a valid extension, or it will be ignored). During the playback of the file, audio is monitored in the receive direction, and if a period of non-silence which is greater than min ms yet less than max ms is followed by silence for at least sil ms, which occurs during the first analysistime ms, then the audio playback is aborted and processing jumps to the talk extension, if available.

Since you just have BackgroundDetect(Lenny/backgroundnoise,1500) and left the rest to the default, it means that if it receives audio for at least 100 ms (default minimum) up to infinity ms (default max) and that is followed by 1500 ms of silence (your defined setting, means they stopped talking) the playback of backgroundnoise is stopped and the call jumps to the talk extension.

That basically means, when you had the dialplan as your original post as soon as the caller stopped talking or there was audio detected followed by 1500 ms (1.5 seconds) of silence the call looped back to Lenny,talk,1 (context, extension, priority) to repeat itself. When you changed the extension to lennytalk when it detects the talking followed by 1500 ms of silence it can’t jump to the non-existent talk extension. So what you need is something like:

[Lenny]
exten => lennytalk,1,Set(i=${IF($["0${i}"="016"]?7:$[0${i}+1])})
    same => n,ExecIf($[${i}=1]?Playback(custom/ring3))
    same => n,ExecIf($[${i}=1]?MixMonitor(${UNIQUEID}.wav))
    same => n,Playback(Lenny/Lenny${i})
    same => n,BackgroundDetect(Lenny/backgroundnoise,1500)

exten => talk,1,NoOp(Doing something because we detected human talking)

So essentially the BackgroundDetect app expects the jump-to extention name to be ‘talk’, and that cannot be set via a parameter. Many thanks, now I understand what’s happening.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.