[Asterisk-Dev] chan_skinny and callwaiting

Mark Johnson asteriskdev at astroshapes.com
Thu May 12 18:51:26 MST 2005


I've monkeyed around with this for a few days now and some help.  I have 
chan_skinny working beautifully with around 30 Cisco 7910's using CVS 
Head as of 05/03/05 with a little massaging of the chan_skinny.c code.  
The only problem I am having is with the way callwaiting works.  I 
actually want to disable callwaiting completely, but it seems like the 
callwaiting and DND functions inside chan_skinny are broken.  Here's 
what happen.  I have two phones running skinny, extensions 580 and 581.  
If 580 calls 581, works great.  If someone else calls 581, the phone 
rings while they are the phone, which would be expected with call 
waiting.  Here's where the problems begin.  If I attempt to use the DND 
feature or disable callwaiting, the active call on 581 gets disconnected 
when another user calls that extension.  Inside of the function:

static int skinny_call

there is a section of code:

if (l->dnd) {
                ast_queue_control(ast, AST_CONTROL_BUSY);
                return -1;
}

So I put a section below it that reads:

if (l->hookstate != SKINNY_ONHOOK) {
                ast_queue_control(ast, AST_CONTROL_BUSY);
                return -1;
}

Now, if 581 is offhook, the new caller should get a busy signal, sent to 
voicemail, whatever.  In watching the CLI, the caller does indeed get 
sent to voicemail, but asterisk then sends the skinny module a hangup 
request for extension 581!!!  I wouldn't expect this to be the 
behavior.  I discovered that monkeying with the function "skinny_hangup" 
is not the answer.  I can trick it into not hanging up the channel, but 
* notices this and shows a warning that the call may not have been hung 
up properly.  It then segfaults after a few more calls.

My question is, am I on the right track?  Am I supposed to make the DND 
and callwaiting decisions inside skinny_call?  If so, how do I instruct 
* to notifiy the caller that the extension is busy and NOT hang up the 
active call?  I looked through other modules code and they all seem to 
do this in a similiar fashion.  Any ideas?

Thanks!

Mark



More information about the asterisk-dev mailing list