Re: [Asterisk-Users] The Evil of type=friend explained, again (was Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500)

2004-02-06 Thread Jeremy McNamara
Tilghman Lesher wrote:

On Thursday 05 February 2004 05:50, Jeremy McNamara wrote:
 

A type=friend is simply both a type=user and type=peer using the same
set of config directives. While a type=friend makes things almost
trivial to get calls working in both directions, it will limit the
flexibility of your config and even hinder some of the more advanced
uses of Asterisk.
For example: Say you want to use the same 'user' across many
different Asterisk boxes, which of course will have different IP
addresses. In this situation, you cannot have a host keyword in your
Asterisk config stanza for the type=user, but the type=peer requires
some host keyword. Thus, if you use a type=friend you will limit the
use of that one username to whatever IP address is contained in the
host keyword.
You only need to register to Asterisk if you have a dynamic IP
address or you need to blow thru a firewall/NAT device. To register
you need to have a type=peer with a host=dynamic. Since in your
type=friend config directive you had host=some.ip.address, while this
may be this is fine to for the type=user, this same value also gets
used for the type=peer, which makes it so you cannot register since
the IP address is hard coded.
So, either you do not need to register and things will Just Work(tm)
or you will need to use separate type=user and type=peer config
directives.
   

So, why can't you just do:

[someuser]
type=friend
host=dynamic
context=internal
secret=somesecret
In other words, you can have your user registered to the server AND be
using a type=friend definition.  This is exactly how I have some test
equipment set up and it works perfectly well.
 





Sure, but then you are not restricting to any specific IP address to 
authenticate users and you will request the internal context on the far 
end when sending them calls.

Jeremy McNamara





___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500

2004-02-05 Thread Jeremy McNamara
mattf wrote:

I have all of my Polycom's set to friend so I know that's not your problem.
 

One day you too will get bitten by the type=friend's EVIL and you will 
see the light.

Trust me,

Jeremy McNamara



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500

2004-02-05 Thread David Liu
Could you tell us a little bit how exactly it works?  The wiki pages don't
say much about type=friend, user, and peer.  I tried using type=user but
can't seem to register.

And what implications are there for using type=friend?

David

- Original Message - 
From: Jeremy McNamara [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 2:47 AM
Subject: Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun
dpoint IP 500


 mattf wrote:

 I have all of my Polycom's set to friend so I know that's not your
problem.
 
 

 One day you too will get bitten by the type=friend's EVIL and you will
 see the light.

 Trust me,

 Jeremy McNamara




 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] The Evil of type=friend explained, again (was Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500)

2004-02-05 Thread Jeremy McNamara
David Liu wrote:

Could you tell us a little bit how exactly it works?  The wiki pages don't
say much about type=friend, user, and peer.  I tried using type=user but
can't seem to register.
 

A type=friend is simply both a type=user and type=peer using the same 
set of config directives. While a type=friend makes things almost 
trivial to get calls working in both directions, it will limit the 
flexibility of your config and even hinder some of the more advanced 
uses of Asterisk.

For example: Say you want to use the same 'user' across many different 
Asterisk boxes, which of course will have different IP addresses. In 
this situation, you cannot have a host keyword in your Asterisk config 
stanza for the type=user, but the type=peer requires some host keyword. 
Thus, if you use a type=friend you will limit the use of that one 
username to whatever IP address is contained in the host keyword. 

You only need to register to Asterisk if you have a dynamic IP address 
or you need to blow thru a firewall/NAT device. To register you need to 
have a type=peer with a host=dynamic. Since in your type=friend config 
directive you had host=some.ip.address, while this may be this is fine 
to for the type=user, this same value also gets used for the type=peer, 
which makes it so you cannot register since the IP address is hard coded.

So, either you do not need to register and things will Just Work(tm) or 
you will need to use separate type=user and type=peer config directives.

I smell the beginnings of a Whitepaper here.



Jeremy McNamara





