John Vogel wrote:
>
> I upgraded to the latest stable version of 1.0 today and am still
> seeing the *8 problem where the phone that was originally dialed keeps
> on ringing even after another phone picks up.
>
> Are other people also seeing this? Has somebody figured out how to
> make this go away?
>
> Thanks!
>
As for version 0.9 the problem is still there and after 4 days deciphering the
sip channel code and trying to understand de masquerade an zombie magic Asterisk
does with channels in call pickup, and some
# ngrep SIP port 5060
in the Asterisk box I'm sure it is still a bug on Asterisk and not
Grandstream's bug (they have many others).
I have tried with other hardware too (Ovislink VOIP800 sip gateway, kphone) and
the problem is the same.
99% of the times Asterisk never sends a CANCEL (or anything else) to the first
called phone after it gets the INVITE(*8) from the second one.
It seems to me like a race condition or something like that on different threads
after the masquerading of the channels. It seems like most of the time the old
channel is destroyed before it get the chance to send a CANCEL.
The problem is most of this happens outside sip channel:
*****
** in
./res/res_parking.c: int ast_pickup_call(ast_channel*)
it searches the ringing channels and masquerades this one
into the picking channel
** in
./channel.c:int ast_channel_masquerade(ast_channel*, ast_channel*) //ugly!!
*****
so it is not easy (to me) to fix it being sure you are not breaking something
else.
I thought in defining a new function like
ast_channel *orig ast_get_pickup_channel(ast_channel *chan)
using the code on first part of ast_pickup_call() to get the channel we need to
sent the CANCEL from inside chan-sip.c before doing the ast_pickup_call() call,
but it is very dirty and I don't want to change channel.c if it's
posible.
Most of the time, after the masquerade the original channel is destroyed or
'zombied' or something else (in a different thread?) before it gets to
hangup (I saw it using ast_log(LOG_DEBUG,...) in many places)
I don't know if it's fixed in the latest CVS , It was not fixed around
one month ago.
I tried to fix it, I spent 4 days but It was too dark for me
(anyway I learned a lot about sip channel so It wasn't wasted time )
If anyone knows by sure It is fixed or how to fix it, I will be very happy and I
will thanks him a lot if he says exactly where (cvs date) and/or how (a diff
with 0.9 or 1.0??).
(by now I'm using asterisk in a production environment and is not so easy to
do testings like this)
To people how keep seeing it is fixed, please don't say it is fixed (it only
builds on your ego); if you know say how to fix it (or how it was fixed)!
Of course all the callgruoup and pickupgroup stuff is n-checked (with
n\to\infty).
Thanks!
Luis