返回列表 發帖

Connecting 2 asterisk machines

本帖最後由 ckleea 於 2011-1-28 11:01 編輯

Would like to discuss on the best methods to connect 2 asterisk machines

Two methods exist
1. SIP
A machine is acted as sip provider and allows B machine to connect as sip client, vice versa.
It is similar to what one login to their own VOIP provider

E.g. in sip.conf
register = 3250:3250T03250@192.168.xxx.xxx/ast18
[sipast18]
disallow = all
allow = ulaw
allow = alaw
host = 192.168.xxx.xxx
fromdomain = 192.168.xxx.xxx
insecure = no
secret = 3250T03250
type = peer
username = 3250
context = from-ast18

in extensions.conf, I have the following for outbound

[CallingRule_ast18]
exten = _3XXX,1,Dial(SIP/sipast18/${EXTEN},,r)
exten = _3XXX,n,Hangup()

for inbound,
[from-ast18]
exten = ast18, Dial(SIP/6100,,r)

2. IAX - inter
The protocol provided by asterisk
my example is similar to what I set in the sip.conf. need also inbound and outbound setting in extensions.conf

further examples can be found here
http://www.voip-info.org/wiki/view/Asterisk+Connect+2+servers

Sometimes, IAX connection not working well.

How about your experience?

Are you talking the environment in same LAN ?

For me, IAX in same lan works fine but I cannot see the exact CALLER ID and the extension number of the real caller except the registered one for connection.

In IP01, when typing iax2 show registry and iax2 show peers, I can see all registered IAX peers details.  However, when in Asterisk 1.8 CLI, iax2 show registry shows nothing but it can still operate normally.

My impression is that IP01 GUI under 1.4 and Asterisk 1.8 APL connection is not perfect.
Most probably, Asterisk 1.8 still have some BUGS here and there.  Sometimes, we may encounter strange and surprise.

TOP

Both within the same LAN and over internet

For same LAN, has been no problem at all.
Over internet, it is a different issue. For me, I have test on SIP e.g. YH has been providing trunks for other users and I have done so as a provider before.
For IAX, it is an interesting option as it needs to have only one port open.

GUI is always a problem for us.

TOP

IAX does not use the "friend" and instead use the peer and the user.

YH

TOP

回復 4# 角色


   
But your previous tutorial did suggest using "friend" for IAX connection and said it can let us see the caller ID at both sides.
  1. Interconnection Between TW Asterisk Server and SZ Asterisk Server using IAX
  2. 下面用IAX,雙方都可以顯示對方電話號碼。

  3. TW Asterisk Server

  4. iax.conf

  5. [general]
  6. bindport=4569
  7. bandwidth=high
  8. jitterbuffer=yes
  9. forcejitterbuffer=yes
  10. maxjitterbuffer=1000
  11. maxjitterinterps=10
  12. resyncthreshold=1000
  13. tos=ef
  14. autokill=yes

  15. [trunk-tw-sz]
  16. type=friend
  17. host=sz.3322.org
  18. trunk=yes
  19. disallow=all
  20. allow=alaw
  21. qualify=yes
  22. context=from-sz


  23. extensions.conf

  24. exten => _20XX,1,Dial(IAX2/trunk-tw-sz/${EXTEN},,r)   ;Using IAX2

  25. [from-sz]
  26. exten => _12XX,1,Dial(SIP/${EXTEN},,r)

  27. SZ Asterisk Server

  28. iax.conf

  29. [general]
  30. bindport=4569
  31. bandwidth=high
  32. jitterbuffer=yes
  33. forcejitterbuffer=yes
  34. maxjitterbuffer=1000
  35. maxjitterinterps=10
  36. resyncthreshold=1000
  37. tos=ef
  38. autokill=yes

  39. [trunk-sz-tw]
  40. type=friend
  41. trunk=yes
  42. host=tw.3322.org
  43. disallow=all
  44. allow=alaw
  45. qualify=yes
  46. context=from-tw


  47. extensions.conf

  48. exten => _12XX,1,Dial(IAX2/trunk-sz-tw/${EXTEN},,r)

  49. [from-tw]
  50. exten => _20XX,1,Dial(SIP/${EXTEN},,r)
複製代碼
Is the above settings still valid?  Would you post your present IAX settings for our reference, please.

Many thanks

TOP

Oh! I almost forgot what I have said.
I recalled from my memory that Qnewbie is using the method that I said the last-two post.

YH

TOP

I cannot see extensions at both sides when using "friend" method.

TOP

I cannot see extensions at both sides when using "friend" method.
bubblestar 發表於 2011-1-29 22:48


I am able to recall my memory that I use iax for one way and use sip for the another way.

SZ ---> HK using IAX
HK ---> SZ using SIP


YH

TOP

That means your Dial out method is using IAX but Dial in is using SIP。

Haha, this blending method can now be called YH's IAX-SIP trunk.

TOP

No!
If the members in SZ who want to make calls to HK, the dial plan is using IAX.
If the members in HK who want to make calls to SZ, the dial plan is using SIP.

I believe that both ways can be used in either SIP or IAX to have telephone numbers shown on the callee's telephone LCD.

YH

TOP

返回列表