by comfine » Thu Jan 14, 2016 3:48 am
for handling "inbound route" for multiple numbers we always write a couple of lines to extensions_custom.conf
for example:
[from-trunk]
exten => s,1,Ringing
exten => s,n,Answer(1000)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/welcome)
exten => s,n,Set(thedid=${CALLERID(dnid)})
exten => s,n,Set(DIAL_OPTIONS=m)
exten => s,n,Goto(from-internal,${thedid:-2},1)
this code will answer the line, playback some welcomemessage, and then the last two numbers of the called number will be cut out and used as dial for the internal extension, while the caller hears some music meanwhile....
if you dial 01234-110 it will redirect the call to extension 10
if you dial 01234-120 it will redirect the call to extension 20
if you dial 01234-144 it will redirect the call to extension 44
i don't know if there's a more comfortable way in freepbx - i never found one....
the trunk-settings depends on the provider. in most cases you have to fill-out the registration-field in freepbx!