summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-04-22 18:04:39 +0000
committerRussell Bryant <russell@russellbryant.com>2008-04-22 18:04:39 +0000
commit580cb27eecf0dad9198df826929d863cce126ba1 (patch)
tree2af0b87e9e81a82eb370b90a95d81f48d690df4d
parent01f3a08f8a45b7e5bdcf185207a16335f02fd19a (diff)
Merged revisions 114537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114537 | russell | 2008-04-22 13:03:33 -0500 (Tue, 22 Apr 2008) | 9 lines 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/trunk@114538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_iax2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index c11fa1cd7..8f41f69b7 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -3397,8 +3397,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);