Anton Krall
2005-Mar-13 15:09 UTC
[Asterisk-Users] IAX2 and asterisk servers linking to each other
Guys. I have a few IAX2 connectivity questions that maybe somebody can clarify to me: I have my * server and another one with a friend. We are both inside nat and doing port forwarding: * -> nat -> internet -> nat -> * Now, what I dont understand is this, why FWD needs to be configured in iax.conf with a register and a peer and user entries: register => user:pw@iax2.fwdnet.net [iaxfwd] type=user context=fwd-incoming auth=rsa inkeys=freeworlddialup [fwd-gw] type=peer host=iax2.fwdnet.net user=user secret=pw qualify=2000 disallow=all allow=ulaw callerid=Anton Krall But for connecting 2 * servers you need just this: register => user:pw@asteriskhost.com [remoteasterisk] type=friend language=sp host=dynamic secret=pw context=mty-incoming disallow=all allow=ilbc auth=md5 trunk=no qualify=3000 accountcode=mike Why not use a peer and user entries also? And when do you need to use trunking? In this example, trunk=no.. Why? Any enlightment on this will be greatly appreciated.
Rich Adamson
2005-Mar-13 18:36 UTC
[Asterisk-Users] IAX2 and asterisk servers linking to each other
> Guys. I have a few IAX2 connectivity questions that maybe somebody can > clarify to me: > > I have my * server and another one with a friend. We are both inside nat and > doing port forwarding: > > * -> nat -> internet -> nat -> * > > Now, what I dont understand is this, why FWD needs to be configured in > iax.conf with a register and a peer and user entries: > > register => user:pw@iax2.fwdnet.net > > [iaxfwd] > type=user > context=fwd-incoming > auth=rsa > inkeys=freeworlddialup > > [fwd-gw] > type=peer > host=iax2.fwdnet.net > user=user > secret=pw > qualify=2000 > disallow=all > allow=ulaw > callerid=Anton Krall > > But for connecting 2 * servers you need just this: > > register => user:pw@asteriskhost.com > > [remoteasterisk] > type=friend > language=sp > host=dynamic > secret=pw > context=mty-incoming > disallow=all > allow=ilbc > auth=md5 > trunk=no > qualify=3000 > accountcode=mike > > Why not use a peer and user entries also? And when do you need to use > trunking? In this example, trunk=no.. Why? > > Any enlightment on this will be greatly appreciated.The register statement is primarily intended to let the other end know your system is available. Options with the statement include the ability to inform the other end how you want to be contacted (eg, an extension number they should use when sending a call to you). The User and Peer context types are primarily used to specify specific parameters for incoming and outgoing calls. Maybe a bad example, but you could specify ulaw for outgoing calls and gsm for incoming calls, or whatever. You might have an extensions.conf entry that looks something like: exten => _6X.,1,Dial(IAX2/rsa-laptop/${EXTEN:1}) where the call is directed to context=rsa-laptop, or, exten => _6X.,1,Dial(IAX2/1.2.3.4/${EXTEN:1}) where the call is directed to a specific IP address and does not reference a context. In the first case, the parameters from the context are used. The second case does not reference a context, therefore default parameter values will be used (whatever they happen to be). So, for you and your friend, if both asterisk systems are always on and available, there really is no value to register. Just use the User and Peer contexts, and set passwords and security parameters to your needs.
Anton Krall
2005-Mar-13 19:05 UTC
[Asterisk-Users] IAX2 and asterisk servers linking to each other
When do you use trunk then? -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Rich Adamson Sent: Domingo, 13 de Marzo de 2005 07:37 p.m. To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] IAX2 and asterisk servers linking to each other> Guys. I have a few IAX2 connectivity questions that maybe somebody can > clarify to me: > > I have my * server and another one with a friend. We are both inside > nat and doing port forwarding: > > * -> nat -> internet -> nat -> * > > Now, what I dont understand is this, why FWD needs to be configured in > iax.conf with a register and a peer and user entries: > > register => user:pw@iax2.fwdnet.net > > [iaxfwd] > type=user > context=fwd-incoming > auth=rsa > inkeys=freeworlddialup > > [fwd-gw] > type=peer > host=iax2.fwdnet.net > user=user > secret=pw > qualify=2000 > disallow=all > allow=ulaw > callerid=Anton Krall > > But for connecting 2 * servers you need just this: > > register => user:pw@asteriskhost.com > > [remoteasterisk] > type=friend > language=sp > host=dynamic > secret=pw > context=mty-incoming > disallow=all > allow=ilbc > auth=md5 > trunk=no > qualify=3000 > accountcode=mike > > Why not use a peer and user entries also? And when do you need to use > trunking? In this example, trunk=no.. Why? > > Any enlightment on this will be greatly appreciated.The register statement is primarily intended to let the other end know your system is available. Options with the statement include the ability to inform the other end how you want to be contacted (eg, an extension number they should use when sending a call to you). The User and Peer context types are primarily used to specify specific parameters for incoming and outgoing calls. Maybe a bad example, but you could specify ulaw for outgoing calls and gsm for incoming calls, or whatever. You might have an extensions.conf entry that looks something like: exten => _6X.,1,Dial(IAX2/rsa-laptop/${EXTEN:1}) where the call is directed to context=rsa-laptop, or, exten => _6X.,1,Dial(IAX2/1.2.3.4/${EXTEN:1}) where the call is directed to a specific IP address and does not reference a context. In the first case, the parameters from the context are used. The second case does not reference a context, therefore default parameter values will be used (whatever they happen to be). So, for you and your friend, if both asterisk systems are always on and available, there really is no value to register. Just use the User and Peer contexts, and set passwords and security parameters to your needs. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users