[Home]

Summary:ASTERISK-16107: Asterisk generates responses with missing Via headers
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2010-05-17 08:07:57Date Closed:2011-07-26 15:13:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) full.log
( 1) ngrep.txt
Description:If Asterisk detects a spiraled SIP call (outgoing INVITE is coming in again), it will handle the forwarding internally (Local/...) and cancels the outgoing call. Therefore Asterisk will send a CANCEL and due to spiraling it will also receive a CANCEL and will respond with 487 to the incoming spiraled INVITE.

This 487 response generated by Asterisk is malformed, it misses the second Via header (which is present in the incoming INVITE, and in the 100 Trying sent by Asterisk immediately after receiving the spiraled INVITE).

Problem happens with both, pedantic=yes and =no.

I tried to capture the call with "call show history" but for some reasons, this call is not present in the history.

****** ADDITIONAL INFORMATION ******

Removed inline trace - pabelanger
Comments:By: Paul Belanger (pabelanger) 2010-05-17 11:05:26

If you could follow the document below and attach your debug log to the issue.  Posting it in the comments sections just clutters the issue.
---
We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trun/doc/HOWTO_collect_debug_information.txt

By: klaus3000 (klaus3000) 2010-05-17 11:42:47

Scenario: Asterisk performs an outgoing call to a peer. The call
is spiraled back to Asterisk. Asterisk handles the forward
internally (Dial creates a Local channel in the peer's context).

Message 8 is malformed as it misses a Via header.

PSTN            Asterisk                   Proxy
--SETUP---------->
                  1 ----------INVITE--------> >--\
                  2 <---------100------------    | spiral
                  3 <---INVITE--------------- <--/
                  4 ----100----------------->

                  5 ----------CANCEL--------> >--\
                  6 <---------200(CANCEL)----    | spiral
                  7 <---CANCEL--------------- <--/
                  8 ----487(INVITE)--------->
                  9 ----200(CANCEL)--------->

Find the ngrep dump captured at the proxy in ngrep.txt.

Find Asterisk's logging in full.log.

By: Paul Belanger (pabelanger) 2010-05-17 11:49:13

Thanks for the detailed information.

By: Leif Madsen (lmadsen) 2010-05-17 13:42:13

I know Mark Michelson was trying to make SIP spiraling work correctly in Asterisk, so this may have been an over site.

By: Leif Madsen (lmadsen) 2011-07-26 15:13:15.415-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions