Asterisk registration on other server pjsip

There is the Asterisk server and it has endpoint for me so i can connect a Voip phone ans it works!
So i have the asdress , login and paswword , i dont have permition to manage that server.
How do i register this phone on my Asterisk server? And if someone call to 333 from there it will go to my internel phone?
Ive aldery tried like this

[siptrunk]
type=registration
transport=udp-transport-nat
outbound_auth=siptrunk
server_uri=sip:192.168.19.2
client_uri=sip:333@192.168.19.2
retry_interval=60
 
[siptrunk]
type=auth
auth_type=userpass
username=333
password=240

 
[siptrunk]
type=endpoint
transport=udp-transport-nat
context=pipak
disallow=all
allow=alaw,opus,gsm,ulaw,g726,adpcm,slin,lpc10,g729,speex,ilbc
outbound_auth=siptrunk
aors=siptrunk
 
[siptrunk]
type=identify
endpoint=siptrunk
match=192.168.19.2

[siptrunk]
type=aor
contact=sip:192.168.19.2:5060

Your configuration seems to be correct (assuming that the udp-transport-nat section is correct).
Check if you are registered successfully in the remote server.

asterisk –rx 'pjsip show registration siptrunk'

The dialing format for outgoing calls should be Dial(PJSIP/${EXTEN}@siptrunk) and not Dial(PJSIP/siptrunk/${EXTEN})

If you cannot make any calls, start the debugging mode and check for errors.

mail*CLI> pjsip set logger on

If you want the incoming calls to be routed to extension 333 in the pipak context, add the following to the registration section:

contact_user = 333

Otherwise all incoming calls will be directed to the 's' extension (if exists) in the above mentioned context.

2 Likes