Hi, I inherited an existing system for a new client, and they are wanting to make some changes. They have multiple DID’s in the system, and need to play a certain message based on the number dialed. They have a bunch of different DIDs in different areas, and rather than have to keep modifying the call flow everytime, figured it’d be easier to use variables. We’re still waiting for credentials and access, but figured, I’d start working on this
This is what I was thinking of doing: (#included from extensions.conf)
exten => 55305,1,Answer
same => n,AGI(cmp-weather-v2.php,“KMIA”)
same => n,Playback(/var/lib/asterisk/sounds/weather/KMIA-weather)
same => n,Playback(/var/lib/asterisk/sounds/KMIA-status)
same => n,Playback(/var/lib/asterisk/sounds/en/goodbye)
same => n,Hangup
exten => 55954,1,Answer
same => n,AGI(cmp-weather-v2.php,“KFLL”)
same => n,Playback(/var/lib/asterisk/sounds/weather/KFLL-weather)
same => n,Playback(/var/lib/asterisk/sounds/KFLL-status)
same => n,Playback(/var/lib/asterisk/sounds/en/goodbye)
same => n,Hangup
exten => 55999,1,NoOp(Here we go)
same => n,Playback(/var/lib/asterisk/sounds/companygreeting)
same => n,Goto(${CALLERID(dnid):-7})
same => n(305),Goto(55305,1)
same => n(954),Goto(55954,1)
same => n,NoOp(No match)
same => n,Playback(/var/lib/asterisk/sounds/en/goodbye)
same => n,Hangup
Would this work?