Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: Boyd Hitchcock 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
-
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 (http://www.voip-info.org/boards/index.php?t=16926)
it should work
regards Bialy
-
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.
-
Thank you for the suggestions, I will try and update.
fyi, I did make the global changes with the sip.conf header option.
Boyd.
-
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 (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
-
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
-
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
-
Hello Boyd,
Good old BT :). They do indeed return SIP RC 423 under certain conditions.
Here are the rules for SIP RC 423 (rfc4361)
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
-
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!!