- Original Message - 
From: Jeremy McNamara [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 2:47 AM
Subject: Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun
dpoint IP 500

 

mattf wrote:

   

I have all of my Polycom's set to friend so I know that's not your
 

problem.
 

 

One day you too will get bitten by the type=friend's EVIL and you will
see the light.
Trust me,

Jeremy McNamara



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
   

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
 



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] The Evil of type=friend explained, again (was Re: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500)

2004-02-05 Thread Tilghman Lesher
On Thursday 05 February 2004 05:50, Jeremy McNamara wrote:
 A type=friend is simply both a type=user and type=peer using the same
 set of config directives. While a type=friend makes things almost
 trivial to get calls working in both directions, it will limit the
 flexibility of your config and even hinder some of the more advanced
 uses of Asterisk.

 For example: Say you want to use the same 'user' across many
 different Asterisk boxes, which of course will have different IP
 addresses. In this situation, you cannot have a host keyword in your
 Asterisk config stanza for the type=user, but the type=peer requires
 some host keyword. Thus, if you use a type=friend you will limit the
 use of that one username to whatever IP address is contained in the
 host keyword.

 You only need to register to Asterisk if you have a dynamic IP
 address or you need to blow thru a firewall/NAT device. To register
 you need to have a type=peer with a host=dynamic. Since in your
 type=friend config directive you had host=some.ip.address, while this
 may be this is fine to for the type=user, this same value also gets
 used for the type=peer, which makes it so you cannot register since
 the IP address is hard coded.

 So, either you do not need to register and things will Just Work(tm)
 or you will need to use separate type=user and type=peer config
 directives.

So, why can't you just do:

[someuser]
type=friend
host=dynamic
context=internal
secret=somesecret

In other words, you can have your user registered to the server AND be
using a type=friend definition.  This is exactly how I have some test
equipment set up and it works perfectly well.

-Tilghman

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500

2004-02-04 Thread mattf
What firmware and sip versions are you using? I have several Polycom phones
on my system right now and I've never had any registration problems with
them. 

Instead of leaving the host as dynamic try declaring an IP address(that's
the only difference I see between your sip.conf and mine).

If you are still having problems I've like to see your polycom .cfg files
for one of these phones, you might be missing a setting in one of them.

MATT---


-Original Message-
From: David Liu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 1:06 AM
To: [EMAIL PROTECTED]
Subject: [Asterisk-Users] Minor Registration Problem With Polycom Soundpoint
IP 500


We recently took a few Polycom Soundpoint IP 500 to test out in Asterisk
environment.  So far it has been good.  Call Hold, Transfer, DMTF etc.
 
However, I do notice every now and then the Polycom fails to register with
Asterisk.  Asterisk console outputs the following:
 
Feb  3 13:02:32 WARNING[278546]: chan_sip.c:2365 __transmit_response: Unable
to determine sequence number from ''
Feb  3 13:02:34 NOTICE[278546]: chan_sip.c:5125 handle_request: Failed to
authenticate user DavidLiu
sip:[EMAIL PROTECTED];tag=9F67E426-59D92ED7
Feb  3 13:02:36 NOTICE[278546]: chan_sip.c:5125 handle_request: Failed to
authenticate user DavidLiu
sip:[EMAIL PROTECTED];tag=BFDEF35B-1CBC4F2C

in sip.conf:
canreinvite=yes
host=dynamic
canreinvite=yes
dtmfmode=rfc2833
context=sip
port=5060

Usually say after the phone failed to register with Asterisk, I can attempt
to place a call.  It will fail of course.  But then I can try calling again
and usually the call will go through and it will successfully re-register
itself without needing a restart.  
 
What can this be?  Surely Polycom is re-registering every 3600 before
Asterisk times it out.  But Asterisk is just refusing it.
 
By the way, anyone know whether Asterisk is geared towards RFC3261 or
RFC2543?  I know Asterisk is not a fully SIP Proxy but lets say if a SIP
PSTNGW or a SIP phone is designed under the spec 2543 as suppose to 3261,
will it work better or the same with Asterisk?
 
