Only set clear mode on PRI
authorMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 00:35:52 +0000 (00:35 +0000)
committerMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 00:35:52 +0000 (00:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@693 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 3be4ddc..56dc9e9 100755 (executable)
@@ -1440,8 +1440,10 @@ static int zt_hangup(struct ast_channel *ast)
        
        index = zt_get_index(ast, p, 1);
 
        
        index = zt_get_index(ast, p, 1);
 
-       x = 1;
-       ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
+       if (p->sig == SIG_PRI) {
+               x = 1;
+               ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
+       }
 
        restore_gains(p);
        
 
        restore_gains(p);