tutorial of how to connect 2 asterisk servers with each other.
i am a newbie.
thanks in advance
tutorial of how to connect 2 asterisk servers with each other.
i am a newbie.
thanks in advance
What do you want to achieve exactly ?
i got an asterisk server with endpoints that are communicating perfectly.
i just want to make another asterisk server which will have another endpoints with somehow a similar dialplan as the first one.
then i want to connect both servers with each other in order to let an endpoint in server 1 communicate with endpoint in server 2.
i think it is something related to trunk or something like that.
note: i am using pjsip driver
thanks in advance
You need to create an entry on both the servers to communicate with each other under
OUTBOUND REGISTRATION WITH OUTBOUND AUTHENTICATION and mention outbound_auth which will be the context mentioning credentials and IP of the another server and create endpoints/peers under ENDPOINT CONFIGURED AS A TRUNK, INBOUND AUTH AND REGISTRATION
this means in pjsip.conf i should create [trunk]
and handle all of the configurations related to it
such as auth and whatever.
and in extensions i should proxy that call via this trunk ?
is there anything to be done in addition to this ?
and i would appreciate an example of trunk configuration
and an example of what should be done at extensions.conf if available.
do you think this is helpful ??
endpoint----serverA----serverB-----endpoint
;
; ServerA - pjsip.conf
;
[siptrunk-auth]
type = auth
auth_type = userpass
username =
password =
[siptrunk-aor]
type = aor
contact = sip:serverB.domain.tld
[siptrunk]
type = endpoint
context = from-serverB
allow = !all,g722,ulaw
outbound_auth = siptrunk-auth
aors = siptrunk-aor
direct_media = no
[siptrunk-registration]
type = registration
outbound_auth = siptrunk-auth
server_uri = sip:serverB.domain.tld
client_uri = sip:@serverB.domain.tld
retry_interval = 60
[siptrunk-identify]
type = identify
match = serverB.domain.tld
endpoint = siptrunk
;
; ServerB - pjsip.conf
;
; is the same as on Server A
;
[] ;
type = auth
auth_type = userpass
username =
password =
[]
type = aor
max_contacts = 1
[]
type = endpoint
context = from-ServerA
allow = !all,ulaw
direct_media = no
auth =
aors =
[]
type = identity
match = ServerA.domain.tld ; sometimes you might need to use the actual IP Address
endpoint =
;
; ServerA - extensions.conf
;
[to-serverB]
; route extensions starting with 6XXX to Server B
exten => _6XXX,1,Dial(PJSIP/${EXTEN}@siptrunk,25)
same => n,Hangup()
;
; ServerB - extensions.conf
;
[to-serverA]
; route extensions starting with 7XXX to Server A
exten => _7XXX,1,Dial(PJSIP/${EXTEN}@,25)
same => n,Hangup()
looks good so same way you have put trunkID on ServerB might be you missed that
; ServerB - extensions.conf
;
[to-serverA]
; route extensions starting with 7XXX to Server A
exten => _7XXX,1,Dial(PJSIP/${EXTEN}@,25)
same => n,Hangup()
follow the below URL
https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
Isn’t that what iax is for?
Regards
iax is one of the approaches but not the only
Registration is generally an over complication in such cases. It requires an asymmetric configuration, whereas using completely static addresses is symmetric.
I did not get what you were trying to say
Registration is basically about telling the mother ship under what address one can be contacted. If both pbxs are in the same LAN and both have static IPs, then you don’t need the extra step.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.