]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_page.c: Fix crash when forwarding with a predial handler. 99/1299/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 22 Sep 2015 22:08:49 +0000 (17:08 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 22 Sep 2015 22:09:19 +0000 (17:09 -0500)
commit5f15cd93f0b2cb622d54061515b815e3ebbe76b1
tree6092f3bc33890bdf11948c1dab5e684ffcdbb795
parent3502c0431db52d00eb16dc1cc2462be7a509ba5e
app_page.c: Fix crash when forwarding with a predial handler.

Page uses the async method of dialing with the dial API.  When a call gets
forwarded there is no calling channel available.  If the predial handler
was set then the calling channel could not be put into auto-service
for the forwarded call because it doesn't exist.  A crash is the result.

* Moved the callee predial parameter string processing to before the
string is passed to the dial API rather than having the dial API do it.
There are a few benefits do doing this.  The first is the predial
parameter string processing doesn't need to be done for each channel
called by the dial API.  The second is in async mode and the forwarded
channel is to have the predial handler executed on it then the
non-existent calling channel does not need to be present to process the
predial parameter string.

* Don't start auto-service on a non-existent calling channel to execute
the predial handler when the dial API is in async mode and forwarding a
call.

ASTERISK-25384 #close
Reported by: Chet Stevens

Change-Id: If53892b286d29f6cf955e2545b03dcffa2610981
apps/app_page.c
main/dial.c