Hi All
I’m after some advice for setting up redirection of inbound calls. I’ve got two Asterisk servers, and a number of DID’s through an upstream provider. I’m determining the called number from the SIP headers, and sending to the appropriate extensions using (essentially) the Dial() command.
What I’d like to do now is receive calls and on the first asterisk server, and redirect some of the DID’s to the second server, based on the callerID.
So what I have at the moment is (in extensions.conf) something like:
exten => _1415923107[78],1,NoOp(Main office line)
same => n,Dial(SIP/100,30)
same => n,Voicemail(reception@mainoffice,su)
same => n, Hangup.
What I would like to do is send the extension ending in 8 to the second server, ideally without the first server being in the media path. I could just use dial, i.e.:
exten => _14159231078,1,NoOp(Second office line)
same => n,Dial(SIP/server2/${EXTEN},30)
same => n,Voicemail(reception@mainoffice,su)
same => n, Hangup.
Which would send the call to the same extension number on the second server, but I tried using Transfer() instead:
exten => _14159231078,1,NoOp(Main office line)
same => n,Transfer(SIP/server2/${EXTEN})
But that doesn’t seem to be the sort of thing Transfer() is used for. Can anyone advise what’s the best strategy for simple call redirection/distribution like this?
Thanks in advance,
Mark