Call transfer to cell phone?

I setup asterisk to forward a call to a mobile number after a few rings:

exten => 2,1,Answer
exten => 2,2,Dial(SIP/jonathan,12)
exten => 2,3,Dial(IAX2/teliax/17185551212,20)
exten => 2,4,Hangup

Now lets say I want the call to go to the cell phone, following the phone numer in line 3, should I set this value to be extremly high? If i set it as a low value, will the call get dropped after that timer is up?

Peter Borghard

The way that the dial command works is as follows.

Dial the extension you specify, let the line ring for a maximum of timeout seconds. If there is no answer, the line is busy, the line is congested, or there is any other problem dialing the line the dial command will set ‘DIALSTATUS’ the status listed on this page.

So in your example it will ring the first extension, SIP/jonathan for 12 seconds. If the line is not answered in that time for any reason, your example will go to the next line in the dial plan. In your example, that will dial IAX2/teliax/17… for 20 seconds. If this doesn’t answer, then per your last instruction the call hangs up.

You probably should have the second dial statement ring for a longer time. each ring takes about 5 seconds, so 15 seconds three rings, 20 seconds 4 rings, etc… As long as it rings long enough for your cell phone’s voice mail to answer, then you are probably ok.