[asterisk-bugs] [JIRA] (ASTERISK-12117) chan_sip creates a new local tag (from-tag) for every register message

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon May 6 15:52:39 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-12117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=206149#comment-206149 ] 

Matt Jordan commented on ASTERISK-12117:
----------------------------------------

Pertinent discussion:

{noformat}
(03:33:23 PM) jsmith: Seems we're generating a new from-tag for each REGISTER request
(03:33:48 PM) file: I know the call id is supposed to be the same, but I don't remember reading that the tag has to be
(03:34:41 PM) jsmith: Someone referenced RFC 3261, section 8.1.3.5.
(03:34:46 PM) jsmith: I guess I should go look that up
(03:35:12 PM) putnopvut: Just got back into the office and catching up on this conersation
(03:36:00 PM) jsmith: Ah, specifically "This new request
(03:36:00 PM) jsmith:    constitutes a new transaction and SHOULD have the same value of the
(03:36:00 PM) jsmith:    Call-ID, To, and From of the previous request, but the CSeq should
(03:36:00 PM) jsmith:    contain a new sequence number that is one higher than the previous."
(03:36:21 PM) jsmith: putnopvut: No worries -- just looking for another set of eyes on this
(03:37:32 PM) ***jsmith thinks that we should have more SHOULDs and more MUSTs in SIP
(03:38:01 PM) saghul_ [~saghul at ip3e830637.speed.planet.nl] entered the room.
(03:38:15 PM) putnopvut: SHOULD is my least favorite RFC word
(03:38:33 PM) putnopvut: And in close second is RECOMMENDED, only because it's used less.
(03:39:13 PM) mjordan: correct me if I'm wrong, but tags would affect dialogs, whereas this is a REGISTER request
(03:39:40 PM) jsmith: mjordan: Correct, and REGISTERs don't begin a dialog, right?
(03:40:30 PM) alecdavis [~alecdavis at 202.36.76.21] entered the room.
(03:40:31 PM) mjordan: jsmith: no, but I have a feeling that even though this isn't a dialog, we should still be sending a from tag. Since the From header should remain unchanged in a re-transmit, that would imply that it needs to be the same tag (I think)
(03:40:47 PM) putnopvut: But section 8 is general UAS behavior. It doesn't pertain necessarily to dialogs.
(03:40:55 PM) mjordan: right. I'm backtracking now
(03:41:02 PM) putnopvut: So for REGISTER, the recommendation in section 8 should be pertinent
(03:41:12 PM) mjordan: and even non-dialogs have From tags
(03:41:19 PM) jsmith: mjordan: Right... here's what I'm seeing.  Asterisk tries to register (initial registration).  Server comes back with a 401 auth required.
(03:41:37 PM) putnopvut: I don't think the problem is that we don't include a from-tag. It's that we change it on subsequent retries.
(03:41:37 PM) jsmith: mjordan: We re-attempt the REGISTER with auth, but with a different from-tag.
(03:41:53 PM) pabelanger [~pabelange at asterisk/contributor-and-bug-marshal/pabelanger] entered the room.
(03:41:53 PM) mode (+o pabelanger) by ChanServ
(03:43:04 PM) jsmith: The server says something to the effect of "The from-tag in the request I sent the nonce to doesn't match the from-tag on the new request", and denies the registration
(03:43:13 PM) jsmith: putnopvut: That's my understanding as well
(03:45:54 PM) putnopvut: Well, to be fair to Asterisk, it's only SHOULD strength that we keep the from-tag the same according to 8.1.3.5.
(03:46:01 PM) putnopvut: (See why I hate SHOULD ?)
(03:46:35 PM) jsmith: So, ignore and keep requiring people to patch?  Fix?  Expose via an option?
(03:46:40 PM) putnopvut: But, if it's really an easy fix like that e-mail implies, we may as well make it to be more compliant since apparently some endpoints will refuse our auth.
(03:46:52 PM) jsmith: It's a one-line removal
(03:47:05 PM) ***jsmith is happy to submit a patch
{noformat}
                
> chan_sip creates a new local tag (from-tag) for every register message
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-12117
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-12117
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Channels/chan_sip/Registration
>            Reporter: Pawel Pierscionek
>            Severity: Minor
>
> refreshing from-tag for each register message - even within the same dialog is against RFC. 
> ****** ADDITIONAL INFORMATION ******
> from-tag should be consistent within a dialog otherwise some SIP validators/firewalls/proper proxies might drop  the register message as it does not follow RFC. 
> sipXecs is such an example. 
> removing the chan_sip.c line that contains the comment
> "create a new local tag for every register attempt" seems to solve the problem. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list