X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=chan_lcr.c;h=735e4e749d915b3a26289a255fa3b1afd2651ccc;hp=22785100d94b42926d1e35d8f8bab3a54f88f475;hb=2bdb5135a30caebb75cb55663938cc453a445016;hpb=19f537c691dad205142482e9a7a1ba72153f5c07 diff --git a/chan_lcr.c b/chan_lcr.c index 2278510..735e4e7 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -646,8 +646,6 @@ static void send_setup_to_lcr(struct chan_call *call) strncpy(newparam.setup.dialinginfo.keypad, call->dialstring, sizeof(newparam.setup.dialinginfo.keypad)-1); else strncpy(newparam.setup.dialinginfo.id, call->dialstring, sizeof(newparam.setup.dialinginfo.id)-1); - if (!!strcmp(call->interface, "pbx")) - strncpy(newparam.setup.dialinginfo.interfaces, call->interface, sizeof(newparam.setup.dialinginfo.interfaces)-1); newparam.setup.callerinfo.itype = INFO_ITYPE_CHAN; newparam.setup.callerinfo.ntype = INFO_NTYPE_UNKNOWN; strncpy(newparam.setup.callerinfo.display, call->display, sizeof(newparam.setup.callerinfo.display)-1); @@ -1002,8 +1000,8 @@ static void lcr_in_setup(struct chan_call *call, int message_type, union paramet strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1); #else ast_channel_exten_set(ast, param->setup.dialinginfo.id); - if (param->setup.context[0]) - ast_channel_context_set(ast, param->setup.context); + if (param->setup.dialinginfo.context[0]) + ast_channel_context_set(ast, param->setup.dialinginfo.context); else ast_channel_context_set(ast, param->setup.callerinfo.interface); #endif @@ -2425,6 +2423,7 @@ static int lcr_call(struct ast_channel *ast, char *dest, int timeout) /* send MESSAGE_NEWREF */ memset(&newparam, 0, sizeof(union parameter)); newparam.newref.direction = 0; /* request from app */ + strncpy(newparam.newref.interface, call->interface, sizeof(newparam.newref.interface) - 1); send_message(MESSAGE_NEWREF, 0, &newparam); /* set hdlc if capability requires hdlc */