pjsip.conf

[global]
type=global
max_forwards=70
keep_alive_interval=30
contact_expiration_check_interval=30
max_initial_qualify_time=45
user_agent=asterisk1.midominio.pe
regcontext=registro
default_outbound_endpoint=1000
default_voicemail_extension=1000
debug=no
endpoint_identifier_order=ip,username,anonymous
default_from_user=asterisk1.midominio.pe
default_realm=asterisk1.midominio.pe
ignore_uri_user_options=yes

[system]
type=system
compact_headers=no
threadpool_initial_size=0
threadpool_auto_increment=5
threadpool_idle_timeout=60
threadpool_max_size=200
disable_tcp_switch=yes
follow_early_media_fork=yes
accept_multiple_sdp_answers=no

[transport-default-udp]
type=transport
async_operations=1
bind=0.0.0.0:5060
protocol=udp
allow_reload=no
symmetric_transport=no
local_net=192.168.0.0/24
external_media_address=x.x.x.x (my ip public real)
external_signaling_address=x.x.x.x (my ip public real)

[transport-wss]
type=transport
async_operations=1
bind=0.0.0.0:5060
protocol=wss
allow_reload=no
symmetric_transport=no
local_net=192.168.0.0/24
external_media_address=x.x.x.x (my ip public real)
external_signaling_address=x.x.x.x (my ip public real)


;=== SIP TRUNK TEMPLATE ===
[siptrunk-endp](!)
type=endpoint
transport=transport-default-udp
subscribe_context=subscribe-pjsip
dtmf_mode=rfc4733
direct_media=no
disallow=all

[siptrunk-aor](!)
type=aor
qualify_frequency=30

[siptrunk-identify](!)
type=identify
;srv_lookups=yes



[MYTRUNK](siptrunk-endp)
allow=g729,ulaw
context=from-INBOUND
force_rport=no
aors=MYTRUNK
100rel=yes

[MYTRUNK](siptrunk-aor)
contact=sip:192.168.0.22:5060

[MYTRUNK](siptrunk-identify)
endpoint=MYTRUNK
match=192.168.0.22

