A
A
Andrey Korekhov2021-05-14 08:56:07
Asterisk
Andrey Korekhov, 2021-05-14 08:56:07

Why doesn't call transfer always work in Asterisk?

Task:
In the office, you need to set up call forwarding to a mobile phone if the subscriber does not pick up the phone for too long - he went to bypass and so on.

My implementation:

same => n,Dial(SIP/${EXTEN},30)
same => n,Dial(IAX2/rset/8920**********,30,Tt)


Problem:
Redirection does not always work.
For most calls, everything is normal - 30 seconds and the mobile phone starts ringing.
But sometimes - the call comes back.
those. The phone stops ringing, takes a couple of seconds and starts again.

Can anyone suggest which way to dig?
It is better not to offer service codes for translation. the subscriber leaves the workplace often and not for long

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2021-05-14
@Haotik

This is how I do it, after 30 seconds both phones will start ringing.

[out-call-wait]
exten => _X.,1,Verbose(----Wait-before-Forward-to-mobile---)
 same => n,NoCDR()
 same => n,Wait(30)
 same => n,Dial(SIP/trunk/${EXTEN},120,tT)
 same => n,HangUp()
 
[out-call]
exten => _XXX,1,Noop(----------------Internal-call----------------)
 same => n,Set(EXTEN_MOBILE=380674444444)
 same => n,Dial(SIP/${EXTEN}&Local/${EXTEN_MOBILE}@out-call-wait/n,120,rTt)
 same => n,HangUp()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question