Port chan_SIP trunk to chan_pjsip

Hi,
I have a trunk with Swisscom that is working file with chan_sip but I need to configure it with chan_pjsip because i need to use the port 5060 with pjsip and Swisscom only accept subscription from 5060 port (I know that’s strange and crazy!).

This account has something that 3CX calls 3 way authentication:
user = +4191XXXXX
secret = SECRETSECRET
defaultuser= [email protected]

and the working SIP config is this one:
OUTGOUNG:

user=+4191123456
type=peer
srvlookup=yes
secret=SECRET
outboundproxy=fs1.ims.swisscom.ch
nat=yes
insecure=invite, port
host=swisscom.ch
fromuser=+4191123456
fromdomain=swisscom.ch
dtmfmode=auto
disallow=all
[email protected]
canreinvite=no
allow=alaw & ulaw & g729 & gsm & slinear & ulaw

INCOMING: +4191123456
type=peer
host=fs1.ims.swisscom.ch
fromdomain=swisscom.ch
disallow=all
allow=alaw & ulaw & g729 & gsm & slinear & ulaw

REGISTER STRING:
[email protected]:SECRET:[email protected]/+4191123456

As of now I was unable to replicate this configuration in a PJSIP trunk!
Have you any idea about that?

Thanks
Giuseppe

Personally, I’m not familiar with 3way authentications and pjsip, but what what’s the behavior you’re experiencing after adding swisscom as a new pjsip provider? Is the registration failing? Sorry if this sounds obviously incorrect, these are the pjsip settings I would try based on what I’m seeing here: https://www.voip-info.org/asterisk-config-sipconf/ There’s a section where " register => [email protected]:secret:[email protected]:port/extension" is listed as an example. I would just try setting your values in the corresponding pjsip options available. For example, in the pjsip Settings tab(some in general, some in advanced):
Username: NC00000XXXX
Secret: your SECRET
SIP Server: fs1.ims.swisscom.ch
SIP Server Port: 5060
From Domain: swisscom.ch
From User: +4191123456
Contact User: +4191123456
If it fails, the Contact User is the first one I’d try removing to see if it makes a difference.

Do you remember if you had to do any special steps when adding this as a chan_sip provider in the past? The setup steps will obviously be different for pjsip since you don’t just paste your settings into a single text box, but other than the registration, I think the other settings seem straightforward. I’d focus on getting a successful registration first.

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