Hi everyone,
Let’s suppose that I have a typical Asterisk system which contains local extensions and that also allows external users to phone this extensions from the outside, by dialling a regular phone number (let’s say a DID configured in Asterisk) that is redirected in the dialplan to a IVR that prompts them to dial the desired extension. In other words:
External user dials company DID: XXXXXXXXX
Sound file is played asking for internal number to reach.
User dials extension: YYY
Extension is reached.
This works OK. However, now I want that external users might be able to include the extension number in the initial dialled number, thus reaching that extension directly (no IVR o second dialling step required). I mean:
External user dials: XXXXXXXXXYYY (company number + internal extension)
Asterisk gets the call and connects with extension YYY
The problem that I have found is that I am not able to get the extension number. First I tried checking the value of {EXTEN}, but it only includes the XXXXXXXXX number, not the complete dialled number. I have also tried to use the Read function to no avail (it waits for user input, instead of reading the remaining YYY that are not part of the DID).
Any ideas? I can attach the dialplan if it helps you to better understand the issue.
Best regards