ITSP is using Metaswitch, but can't get PJSIP working with it

My ITSP has retired their Taqua T5000 switch, and are moving me to a Metaswitch instead.

At the same time, I figured I’d pivot to a more recent version of Asterisk (18.6) and pjsip instead of chan_sip.

I’m starting to rue that decision.

The ITSP gave me the following parameters:

outbound proxy IP & port
authentication username/password
domain name

and… that’s it. You’d think it would be trivial to configure mutual trunking, but I’ve been trying to troubleshoot my end of it all day with no luck.

assuming that these values are (respectively):

$PROXY_IP
$PROXY_PORT
$AUTH_USER
$AUTH_PASSWORD
$DOMAIN

what should my pjsip.conf look like?

I’m using SIP over UDP with no NATting, so that part is trivial.

From what I can gather, we appear to be a trunk to the ITSP and we do mutual authentication and registration.

Thanks

What does this mean? In order to register you need to know the address of the other side. But if they also need to register, how does one of them find the address to allow them to do the first registration?

Both sides have fixed, routable addresses.

There should be a script in your Asterisk source folder to help convert sip to pjsip, which I found helpful when first converting: /contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
(run like: /contrib/scripts/sip_to_pjsip/sip_to_pjsip.py sip_sample.file pjsip_prep.file)

There is also the pjsip.conf sample file (if you built the sample configs) which is a very good resource.

That said, you will need a transport section, and then types registration, auth, aor, identify, and endpoint for your trunk. Maybe it looks something like this:

;==================TRANSPORTS===========================
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

;==================TRUNK-reg============================
[itsp-reg]
type=registration
transport=transport-udp
outbound_auth=itsp-auth
server_uri=sip:$PROXY_IP
client_uri=sip:$AUTH_USER@<your-server-ip-addr>

[itsp-auth]
type=auth
username=$AUTH_USER
password=$AUTH_PASSWORD

[itsp]
type=aor
contact=sip:$PROXY_IP:$PROXY_PORT

[itsp]
type=identify
match=$PROXY_IP
endpoint=itsp

[itsp]
type=endpoint
transport=transport-udp
outbound_auth=itsp-auth
aors=itsp
disallow=all
allow=ulaw,gsm
context=inbound
direct_media=no
from_user=$AUTH_USER

If the ITSP needs to register to you for some reason, you can refer to the “endpoint configured as a trunk” section in the sample pjsip.conf file, which is copied here:

;=============ENDPOINT CONFIGURED AS A TRUNK, INBOUND AUTH AND REGISTRATION===
;
; Here we are allowing a remote device to register to Asterisk and requiring
; that they authenticate for registration and calls.
; You'll note that this configuration is essentially the same as configuring
; an endpoint for use with a SIP phone.


;[7000]
;type=endpoint
;context=from-external
;disallow=all
;allow=ulaw
;transport=transport-udp
;auth=7000
;aors=7000

;[7000]
;type=auth
;auth_type=userpass
;password=7000
;username=7000

;[7000]
;type=aor
;max_contacts=1

I hope it’s helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.