Re: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-11 Thread Jeremy McNamara
Thorsten Lockert wrote:

And, given that a context= entry is not used for a peer, only for a
user, it also goes to say that if you use a friend, context is still only used
for the *inbound* portion of it.  So I just don't really see why you so
strongly recommend against friend entries as opposed to having both a
user and a peer entry that are otherwise the same...
 

A peer DOES use the context. Look at the source.

Jeremy McNamara

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-10 Thread Jeremy McNamara
TeleSIP wrote:

Mark's words to me, when I was a newbie:
[00:08] kram a user is to authenticate an incoming call
[00:08] kram a peer is someone you send a call to
[00:08] kram friend, of course, is both
   

I am still at a loss here.  If both are set to peer then how can either end
originate the call?  You would need at least one end to be user or friend.
 

Have both a user and a peer, they can be the same name.

Jeremy McNamara

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


RE: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-10 Thread Thorsten Lockert
 No, you actually don't need to use a context in the peer. Asterisk will 
? leave it up to the far end to decide what context to use.
 We use it to avoid any possibility of confusion in the process, but it 
 is not necessary.
 
 In fact, I just verified this with the master himself and we will no 
 longer tell our customers to use a context in their peer.

And, given that a context= entry is not used for a peer, only for a
user,
it also goes to say that if you use a friend, context is still only used
for the *inbound* portion of it.  So I just don't really see why you so
strongly recommend against friend entries as opposed to having both a
user and a peer entry that are otherwise the same...

Thorsten

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread Jeremy McNamara
WipeOut wrote:

Jeremy, Can you elaborate on how using type=friend would restrict the 
dialplan.. Just so I am aware of the pitfalls.. :)
Mark's words to me, when I was a newbie: 
[00:08] kram a user is to authenticate an incoming call
[00:08] kram a peer is someone you send a call to
[00:08] kram friend, of course, is both

I'll give you a real world example that has happened to more than a few 
NuFone customers:

NuFone Customer A orders a toll-free number and termination from us.
Instead of following the example config we send he does:
[NuFone]
type=friend
secret=his_secret
host=switch-1.nufone.net.
context=NANPA
When NuFone sends the toll-free calls to his Asterisk box, they will 
land in HIS NANPA context, which is really confusing, but he does figure 
that fact out and is able to make both toll-free inbound and outbound 
calls work.

Then a few weeks later he decides to pick up a regular DID from us. Now, 
his (above) configuration will fail for the regular DID inbound calls, 
but nothing else, because our regular DIDs do not come from 
switch-1.nufone.net.

The proper way is to separate the tasks. Starting with the user:

[NuFone]
type=user
secret=his_secret
context=inbound
This way he is not restricting the hostname/IP address where the user 
'NuFone' can call in from. Plus, he now has a more logical context for 
all of his inbound calls.

and the peer simply has the required information:

[NuFone]
type=peer
secret=his_secret
context=NANPA  
host=switch-1.nufone.net

Yes, a friend is a very easy way to get things started and it can be 
made to work, but you will end up causing hair loss and/or heartburn 
trying to figure out why everything doesn't work the way you expect it 
to, when you go to add more complexity to your operation.

The moral of the story is:  Separate those tasks now, so you can avoid 
problems later.

Jeremy McNamara





___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


RE: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread Thorsten Lockert
 and the peer simply has the required information:
 
 [NuFone]
 type=peer
 secret=his_secret
 context=NANPA  
 host=switch-1.nufone.net

Uh.  Why would you want to specify a context for a peer at all...?  Aren't
those used
only for inbound anyhow?

Thorsten 

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread WipeOut
Jeremy McNamara wrote:

WipeOut wrote:

Jeremy, Can you elaborate on how using type=friend would restrict the 
dialplan.. Just so I am aware of the pitfalls.. :)


Mark's words to me, when I was a newbie: [00:08] kram a user is to 
authenticate an incoming call
[00:08] kram a peer is someone you send a call to
[00:08] kram friend, of course, is both

I'll give you a real world example that has happened to more than a 
few NuFone customers:

NuFone Customer A orders a toll-free number and termination from us.
Instead of following the example config we send he does:
[NuFone]
type=friend
secret=his_secret
host=switch-1.nufone.net.
context=NANPA
When NuFone sends the toll-free calls to his Asterisk box, they will 
land in HIS NANPA context, which is really confusing, but he does 
figure that fact out and is able to make both toll-free inbound and 
outbound calls work.

Then a few weeks later he decides to pick up a regular DID from us. 
Now, his (above) configuration will fail for the regular DID inbound 
calls, but nothing else, because our regular DIDs do not come from 
switch-1.nufone.net.

The proper way is to separate the tasks. Starting with the user:

[NuFone]
type=user
secret=his_secret
context=inbound
This way he is not restricting the hostname/IP address where the user 
'NuFone' can call in from. Plus, he now has a more logical context for 
all of his inbound calls.

