[asterisk-users] Question about SIP registration
Aggio Alberto
alberto.aggio at loquendo.com
Wed Jan 13 04:26:03 CST 2010
I reply to your question below
1) I don't have a secret for that peer.
2) Obviously, the solution is to make the 'host' field static (in my scenario, because the port is non-standard 5080, so no "standard" endpoint SIP can register with that IPaddress:port) or specify a secret with 'host=dynamic'.
The question I made was a little different: I'm wondering why an external SIP endpoint, which is trying to register on eth0 85.X.Y.Z network, is indeed "seen" by Asterisk as registered with address 1.1.1.1 (the eth1 IP addresses of the PC).
I try to explain better: usually, SIP endpoint with IP address X.Y.Z.T which has registered itself on Asterisk (for example with user 200) is seen as following (sip show peers)
200/200 X.Y.Z.T 5060 OK(xx ms)
So the CLI shows the *endpoint's* IP address. Instead, in my scenario, I see a row like this:
999/999 1.1.1.1 5060 UNREACHABLE (1)
And 1.1.1.1 is the eth1 IP address of the PC where Asterisk is installed on. But I haven't any endpoint SIP onto that PC which is trying to register, while I can see one of them OUTSIDE my network (i.e. in the Big Internet) that is trying to register as 999: in fact, if in [999] SIP account I put 'host=1.1.1.1', I can see a row like this on Asterisk log:
------------
[Jan 13 11:10:54] ERROR[1834]: chan_sip.c:8718 register_verify: Peer '999' is trying to register, but not configured as host=dynamic
[Jan 13 11:10:54] NOTICE[1834]: chan_sip.c:15236 handle_request_register: Registration from '"999" <sip:999 at 85.X.Y.Z >' failed for '174.129.74.46' - Peer is not supposed to register
-------------
while if I put 'host=dynamic' I saw (in sip show peers) the row depicted in (1) and no more errors like above.
I suspect there is something wrong with network configuration (firewall, NAT). But this behavior is quite odd to me ...
Alberto.
PS: the network is at customer's site, so I haven't chance to have a clear look over it...
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Robert Lister
Sent: martedì 12 gennaio 2010 18.51
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Question about SIP registration
On Tue, 2010-01-12 at 18:16 +0100, Aggio Alberto wrote:
> Then I have configured an account as following:
> [999]
>
> type=friend
>
> username=999
You don't appear to have a secret= line in there with a password
option... or did you snip it?
> Can someone explain me this kind of behaviour? Is it normal? Can I
> restrict registration of 999 peer only to SIP UA from network 1.1.1.X?
There is an ACL option for the SIP peer which you can add,
http://www.voip-info.org/wiki/index.php?page=Asterisk+sip
+permit-deny-mask
(although there were some issues with this in earlier versions of
asterisk.. it should work properly in recent versions.)
Rob
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list