]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_page.c: Fix crash when forwarding with a predial handler. 01/1301/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:32:18 +0000 (17:32 -0500)
commit86eee104beebba4468791a2a15b78abc27f3f93a
tree23e7cc4168dba8d40c151378b172a5eb3044a938
parentdeccd2ef3c673cf8664cbf4504cee706cfc87576
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