and the peer simply has the required information:

[NuFone]
type=peer
secret=his_secret
context=NANPA  host=switch-1.nufone.net
Yes, a friend is a very easy way to get things started and it can be 
made to work, but you will end up causing hair loss and/or heartburn 
trying to figure out why everything doesn't work the way you expect it 
to, when you go to add more complexity to your operation.

The moral of the story is:  Separate those tasks now, so you can avoid 
problems later.

Jeremy McNamara

Jeremy,

That makes a lot of sence (although I will have to read it a few more 
times just to cement the concept).. I can already see where this would 
have become a problem for me in the not so distant future..

Thanks a lot..

Later..

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] RE: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread Steven Critchfield
On Thu, 2003-10-09 at 15:20, Thorsten Lockert wrote:
  and the peer simply has the required information:
  
  [NuFone]
  type=peer
  secret=his_secret
  context=NANPA  
  host=switch-1.nufone.net
 
 Uh.  Why would you want to specify a context for a peer at all...?  Aren't
 those used
 only for inbound anyhow?

What if you wanted that specific user to drop into a specific context so
you could tailor what was accessable for that user.

Simple idea would be like a account I had opened up on my system for a
potential overseas employee. This person had no need to be able to make
calls to anywhere our switch allowed. I dropped the user into a specific
context that only allowed dialing of a few specific phone numbers.

This is different than say anyone else in our organization who have full
run of the switch.  
-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] RE: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread Thorsten Lockert
On Thu, 2003-10-09 at 15:20, Thorsten Lockert wrote:
   and the peer simply has the required information:
   
   [NuFone]
   type=peer
   secret=his_secret
   context=NANPA  
   host=switch-1.nufone.net
  
  Uh.  Why would you want to specify a context for a peer at all...?
Aren't
  those used
 only for inbound anyhow?
 
 What if you wanted that specific user to drop into a specific context so
 you could tailor what was accessable for that user.

But that would be an *inbound* again -- the question was why specify a
context for a *peer*...  Not for a user or friend, where inbound is
possible...

Thorsten

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread Jeremy McNamara
Thorsten Lockert wrote:

and the peer simply has the required information:

[NuFone]
type=peer
secret=his_secret
context=NANPA  
host=switch-1.nufone.net
   

Uh.  Why would you want to specify a context for a peer at all...?  Aren't
those used
only for inbound anyhow?
 

No, you actually don't need to use a context in the peer. Asterisk will 
leave it up to the far end to decide what context to use.
We use it to avoid any possibility of confusion in the process, but it 
is not necessary.

In fact, I just verified this with the master himself and we will no 
longer tell our customers to use a context in their peer.



Jeremy McNamara

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2 Trunking confirmation?)

2003-10-09 Thread TeleSIP

- Original Message - 
From: Jeremy McNamara [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 2:57 PM
Subject: Proper usage of user's and peer's (was Re: [Asterisk-Users] IAX2
Trunking confirmation?)


 WipeOut wrote:

  Jeremy, Can you elaborate on how using type=friend would restrict the
  dialplan.. Just so I am aware of the pitfalls.. :)

 Mark's words to me, when I was a newbie:
 [00:08] kram a user is to authenticate an incoming call
 [00:08] kram a peer is someone you send a call to
 [00:08] kram friend, of course, is both
I am still at a loss here.  If both are set to peer then how can either end
originate the call?  You would need at least one end to be user or friend.



 I'll give you a real world example that has happened to more than a few
 NuFone customers:

 NuFone Customer A orders a toll-free number and termination from us.
 Instead of following the example config we send he does:

 [NuFone]
 type=friend
 secret=his_secret
 host=switch-1.nufone.net.
 context=NANPA

 When NuFone sends the toll-free calls to his Asterisk box, they will
 land in HIS NANPA context, which is really confusing, but he does figure
 that fact out and is able to make both toll-free inbound and outbound
 calls work.

 Then a few weeks later he decides to pick up a regular DID from us. Now,
 his (above) configuration will fail for the regular DID inbound calls,
 but nothing else, because our regular DIDs do not come from
 switch-1.nufone.net.

 The proper way is to separate the tasks. Starting with the user:

 [NuFone]
 type=user
 secret=his_secret
 context=inbound

 This way he is not restricting the hostname/IP address where the user
 'NuFone' can call in from. Plus, he now has a more logical context for
 all of his inbound calls.

 and the peer simply has the required information:

 [NuFone]
 type=peer
 secret=his_secret
 context=NANPA
 host=switch-1.nufone.net


 Yes, a friend is a very easy way to get things started and it can be
 made to work, but you will end up causing hair loss and/or heartburn
 trying to figure out why everything doesn't work the way you expect it
 to, when you go to add more complexity to your operation.

 The moral of the story is:  Separate those tasks now, so you can avoid
 problems later.


 Jeremy McNamara





 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users