[Home]

Summary:ASTERISK-07066: [patch][post 1.4] add handling "423 Interval Too Brief" to Asterisk
Reporter:Samuel Tardieu (tardieu)Labels:
Date Opened:2006-05-31 17:25:27Date Closed:2006-10-17 12:56:06
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch2.txt
Description:When a SIP server refuses the proposed Expires: header, it sends back a 423 error message (Interval Too Brief) with a Min-Expires: header. The client then may try to reconnect using an expiration time equal to or greater than this minimum expiration time.

The proposed patch implements handling of 423 responses in Asterisk. Asterisk will try the proposed expiration time if it fits within min_expiry and max_expiry.
Comments:By: Samuel Tardieu (tardieu) 2006-05-31 17:46:59

(patch is put in the public domain, so I guess no disclaimer is needed, correct me if I'm wrong)

By: Jeffrey C. Ollie (jcollie) 2006-05-31 19:35:59

There are two different disclaimers - one puts patches that you create into the public domain (thereby giving up all of your rights), with the other you keep the copyright but give Digium a very broad license.

By: Samuel Tardieu (tardieu) 2006-06-01 02:17:59

I'll send a disclaimer later today so that the patch can be integrated in 1.4.

Could someone at least review it for the non-423 case? (to make sure that nothing gets broken when no 423 is involved) In this case, the only thing that changes is that default_expiry is not used as-is, but an expiry field gets set to this value and is used instead (and never changes if no 423 occurs).

By: Samuel Tardieu (tardieu) 2006-06-01 03:32:56

patch2.txt fixes a typo in a comment (for Doxygen)

By: Samuel Tardieu (tardieu) 2006-06-01 06:34:39

Disclaimer faxed

By: linuxa (linuxa) 2006-06-04 08:33:56

When I first applied tyhe patch tp 1.2.7.1 and SVM 1.2 I got a compile error caused by this line

ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);

as the add_set_flag differed from others within the case statement I changed it to

ast_set_flag(p, SIP_NEEDDESTROY);

it now compiles and runs.

With a high verbose level freephonie sends a few 423s and then registers.

The really strange thing is that both Nikotel and Iptel now also show longer than default registration times.

Perhaps they were just accepting what we sent before without arguing.

By: Samuel Tardieu (tardieu) 2006-06-04 09:10:20

Concerning the ast_set_flag, the patch is against trunk SVN so this is not surprising.

Funny that you see changes with other providers. However, I think this is for the better as your Asterisk now honors the peers requests (while still staying within the configured min_expiry and max_expiry bounds).

By: Samuel Tardieu (tardieu) 2006-09-17 18:26:59

Patch has been working fine for more than three months now, for me and other users using the same SIP provider as I do (which sends back 423 messages).

Is there any reason why it should not be committed to SVN? (the patch still applies cleanly)

By: linuxa (linuxa) 2006-09-19 04:50:09

OK patched and running on SVN-trunk-r43147 Free @ 1800 all others @ 120 = default.

By: Olle Johansson (oej) 2006-10-17 12:55:30

Commited to svn trunk, revision 45335. Thank you!