David
 
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Minor Registration Problem With Polycom Soun dpoint IP 500

2004-02-04 Thread mattf
try this first in your sip.conf entry for your Polycom phone:

host=dynamic
defaultip=10.10.10.10 (put the phone IP address there)


I have all of my Polycom's set to friend so I know that's not your problem.

if that is still generating bad registration messages, then send me your
Polycom .cfg files

MATT---

-Original Message-
From: David Liu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 8:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [Asterisk-Users] Minor Registration Problem With Polycom
Soundpoint IP 500


Hi Matt,

I did try setting my sip.conf to have host=ip.address. such as the
following:

[DavidLiu]
type=friend
username=DavidLiu
secret=mypassword
host=192.168.3.16
canreinvite=yes
dtmfmode=rfc2833
context=sip
callerid=David Liu 1000
mailbox=1000
port=5060


Then asterisk will complain with the following error:
Feb  5 09:52:01 NOTICE[278546]: Registration from 'DavidLiu
sip:[EMAIL PROTECTED]' failed for '192.168.3.16'
Feb  5 09:52:32 NOTICE[278546]: Peer 'DavidLiu' isn't dynamic
Feb  5 09:52:32 NOTICE[278546]: Registration from 'DavidLiu
sip:[EMAIL PROTECTED]' failed for '192.168.3.16'
Feb  5 09:52:33 NOTICE[278546]: Peer 'DavidLiu' isn't dynamic
etc..(repeat until phone stops registering)

David
 - Original Message - 
From: mattf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 3:59 AM
Subject: RE: [Asterisk-Users] Minor Registration Problem With Polycom
Soundpoint IP 500


 What firmware and sip versions are you using? I have several Polycom
phones
 on my system right now and I've never had any registration problems with
 them.

 Instead of leaving the host as dynamic try declaring an IP address(that's
 the only difference I see between your sip.conf and mine).

 If you are still having problems I've like to see your polycom .cfg files
 for one of these phones, you might be missing a setting in one of them.

 MATT---


 -Original Message-
 From: David Liu [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 04, 2004 1:06 AM
 To: [EMAIL PROTECTED]
 Subject: [Asterisk-Users] Minor Registration Problem With Polycom
Soundpoint
 IP 500


 We recently took a few Polycom Soundpoint IP 500 to test out in Asterisk
 environment.  So far it has been good.  Call Hold, Transfer, DMTF etc.

 However, I do notice every now and then the Polycom fails to register with
 Asterisk.  Asterisk console outputs the following:

 Feb  3 13:02:32 WARNING[278546]: chan_sip.c:2365 __transmit_response:
Unable
 to determine sequence number from ''
 Feb  3 13:02:34 NOTICE[278546]: chan_sip.c:5125 handle_request: Failed to
 authenticate user DavidLiu
 sip:[EMAIL PROTECTED];tag=9F67E426-59D92ED7
 Feb  3 13:02:36 NOTICE[278546]: chan_sip.c:5125 handle_request: Failed to
 authenticate user DavidLiu
 sip:[EMAIL PROTECTED];tag=BFDEF35B-1CBC4F2C

 in sip.conf:
 canreinvite=yes
 host=dynamic
 canreinvite=yes
 dtmfmode=rfc2833
 context=sip
 port=5060

 Usually say after the phone failed to register with Asterisk, I can
attempt
 to place a call.  It will fail of course.  But then I can try calling
again
 and usually the call will go through and it will successfully re-register
 itself without needing a restart.

 What can this be?  Surely Polycom is re-registering every 3600 before
 Asterisk times it out.  But Asterisk is just refusing it.

 By the way, anyone know whether Asterisk is geared towards RFC3261 or
 RFC2543?  I know Asterisk is not a fully SIP Proxy but lets say if a SIP
 PSTNGW or a SIP phone is designed under the spec 2543 as suppose to 3261,
 will it work better or the same with Asterisk?

 David

 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users