How to create peer trunk between Asterisk and another IPPBX

Hello guys,

I’m trying to create peer trunk between Asterisk PBX and UCM IPPBX using PJSIP.
inbound calls work well but I can’t make calls from Asterisk to UCM, this error appears when I’m trying to make outbound call to UCM. Endpoint: ‘trunk’: Authentication credentials not accepted by server.

[trunk]
type=endpoint
context=fibermetrunk
disallow=all
allow=ulaw,alaw,gsm
aors=trunk
outbound_auth=trunk
transport=transport-udp


[trunk]
type=auth
auth_type=userpass
password=
username=



[trunk]

type=aor
contact=sip:192.168.99.5:5060

[trunk]
type=identify
endpoint=trunk
match=192.168.99.5

You miss

[mytrunk]
type=registration

I don’t wanna create registration trunk, I just wanna create peer trunk without any authentication

Remove all auth stuff and keep identify

I did it and same issue still exist.

Check if in CLI give the right output

You could also enable debug and/or logger on this host and pass a call to analyze messages about this endpoint.

Sorry, in CLI pjsip show identify mytrunk

The problem is at the other end. It doesn’t recognize you as being a valid user and is therefore challenging you for authentication.

Thank you all,
After long time search, I found that I have to set force_rport=no and rewrite_contact=no in the endpoint options.