Koozali.org: home of the SME Server

Issue with defaultexpiry timeout.

Issue with defaultexpiry timeout.
« on: April 11, 2009, 10:27:47 AM »
Hi,
As a asterisk new user, I am having a issue with the use of defaultexpiry.

Using:
Sail-2.3.1-1
Asterisk 1.4.24

Client X-lite on a PC.
I have managed to get a trunk configured to my BT BroadbandTalk service by using WEB advice. Which requires a change to defaultexpiry. My experimenting shows 900 as about the minimum before getting a error from BT server. So I understand it re-registers every 15 minutes with that setting.

I have also a sipgate account, which I can get to work but appears to require defaultexpiry at 600. The line accepts incoming calls for 10 minutes after registration, then has 5 minutes of failing until asterisk reregistration at the 15 minutes. Timing from asterisk console - show sip registration

Therefore I assume I need a defaultexpiry against each trunk definition. Which is the problem. It appears to be a global setting.

I have been experimenting placing the defaultexpiry in the trunk config, but it does not work.

Any thoughts on a solution?

Thank you for SAIL, I find it a great contrib for SMEServer.
And Thank you for reading.
Boyd

Offline bbialy

  • ****
  • 105
  • +0/-0
Re: Issue with defaultexpiry timeout.
« Reply #1 on: April 11, 2009, 05:23:08 PM »
Hi,
I think that it is similar situation like useragent parameter.
So, you have to edit sip.conf globals via Headers in web panel
just add as line

look at this
http://www.voip-info.org/boards/index.php?t=16926
 
it should work

regards Bialy
Reading with understanding is the hardest thing IN THE WORLD

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Issue with defaultexpiry timeout.
« Reply #2 on: April 12, 2009, 04:29:46 AM »
Welcome to the forums :)

It might be possible for you to make the change suggested above from the Carrier Definition (see http://sarkpbx.com/twiki/bin/view/Main/DocChapter072) rather than globally. Let us know how you get on.
« Last Edit: April 12, 2009, 04:31:45 AM by David Harper »

Re: Issue with defaultexpiry timeout.
« Reply #3 on: April 12, 2009, 09:24:16 AM »
Thank you for the suggestions, I will try and update.

fyi, I did make the global changes with the sip.conf header option.

Boyd.
« Last Edit: April 12, 2009, 09:36:25 AM by Boyd Hitchcock »

Offline bbialy

  • ****
  • 105
  • +0/-0
Re: Issue with defaultexpiry timeout.
« Reply #4 on: April 12, 2009, 05:26:42 PM »
David,
defaultexpirey can only be set in general section in sip.conf.
acording to to
http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf
look it is only in general section not in trunk and peer section.

i've tried many times to set useragent for each trunk and it is not possible. defaultexpiery is similar parameter. Unfortunatly

Boyd,
why are you need to reregister with that long periods of time??
BT has limitation for reregister frequency.??
i think selintra will know best about BT services (should have some expiernces).


 Bbialy


Reading with understanding is the hardest thing IN THE WORLD

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Issue with defaultexpiry timeout.
« Reply #5 on: April 14, 2009, 09:02:56 AM »
hello Boyd,

I am a bit confused.  What errors are you actually getting?  In SIP, rereg timeouts are usually maxima.  In other words, you shouldn't get an error when you register "early".  If you think about it, it happens all the time;  maybe because you restarted your phone, or your PBX, or your whole network!  All these things will cause early re-registration.  They don't, as a rule, cause communication failure, or indeed any error condition.

So.... I think your problem may lie elsewhere.  Please describe the nature of the failure as best you can and send us any logs/observations you have made.

Kind Regards

S

Re: Issue with defaultexpiry timeout.
« Reply #6 on: April 15, 2009, 09:16:47 AM »
Hi selintra,

hello Boyd,

I am a bit confused.  What errors are you actually getting?

Please describe the nature of the failure as best you can and send us any logs/observations you have made.


defaultexpiry =  600
[Apr 15 08:04:48] NOTICE[3431]: chan_sip.c:7715 sip_reg_timeout:    -- Registration for '441xxxxxxxxx@btsip.bt.com' timed out, trying again (Attempt #7)
    -- Got SIP response 423 "Interval Too Brief" back from 62.239.169.136

The above is repeated every 30 seconds.


defaultexpiry = 900
No Problem, registration occurs. This appears to be the lowest value to avoid the error above.

The defaultexpiry change make the BTline work, but sipgate appears to stop after 10 minutes, for 5 minutes until a new registatration takes place.

Host                            Username       Refresh State                Reg.Time
btsip.bt.com:5060               44xxxxxxxxxx      885 Registered           Wed, 15 Apr 2009 08:23:13
sipgate.co.uk:5060              xxxxxxxxxxxx      885 Registered           Wed, 15 Apr 2009 08:23:13

as shown by the "sip show registry" in asterisk console

Thank you for looking, Boyd
« Last Edit: April 15, 2009, 09:25:46 AM by Boyd Hitchcock »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Issue with defaultexpiry timeout.
« Reply #7 on: April 15, 2009, 11:41:34 PM »
Hello Boyd,

Good old BT :).  They do indeed return SIP RC 423 under certain conditions.

Here are the rules for SIP  RC 423 (rfc4361)

Quote
The registrar MAY choose an expiration less than the requested
          expiration interval.  If and only if the requested expiration
          interval is greater than zero AND smaller than one hour AND
          less than a registrar-configured minimum, the registrar MAY
          reject the registration with a response of 423 (Interval Too
          Brief).  This response MUST contain a Min-Expires header field
          that states the minimum expiration interval the registrar is
          willing to honor.

The important part is the last sentence, because it mandates that the registrar returns its minimum expiration interval.  A simple SIP trace should tell you all you need to know, at least for BT.

defaultexpiry is a global SIP setting in Asterisk.  Nothing we can do about that.  However I am not convnced that you are losing contact/registration with sipgate due to re-registration time being too long.  Try running with the correct (i.e. slightly above the BT minimum) re-reg time and also setting your sipgate PEER entry as qualify=no.

See how you get on with that.

Best

S




Re: Issue with defaultexpiry timeout.
« Reply #8 on: April 16, 2009, 01:01:18 AM »
Hello Selintra,

Good old BT :).  They do indeed return SIP RC 423 under certain conditions.

Not done a sip trace but, defaultexpiry = 899 = 423 returned / defaultexpiry = 900 = works!

defaultexpiry is a global SIP setting in Asterisk.  Nothing we can do about that.  However I am not convnced that you are losing contact/registration with sipgate due to re-registration time being too long.  Try running with the correct (i.e. slightly above the BT minimum) re-reg time and also setting your sipgate PEER entry as qualify=no.

Changed qualify = 3000 to qualify = no, still same issue.
From a bt landline, I get Number Unobtainable Tone - 10 mins after the registration time in the asterisk console. Soon as registration updated, it work for incoming calls.
Outgoing calls via sipgate dont appear to be impacted, work all 15 mins.

Thank you for the suggestion.
Boyd.

p.s. Currently playing with Asterisk Perl now to create some xpl (homeautomation) callerid messages. So getting into Custom Apps!!