diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-22 18:03:33 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-22 18:03:33 +0000 |
commit | dc804c0352609ad8cdefda06a6880d537cf14904 (patch) | |
tree | 8cf2646e03a3cff897090f1b07ba15ebeb78b633 /channels | |
parent | cc4017b46708fb733db20381686221a3a00286cf (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@114537 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 8c28003a0..7c71f33ad 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); |