From: Russell Bryant Date: Tue, 22 Apr 2008 18:03:33 +0000 (+0000) Subject: If the dial string passed to the call channel callback does not indicate an X-Git-Tag: 1.4.20-rc1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f59f5491db19d083d954eb37d754e49dcedf0d3;p=thirdparty%2Fasterisk.git If the dial string passed to the call channel callback does not indicate an extension, then consider the extension on the channel before falling back to the default. (closes issue #12479) Reported by: darren1713 Patches: exten_dial_fix_chan_iax2.c.patch uploaded by darren1713 (license 116) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114537 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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);