Hi Thiru -> Could u tell me ,how to connect 2 asterisk server using sip as a > clients... > asterisk server are in same network...You can connect them either as "friends" or as "users/peers". I generally recommend the user/peer method for connecting two servers since it clearly delineates which codecs and contexts are allowed. Your sip.conf files will look something like this: Server A sip.conf: [ToServerB] type=peer secret=<fromServerAtoServerB> username=<fromServerAtoServerB> host=<ip.of.serverB> qualify=1000 [FromServerB] type=user secret=<fromServerBtoServerA> username=<fromServerBtoServerA> context=extensions disallow=all allow=<codecs you want to allow> Server B sip.conf: [ToServerA] type=peer secret=<fromServerBtoServerA> username=<fromServerBtoServerA> host=<ip.of.serverA> qualify=1000 [FromServerA] type=user secret=<fromServerAtoServerB> username=<fromServerAtoServerB> context=extensions disallow=all allow=<codecs you want to allow> Replace the items in angle brackets <xxx> with your own values. Now, if you have everything loaded correctly, and you issue a "sip show peers" from the CLI of Server B, you should see something like: ToServerA/fromServerBtoServerA ip.of.server.A 5060 OK (37 ms) ALSO: Make sure you have the correct ports opened in both directions: 5060 TCP and UDP (this is the sip standard, but you can change it in sip.conf) 10000 - 20000 UDP (this is the asterisk default. You can set the exact numbers in rtp.conf) - Noah P.S. It's generally better to direct these types of questions to the entire list rather than just a few users from the list.
Hi Noah, Thanks for your reply. Please clarify one more doubt in extensions.conf file... is the following dial plan is right way to call another server(frome serverA to serverB) exten => _5XXXXX,1,Dial(sip/5XXXXX@192.1682.105:6030,15,tr) exten => _5XXXXX,2,Hangup here for an example the extension 510510 is in server B ... plz do reply Regards, Thiru On 12/30/06, Noah Miller <noahisaacmiller@gmail.com> wrote:> > Hi Thiru - > > > Could u tell me ,how to connect 2 asterisk server using sip as a > > clients... > > asterisk server are in same network... > > You can connect them either as "friends" or as "users/peers". I > generally recommend the user/peer method for connecting two servers > since it clearly delineates which codecs and contexts are allowed. > Your sip.conf files will look something like this: > > Server A sip.conf: > > [ToServerB] > type=peer > secret=<fromServerAtoServerB> > username=<fromServerAtoServerB> > host=<ip.of.serverB> > qualify=1000 > > [FromServerB] > type=user > secret=<fromServerBtoServerA> > username=<fromServerBtoServerA> > context=extensions > disallow=all > allow=<codecs you want to allow> > > > Server B sip.conf: > > [ToServerA] > type=peer > secret=<fromServerBtoServerA> > username=<fromServerBtoServerA> > host=<ip.of.serverA> > qualify=1000 > > [FromServerA] > type=user > secret=<fromServerAtoServerB> > username=<fromServerAtoServerB> > context=extensions > disallow=all > allow=<codecs you want to allow> > > Replace the items in angle brackets <xxx> with your own values. > > Now, if you have everything loaded correctly, and you issue a "sip > show peers" from the CLI of Server B, you should see something like: > > ToServerA/fromServerBtoServerA ip.of.server.A > 5060 OK (37 ms) > > > ALSO: Make sure you have the correct ports opened in both directions: > > 5060 TCP and UDP (this is the sip standard, but you can change it in > sip.conf) > 10000 - 20000 UDP (this is the asterisk default. You can set the exact > numbers in rtp.conf) > > > - Noah > > > P.S. It's generally better to direct these types of questions to the > entire list rather than just a few users from the list. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070101/7d3b3b0e/attachment.htm
Hi Thiru -> Please clarify one more doubt in extensions.conf file... > is the following dial plan is right way to call another server(frome > serverA to serverB) > > exten => _5XXXXX,1,Dial(sip/5XXXXX@192.1682.105:6030,15,tr) > > exten => _5XXXXX,2,HangupYou can dial either via IP or by sip device name (the name in brackets [] in sip.conf). Either way, you also have to include the username and password in the Dial statement(). It looks like this: exten => _5XXXXX,1,Dial(SIP/UserB:PasswordB@SipDeviceNameOnB/${EXTEN},15,tr) or exten => _5XXXXX,1,Dial(SIP/UserB:PasswordB@IPAddressOfB/${EXTEN},15,tr) If you want to avoid putting the password in the dialplan, and make the authentication process a little more secure, you can also use MD5 authentication. This page on the wiki explains how: http://www.voip-info.org/tiki-index.php?page=Asterisk+sip+md5secret - Noah