diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 8c28003a0a..7c71f33ad2 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -3126,8 +3126,12 @@ static int iax2_call(struct ast_channel *c, char *dest, int timeout) return -1; } - if (!pds.exten) - pds.exten = defaultrdest; + if (!pds.exten) { + if (!ast_strlen_zero(c->exten)) + pds.exten = c->exten; + else + pds.exten = defaultrdest; + } if (create_addr(pds.peer, c, &sin, &cai)) { ast_log(LOG_WARNING, "No address associated with '%s'\n", pds.peer);