user1222905
user1222905

Reputation: 519

asterisk redirect calls is it possible

I have 2 sip phone numbers: sip1 and sip2. If someone calls me on sip1 and I am not online I would like to redirect the call on sip2. How to configure this in extensions.conf?

exten => sip1,1,Dial(SIP/sip1,20,tr)
exten => sip1,2,Voicemail()
exten => sip1,3,Hangup()

How to change the extensions.conf file in order to make the redirect call in case the client is not online. If the client is online and he doesn;t answer I want the call to go into voicemail. In case he is not online the call will be redirect to the second phone number.

Need some advice. Appreciate!

Upvotes: 2

Views: 6878

Answers (1)

arheops
arheops

Reputation: 15259

You have samples in sample config file,why you not read that?

Here is how it have look like

[main]
exten => _sip1,1,Dial(SIP/sip1,20)                          ; Ring the interface, 20 seconds maximum
exten => _sip1,n,Goto(checkstatus-sip1,${DIALSTATUS},1)           ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
[checkstatus-sip1]
exten => NOANSWER,1,Goto(main,sip2,1)        ; If unavailable, send to voicemail w/ unavail announce
exten => BUSY,1,Voicemail(${mbx},b)            ; If busy, send to voicemail w/ busy announce
exten => _.,1,Goto(BUSY,1);if other

Upvotes: 1

Related Questions