These parameters are only an example and you might need to change it based on your local setup to work properly. 


pjsip.conf example:


;=============== TRANSPORTS ============================================


[transport-udp]

type = transport

protocol = udp

bind = 0.0.0.0

external_media_address = (Your PBX Public IP)

external_signaling_address = (Your PBX Public IP) 

external_signaling_port = 5060

local_net = 192.168.0.0/255.255.0.0 (change this IP Based on your PBC local network)


[transport-tcp]

type = transport

protocol = tcp

bind = 0.0.0.0

external_media_address = (Your PBX Public IP)

external_signaling_address = (Your PBX Public IP) 

external_signaling_port = 5060

local_net = 192.168.0.0/255.255.0.0 (change this IP Based on your PBX local network)


;=============== SIP TRUNK ===========================================


[megacall]

type=endpoint

transport=transport-udp

context=from_megacall

disallow=all

allow=alaw

allow=ulaw

outbound_auth=megacall_auth

aors=megacall

direct_media=no

send_pai=yes

send_rpid=yes



[megacall_auth]

type=auth

auth_type=userpass

password= (password)

username= (username)


[megacall]

type=aor

contact=sip:185.106.240.227


[megacall]

type=identify

endpoint=megacall

match=185.106.240.227