From 1f4eadaf6a4840773cb44aa9be4ded233b72540f Mon Sep 17 00:00:00 2001 From: Jeremy McNamara Date: Tue, 15 Jun 2004 20:56:06 +0000 Subject: check to make sure the extension exists b4 actually accepting the call and lets hope this gives Open H.323 enough time to sync up (bug #1714) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3220 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/h323/ast_h323.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'channels/h323/ast_h323.cpp') diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp index cb78730af..e1d396999 100755 --- a/channels/h323/ast_h323.cpp +++ b/channels/h323/ast_h323.cpp @@ -489,6 +489,9 @@ H323Connection::AnswerCallResponse MyH323Connection::OnAnswerCall(const PString const H323SignalPDU & /*setupPDU*/, H323SignalPDU & /*connectPDU*/) { + if (!on_answer_call(GetCallReference())) + return H323Connection::AnswerCallDenied; + /* The call will be answered later with "AnsweringCall()" function. */ return H323Connection::AnswerCallDeferred; @@ -835,7 +838,8 @@ void h323_callback_register(setup_incoming_cb ifunc, clear_con_cb clfunc, chan_ringing_cb rfunc, con_established_cb efunc, - send_digit_cb dfunc) + send_digit_cb dfunc, + answer_call_cb acfunc) { on_incoming_call = ifunc; on_outgoing_call = sfunc; @@ -845,6 +849,7 @@ void h323_callback_register(setup_incoming_cb ifunc, on_chan_ringing = rfunc; on_connection_established = efunc; on_send_digit = dfunc; + on_answer_call = acfunc; } /** -- cgit v1.2.3