Avaya VM Pro modules in Freepbx

Good afternoon everyone!
I am looking to move our call center from Avaya to free pbx.
For every DID we have a dedicate Voicemail Module that, based on different time conditions, plays different wavs to then go to a queue.

I give you a current scenario currently on Avaya.

Incoming DID --> VM:2802GR (Voicemail Module called 2802GR)
First check is a time condition called Florida

1 Match --> Plays Florida.wav then I need it to play 2802 closed
2 No match then second time condition: 2802

2802
1 match --> 2802 lunch then queue
2 no match --> 2802 closed then queue

My first question is:
if a ā€˜Floridaā€™ condition is met and the Florida.wav is playedā€¦ how can I then go back to and play 2802?

Considering I have 350 different modules I was hoping to use only 1 Florida.wav for every module

Hope this makes sense.

This looks like something that youā€™d want to write to pull data from a database (ASTDB being a likely victim) and route your calls appropriately. There have been a couple of custom contexts written in the past couple of years for other places with hundreds of DIDs. Iā€™m sure one of them will do the trick.

Basically, your context would track the inbound DID, store the extension, and play whatever you want to preface the drop into VM with. By driving it in data, you minimize the amount of code and improve the scalability.

Thank you Dave,
not what I was hoping.
Leaving VM aside (I think Avaya cold be confusing as the IVRs are set on VM pro) , is there a way to play a wav (florida.wav) and then go back to the another recording?

As far as I understood, you want the following:

All or multiple DIDs should play florida.wav if a specific time condition is true and then go their respective call flow. Is that correct?

If so, then it should be very easy to do with a little custom context.

If all DIDs, then just set the incoming Trunk context to your custom dialplan, check if said time condition is true and play them florida.wav, and finally goto the official incoming trunk context.

However, if you want to play it not on every DID then youā€™ll need some record somewhere that the dialplan can look up and make a decision based on that.

Thatā€™s the easy way around it.

The hard way, would be to create all these records in the GUI.
Luckily, Inbound Routes can be imported via a CSV. So that makes things a little easier.

Thank you Pitzkey.
A bunch to Florida.wav, another bunch to Texas and so onā€¦
I will check the option but seeing how new I am to this it might take me a whileā€¦
Do you know of any tutorials I could check out?

Any help on this please?

Hi Dave,
are you able to point me in the right direction to get these custom context ?
Please and thank you

[from-florida-trunk]
exten=> _X.,1,Set(DID=${EXTEN})
exten=> _X.,n,Playback(custom/florida)
exten=> _X.,n,Goto(from-trunk,s,1)

I havenā€™t tested it, but something like that might work. Point your inbound route to that and it will break out the inbounds by DID while playing your custom wave file for everyone. The third line could be replaced with a jump to an IVR or something similar.

1 Like

Thank you Dave, will check it out

not sureā€¦
hereā€™s what I have:
Inbound route --> 2801h (Time Condition)
2801h matches --> Announcements --> Global_Holiday
no match --> 2801time
2801time matches -->2801 day --> 5005 queue
no match --> 2801 night --> 5005 queue

Global_holiday
after play --> 2801night

For every other scenario when Global_Holiday plays needs to go back to whichever the CID was ā€¦ so 2801night in this caseā€¦ 2802 night and so on

hope this makes sense, and I thank you

if Global_Holiday plays then

Iā€™m not going to write the whole thing for you: FreePBX is supposed to be self-serve, but that should give you some hints on how to handle the ā€œbranch then branch backā€ logic you are describing. Put this code into a Misc Destination, and you can use it as the target of any one of the routing components in the system.

1 Like

Thank you Dave, will work on this

Cool. Let us know how you are progressing.

Getting somewhereā€¦
[from-florida-trunk]

exten=> _X.,n,Playback(custom/${CID}c)

the idea is to go to (After the florida wav) the DID CID which is a 4 digits number and the letter.
so in this case after playing the florida greeting it needs to call the 1234c wav file. 1234 is the DDIā€™s CID . hope it makes sense

1 Like

exten=> _X.,n,Playback(custom/${CALLERID(name)})

the CID in the incoming route is the CALLERID(name) for me is a 4 digits
All wavs and announcements start with 4 digits and a letterā€¦

so to play close I use 1234c

Iā€™d like to use the variable followed by the letterā€¦
exten=> _X.,n,Playback(custom/${CALLERID(name):c})
can anyone help me to get this right?

thank you

Not normally - usually, the CALLERID{name} is the actual name from the Caller ID sent by the provider. I think youā€™re looking for something like (check the syntax, Iā€™m working without a net) ${CALLERID(number):6:4}, which will give you the last 4 digits of the DID in a 10 digit North American number without the ā€˜1ā€™ or a ā€˜+ā€™. You can use more code to normalize the number even more. Adding the ā€˜cā€™ to it (IIRC) is as simple as ā€œ${CALLERID(number):6:4}cā€

And if your CallerID(number) is sometime 10 and sometime eleven then ${CallerID(number):-4}c should always get the "last four digits +c "

1 Like

Thank you, but I donā€™t think is the CALLERID(name) I needā€¦
the CID is what I use in the incoming route but I am not sure the variable worksā€¦
in the extensions_custom.conf I have 1 custom context I use on the trunk to eliminate the 1 before the number (and this works fine)

then I have
[from-pst-custom]
exten=> _X.,n,Playback(custom/${CID}c)

the CID is always 4 digits and when presented it shows with a # at the end
tried the above with both # and withoutā€¦

call cannot be completed.

the incoming route is pointed to from-pst-custom

Any assistance?
I wonder if I could engage someone to set a couple of things for me and get it going ā€¦
Any suggestions on where to look?

Getting somewhereā€¦
Line 6492: AppData: prepend-cid,2803
Line 6501: ā€“ Executing [s@macro-prepend-cid:5] Set(ā€œSIP/callcentric18-0000014eā€, ā€œ_RGPREFIX=2803ā€) in new stack
Line 6505: ā€“ Executing [s@macro-prepend-cid:6] Set(ā€œSIP/callcentric18-0000014eā€, ā€œCALLERID(name)=2803#ā€) in new stack
Line 6621: AppData: prepend-cid,2803
Line 6726: Value: 2803
Line 6833: AppData: _RGPREFIX=2803
Line 6854: Value: 2803
Line 6918: AppData: CALLERID(name)=2803#**
**
2803 is what I have in the CID and then I use # instead of the caller name.

For the custom context , I need to use the value 2803 as part of my file name

(for example: custom/2803c

same => n,Playback(custom/???c) to play 2803c

donā€™t know what to use here :confused: