[Home]

Summary:ASTERISK-09550: Bye authorization working only one way.
Reporter:Mindaugas (absa)Labels:
Date Opened:2007-05-30 13:47:08Date Closed:2011-06-07 14:02:51
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 403-history.txt
( 1) absa.patch
( 2) bug.png
( 3) bug.txt
( 4) debug-nobug-incomingcall.txt
( 5) debug-withbug.txt
( 6) nobug.png
( 7) nobug.txt
Description:When hanging up calls, one side is always left hanging with no sound signal and call doesn't end for the receiver.
There are two scenarios and in one bug always occurs, and in opposite scenario BYE authorizes as it should.

(->) indicates call route.

First Scenarion, incoming call (works ok):
Caller -> [SIP_provider_with_auth] -> asterisk -> SIPphone (makes the hangup).

Second scenarion, outgoing call (with bug):
Receiver <- [SIP_provider_with_auth] <- asterisk <- SIPphone (makes the hangup).

In both scenarios SIP provider gets BYE request, sends 401 Unauthorized, in first scenarion receives authentication, and in second scenario doesn't receive authentication on BYE request and leaves the call hanging at SIP registrars side. Also in both scenarios hanging up is made with the SIP phone, that is peered  with asterisk.

I think this bug is the same or related to: http://bugs.digium.com/view.php?id=9681

I have tried it with 1.2.18 clean compiled from source with no patches, and with  SVN-branch-1.2-r66537M, in both cases bug exists.
Comments:By: Curt Moore (jcmoore) 2007-05-30 22:26:27

This is probably related to a few other of the hung SIP channel bugs that are currently in the process of being worked but we'd better do some tests to see for sure.

As an additional test, could you perform your scenario again where the BYE becomes hung and then do a "sip show channels" to see exactly which channels are hung?  You will then need to issue a "sip show history <Call-ID>" where <Call-ID> is the SIP Call-ID of the hung call.  You can enter the partial Call-ID displayed in the CLI and press the TAB key and it should autocomplete the rest of the Call-ID.

It would also be helpful to turn on sipdebug while doing these tests and attach the output to the bug.

If you would attach this debug information to the bug, it will help us identify if this a different issue or if it is related to the other hung SIP BYE issues.

Thanks!

By: Mindaugas (absa) 2007-05-31 01:57:49

I cannot capture the call history when asterisk gets "401 Unauthorized" from SIP provider, because the call is destroyed on asterisk and SIP phone, and left hanging on the SIP provider and receiving end.
The call was left hanging only once on asterisk, and that was then asterisk got "403 Forbidden" response, but i wasn't able to capture sip debug and now i cannot  repeat the "403" response scenario.

I'm attaching the call history when i got "403 Forbidden" response.

Is there any way to dump call history automatically to files?



By: Olle Johansson (oej) 2007-05-31 05:01:50

dumphistory=on in sip.conf

By: Mindaugas (absa) 2007-05-31 09:41:42

I have tried dumphistory=on in sip.conf, but haven't found anything in the logs that looks like sip history that I attached and captured through console.

And asterisk always hangs up the call, in both scenarios that i have encountered. But in the second scenario asterisk doesn't authenticate BYE request, and call is left hanging on the  SIP provider/operator side.

Can I do anything more to help fix this issue?

By: Martynas Spokas (chivilis) 2007-06-02 01:07:49

I am having the same problem. When SIP user calls somewhere and hangs up, the other part hears the silence - no hang up.. I have looked to the attached files, the scenario is exactly the same. absa - please let me know, if you fixed the problem..

By: Mindaugas (absa) 2007-06-06 06:02:53

i've attached two ethereal flow chart pictures. The blue selected line is where the bug occurs.

By: Olle Johansson (oej) 2007-06-08 02:30:28

I don't think this is related to the "hung channels" issue.

You need to make sure you have debug logging to the console so we see what's happening inside your asterisk - then you will also start seeing history if you have history and dumphistory enabled in sip.conf.

Please capture the log and upload to the bug report. Thanks.

By: Mindaugas (absa) 2007-06-08 02:46:32

attaching debug log.

By: Mindaugas (absa) 2007-06-12 10:48:48

A quick patch, for the problem. Seems to be working okay now. I have patched asterisk stable 1.2.18

By: Olle Johansson (oej) 2007-06-19 04:02:58

We need a disclaimer to be able to look at this patch. Thanks.

By: Olle Johansson (oej) 2007-06-19 04:03:45

None of these files have debug logging. Make sure you enable debug logging in logger.conf.

By: Jason Parker (jparker) 2007-08-29 17:53:11

Closing.

No response from reporter in several months.

Also, this is reported against 1.2 - if you can reproduce on 1.4, please reopen.

By: Mindaugas (absa) 2007-09-10 15:42:12

Reproduced the bug in 1.4.

I have provided a patch for 1.2, and will provide a patch for 1.4 ASAP. I have also sent everything that is needed for patch to be merged (including a fax with my legal consent), so i can't understand why is it taking so long?

By: Olle Johansson (oej) 2007-11-27 02:13:42.000-0600

any updates?

By: Olle Johansson (oej) 2007-11-27 02:14:18.000-0600

There's still an issue with your license, Absa.

By: jmls (jmls) 2008-02-17 12:39:29.000-0600

Reporter has stated that he has sent his disclaimer in. Can someone at Digium please check the licence status for him.

Thanks.

By: Joshua C. Colp (jcolp) 2008-03-04 14:26:54.000-0600

I've fixed the previous disclaimer issue, looked at the patch, and examined 1.4. Support is already there, and follows almost exactly the patch.