[Asterisk-Dev] Patch to allow Dial() to ignore call forward

John Lange john.lange at open-it.ca
Tue Nov 8 10:57:35 MST 2005


When dialing a group of phones it is often desirable to have Asterisk
ignore any "302 Redirect" requests it might receive.

For example: after hours a business may want the general number to ring
multiple extensions so that anyone thats still around can answer it.
However, one of those people may have set their phone to call-forward to
their voicemail or cell phone.

The following patch applies against 1.0.9 and adds another option to the
Dial command.

"i" tells asterisk to ignore any 302 Redirects and continue on dialing
the rest of the extensions.

Brief example: phone at 2000 is set to forward.

extensions.conf:

exten => 2000,1,Dial(SIP/2000&SIP/2002,20,i)

CLI output:

    -- Executing Dial("SIP/2001-eece", "SIP/2000&SIP/2002|20|i") in new stack
    -- Called 2000
    -- Called 2002
    -- SIP/2002-d46a is ringing
    -- Got SIP response 302 "Moved Temporarily" back from 192.168.1.101
    -- Now forwarding SIP/2001-eece to 'Local/8850872 at from-sip' (thanks to SIP/2000-d08d)
    -- Forwarding SIP/2001-eece to 'Local/8850872 at from-sip' prevented by dial option 'i'
Nov  8 11:34:19 NOTICE[27509]: app_dial.c:240 wait_for_answer: Unable to create local channel for call forward to 'Local/8850872 at from-sip'
  == Spawn extension (from-sip, 2000, 1) exited non-zero on 'SIP/2001-eece'

-- 
John Lange
OpenIT ltd. www.Open-IT.ca (204) 885 0872
VoIP, Web services, Linux Consulting, Server Co-Location
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asterisk_allowcallforward.patch
Type: text/x-patch
Size: 3253 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20051108/9d849663/asterisk_allowcallforward.bin


More information about the asterisk-dev mailing list