static void lcr_in_setup(struct chan_call *call, int message_type, union parameter *param)
{
struct ast_channel *ast;
+#ifdef AST_1_8_OR_HIGHER
struct ast_party_redirecting *ast_redir;
struct ast_party_caller *ast_caller;
+#else
+ struct ast_callerid *ast_caller;
+#endif
#if ASTERISK_VERSION_NUM >= 110000
struct ast_party_redirecting s_ast_redir;
struct ast_party_caller s_ast_caller;
#endif
#if ASTERISK_VERSION_NUM < 110000
+#ifdef AST_1_8_OR_HIGHER
ast_redir = &ast->redirecting;
ast_caller = &ast->caller;
#else
+ ast_caller = &ast->cid;
+#endif
+#else
ast_redir = &s_ast_redir;
ast_caller = &s_ast_caller;
#endif
char exten[256], *dial, *interface, *opt;
struct ast_channel *ast;
struct chan_call *call;
+#ifdef AST_1_8_OR_HIGHER
const struct ast_party_redirecting *req_redir;
const struct ast_party_caller *req_caller;
+#endif
ast_mutex_lock(&chan_lock);
CDEBUG(NULL, NULL, "Received request from Asterisk. (data=%s)\n", (char *)data);
#if ASTERISK_VERSION_NUM < 110000
ast->tech = &lcr_tech;
ast->tech_pvt = (void *)1L; // set pointer or asterisk will not call
+#ifdef AST_1_8_OR_HIGHER
req_redir = &requestor->redirecting;
req_caller = &requestor->caller;
+#endif
#else
ast_channel_tech_set(ast, &lcr_tech);
ast_channel_tech_pvt_set(ast, (void *)1L); // set pointer or asterisk will not call
#else
call = ast_channel_tech_pvt(ast);
#endif
- if (!call) {
+ if (!call || !call->ref) {
ast_mutex_unlock(&chan_lock);
if (f != fr) {
ast_frfree(f);
struct ast_frame *f;
int bridge_id;
+/* bridge is disabled, because there is currerntly no concept to bridge mISDN channels */
+return AST_BRIDGE_FAILED;
+
CDEBUG(NULL, NULL, "Received bridging request from Asterisk.\n");
carr[0] = ast1;
/* get bridge id and join */
bridge_id = new_bridge_id();
-#if 0
call1->bridge_id = bridge_id;
- if (call1->bchannel)
- bchannel_join(call1->bchannel, bridge_id);
-
call2->bridge_id = bridge_id;
- if (call2->bchannel)
- bchannel_join(call2->bchannel, bridge_id);
-#else
- printf("FIXME");
- exit(0);
-#endif
+ // FIXME: do bridiging
+ // bchannel_join(call1->bchannel, bridge_id);
+ // bchannel_join(call2->bchannel, bridge_id);
call1->bridge_call = call2;
call2->bridge_call = call1;