diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-15 20:56:06 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-15 20:56:06 +0000 |
commit | 6a2cecd06c08f9709ad1f6b00b7a3a3df94cee78 (patch) | |
tree | a801fd2c3cdc95ff9a4174bc12e1c3237fe120b4 /channels/h323 | |
parent | 9af3a68d8798cb0282395503d60c4bb5b799fc5d (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@3220 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rwxr-xr-x | channels/h323/ast_h323.cpp | 7 | ||||
-rwxr-xr-x | channels/h323/chan_h323.h | 6 |
2 files changed, 11 insertions, 2 deletions
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; } /** diff --git a/channels/h323/chan_h323.h b/channels/h323/chan_h323.h index 198247cc0..23e583f89 100755 --- a/channels/h323/chan_h323.h +++ b/channels/h323/chan_h323.h @@ -153,6 +153,9 @@ con_established_cb on_connection_established; typedef void (*clear_con_cb)(call_details_t); clear_con_cb on_connection_cleared; +typedef int (*answer_call_cb)(unsigned); +answer_call_cb on_answer_call; + /* debug flag */ int h323debug; @@ -178,7 +181,8 @@ extern "C" { clear_con_cb, chan_ringing_cb, con_established_cb, - send_digit_cb); + send_digit_cb, + answer_call_cb); int h323_set_capability(int, int); |