diff options
author | Steve Murphy <murf@digium.com> | 2007-11-16 18:59:02 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-11-16 18:59:02 +0000 |
commit | 542f29ea0e2a65d2ef4d710e2082692b8d7b3f7b (patch) | |
tree | 5898f0e4aed424e864baeb08787a6bf3ef357e65 /res/res_features.c | |
parent | f8b60a665e3f940c4b4ac25fa49fc8a46a3f5f3a (diff) |
This fixes a problem with pattern ranges; and corrects a situation in res_features, where an extension would be created with the name Zap/51, as an example. THe / is bad because it would tend to mean that the 51 is to be cid matched.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c index 5e1d3523f..34c5661c0 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -2104,8 +2104,15 @@ static void *do_parking_thread(void *ignore) } if (con) { char returnexten[AST_MAX_EXTENSION]; + char peername_flat[AST_MAX_EXTENSION]; /* using something like Zap/52 for an extension name is NOT a good idea */ + int i; + ast_copy_string(peername_flat,peername,sizeof(peername_flat)); + for(i=0; peername_flat[i] && i < AST_MAX_EXTENSION; i++) { + if (peername_flat[i] == '/') + peername_flat[i]= '0'; + } snprintf(returnexten, sizeof(returnexten), "%s,,t", peername); - ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free_ptr, registrar); + ast_add_extension2(con, 1, peername_flat, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free_ptr, registrar); } if (comebacktoorigin) { set_c_e_p(chan, parking_con_dial, peername, 1); |