app_originate: Set ORIGINATE_STATUS correctly on failure
authorSean Bright <sean.bright@gmail.com>
Tue, 10 Oct 2017 17:01:05 +0000 (13:01 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 10 Oct 2017 17:32:25 +0000 (12:32 -0500)
commit3ad7d2f36ca155e6ee823a48175e5951829e1a20
tree5d5a2fc97d62374ebc8077645f62ba683d88db4c
parent6fc222a1d214dfc5d252b869f138a90092faf3de
app_originate: Set ORIGINATE_STATUS correctly on failure

We were ignoring the return value from ast_pbx_outgoing_exten() and
ast_pbx_outgoing_app() which could fail before setting the reason code.
This resulted in failures being reported as success.

ASTERISK-25266 #close
Reported by: Allen Ford

Change-Id: Idf16237b7e41b527d2c69c865829128686beeb3b
apps/app_originate.c