[asterisk-users] After call into console/dsp hangup hear ringing

Jerry Geis geisj at pagestation.com
Sun Oct 4 15:28:16 CDT 2009


Looking at the function below in chan_alsa.c shouldnt't the variable
hookstate be set to 1 for auto answer??? I think this is affecting the 
ringing I hear after the call.

Jerry

static int alsa_call(struct ast_channel *c, char *dest, int timeout)
{
        int res = 3;
        struct ast_frame f = { AST_FRAME_CONTROL };
        ast_mutex_lock(&alsalock);
        ast_verbose(" << Call placed to '%s' on console >> \n", dest);
        if (autoanswer) {
                ast_verbose(" << Auto-answered >> \n");
                grab_owner();
                if (alsa.owner) {
                        f.subclass = AST_CONTROL_ANSWER;
                        ast_queue_frame(alsa.owner, &f);
                        ast_mutex_unlock(&alsa.owner->lock);
                }
        } else {
                ast_verbose(" << Type 'answer' to answer, or use 
'autoanswer' for future calls >> \n");
                grab_owner();
                if (alsa.owner) {
                        f.subclass = AST_CONTROL_RINGING;
                        ast_queue_frame(alsa.owner, &f);
                        ast_mutex_unlock(&alsa.owner->lock);
                }
                if (write(sndcmd[1], &res, sizeof(res)) < 0) {




More information about the asterisk-users mailing list