diff options
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r-- | channels/chan_oss.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c index aea48730f..b2776850d 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -602,7 +602,11 @@ static int oss_call(struct ast_channel *c, char *dest, int timeout) AST_NONSTANDARD_APP_ARGS(args, parse, '/'); ast_verbose(" << Call to device '%s' dnid '%s' rdnis '%s' on console from '%s' <%s> >>\n", - dest, c->cid.cid_dnid, c->redirecting.from.number, c->cid.cid_name, c->cid.cid_num); + dest, + S_OR(c->dialed.number.str, ""), + S_COR(c->redirecting.from.number.valid, c->redirecting.from.number.str, ""), + S_COR(c->caller.id.name.valid, c->caller.id.name.str, ""), + S_COR(c->caller.id.number.valid, c->caller.id.number.str, "")); if (!ast_strlen_zero(args.flags) && strcasecmp(args.flags, "answer") == 0) { f.subclass.integer = AST_CONTROL_ANSWER; ast_queue_frame(c, &f); @@ -803,9 +807,10 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, ast_string_field_set(c, language, o->language); /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ - c->cid.cid_ani = ast_strdup(o->cid_num); - if (!ast_strlen_zero(ext)) - c->cid.cid_dnid = ast_strdup(ext); + c->caller.ani = ast_strdup(o->cid_num); + if (!ast_strlen_zero(ext)) { + c->dialed.number.str = ast_strdup(ext); + } o->owner = c; ast_module_ref(ast_module_info->self); @@ -1181,9 +1186,10 @@ static char *console_transfer(struct ast_cli_entry *e, int cmd, struct ast_cli_a tmp = ast_ext_ctx(a->argv[2], &ext, &ctx); if (ctx == NULL) /* supply default context if needed */ ctx = o->owner->context; - if (!ast_exists_extension(b, ctx, ext, 1, b->cid.cid_num)) + if (!ast_exists_extension(b, ctx, ext, 1, + S_COR(b->caller.id.number.valid, b->caller.id.number.str, NULL))) { ast_cli(a->fd, "No such extension exists\n"); - else { + } else { ast_cli(a->fd, "Whee, transferring %s to %s@%s.\n", b->name, ext, ctx); if (ast_async_goto(b, ctx, ext, 1)) ast_cli(a->fd, "Failed to transfer :(\n"); |