PJSIP callcentric config

I’ve decided it’s time to move to pjsip, but I’m having trouble configuring callcentric. Anybody have a working pjsip.conf for callcentric ?

Thanks,
sean

It is very simple, use this guide as reference

https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip#Migratingfromchan_siptores_pjsip-ExampleSIPTrunkConfiguration

Here’s mine:

[callcentric]
type=registration
transport=transport-udp
outbound_auth=callcentric
server_uri=sip:callcentric.com:5060
client_uri=sip:14444784785@callcentric.com:5060


[callcentric]
type = aor
contact = sip:callcentric.com:5060

[callcentric]
type = auth
auth_type = userpass
username=14444784785
password=my_password
realm = callcentric.com

[callcentric]
transport=transport-udp
type = endpoint
context = Outgoing_callcentric
dtmf_mode = rfc4733
disallow = all
allow = ulaw
direct_media = no
auth = callcentric
outbound_auth = callcentric
aors = callcentric
tone_zone = us
from_user = 14444784785
from_domain = callcentric.com

[callcentric1] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha1.callcentric.com 

[callcentric2] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha2.callcentric.com 

[callcentric3] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha3.callcentric.com 

[callcentric4] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha4.callcentric.com 

[callcentric5] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha5.callcentric.com 

[callcentric6] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha6.callcentric.com 

[callcentric7] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha7.callcentric.com 

[callcentric8] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha8.callcentric.com 

[callcentric9] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha9.callcentric.com 

[callcentric10] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha10.callcentric.com 

[callcentric11] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha11.callcentric.com 

[callcentric12] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha12.callcentric.com


[callcentric13] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha13.callcentric.com 

[callcentric14] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha14.callcentric.com 

[callcentric15] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha15.callcentric.com 

[callcentric16] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha16.callcentric.com 

[callcentric17] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha17.callcentric.com 

[callcentric18] 
type=identify 
endpoint=Incoming_Calls_CC
match=alpha18.callcentric.com 

[callcentric19] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha19.callcentric.com 

[callcentric20] 
type=identify 
endpoint=Incoming_Calls_CC 
match=alpha20.callcentric.com 

[callcentricA] 
type=identify 
endpoint=Incoming_Calls_CC
match=doll3.callcentric.com 

[callcentricB] 
type=identify 
endpoint=Incoming_Calls_CC
match=doll4.callcentric.com 

[callcentricC] 
type=identify 
endpoint=Incoming_Calls_CC 
match=doll5.callcentric.com 



;Allow incoming calls from callcentric by ip match
[Incoming_Calls_CC]
type = identify
endpoint = Incoming_Calls_CC
match = callcentric.com

[Incoming_Calls_CC]
type = endpoint
transport=transport-udp
context = Incoming_callcentric
outbound_auth = callcentric
direct_media = no
dtmf_mode = rfc4733
disallow = all
allow = ulaw
direct_media = no
from_domain = callcentric.com

If you use the line functionality[1] you don’t need any identify section. If you do want to use an identify section you can specify “callcentric.com” in a single identify and it will automatically retrieve all of the IP addresses according to SRV and A records - so that last identify which uses that is the only one needed. If you still want to manually specify multiple hostnames you can have multiple “match” lines in an identify to eliminate more.

[1] https://blogs.asterisk.org/2016/01/27/the-pjsip-outbound-registration-line-option/

1 Like

Very helpful. I combined jcolp with phonexfg:

[callcentric1]
type=registration
transport=transport-udp
outbound_auth=callcentric
server_uri=sip:callcentric.com:5060
client_uri=sip:1777xxxxxxx@callcentric.com:5060
line=yes
endpoint=callcentric1-in

[callcentric1]
type = aor
contact = sip:callcentric.com:5060

[callcentric1]
type = auth
auth_type = userpass
username=1777xxxxxx
password=my_password
realm = callcentric.com

[callcentric1-in]
type = endpoint
transport=transport-udp
context = Incoming_callcentric
outbound_auth = callcentric1
direct_media = no
dtmf_mode = rfc4733
disallow = all
allow = ulaw
direct_media = no
from_domain = callcentric.com

I must admit I’m surprised how much simpler than sip.conf. If it works ! I’ll be doing a trial switch to pjsip this weekend. We’ll see.

I have 3 callcentric lines. Here’s the registration section from the sip->pjsip convert script:

[reg_callcentric]
type = registration
contact_user = 17xxxxxxxxxx5
contact_user = 17xxxxxxxxxx4
contact_user = 17xxxxxxxxxx0
expiration = 120
transport = transport-udp
outbound_auth = auth_reg_callcentric.com
client_uri = sip:17xxxxxxxxx5@callcentric.com
client_uri = sip:17xxxxxxxxx4@callcentric.com
client_uri = sip:17xxxxxxxxx0@callcentric.com
server_uri = sip:callcentric.com

Can I/how do I use line functionality ?
line=yes
endpoint=end1 ; for 17xxxxxxxx5
endpoint=end2 ; for 17xxxxxxxx4
endpoint=end3 ; for 17xxxxxxxx0

???

And do I need contact_user ?

You would need 3 separate outbound registrations, and if you want to individually address inbound then 3 different endpoints.

Thanks for all the help. Took a while, but this callcentric pjsip config Works For Me :

;======= Callcentric Templates

[aor-callcentric](!)
type=aor
contact=sip:callcentric.com:5060

[endpoint-callcentric](!)
type=endpoint
transport=transport-udp
context=from-callcentric
dtmf_mode = rfc4733
disallow=all
allow=ulaw
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
from_domain=callcentric.com
tos_audio = ef
tos_video = af41
cos_audio = 5
cos_video = 4

[reg-callcentric](!)
type = registration
retry_interval = 10
max_retries = 0
expiration = 120
transport = transport-udp
server_uri = sip:callcentric.com

;##########################
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
local_net = 127.0.0.0/255.255.255.0
local_net = 10.xx.yy.0/255.255.255.0
tos = cs3
cos = 3

;#############

[line1](reg-callcentric)
outbound_auth = line1
client_uri = sip:1aaabbbcccc@callcentric.com
line = yes
endpoint = line1

[line1]
type = auth
password =
username = 1aaabbbcccc

[line1](aor-callcentric)

[line1](endpoint-callcentric)
outbound_auth = line1
aors=line1
from_user = 1aaabbbcccc

;#########

[line2](reg-callcentric)
outbound_auth = line2
client_uri = sip:1dddeeeffff@callcentric.com
line = yes
endpoint = line2

[line2]
type = auth
password = >password>
username = 1dddeeeffff

[line2](aor-callcentric)

[line2](endpoint-callcentric)
outbound_auth = line2
aors=line2
from_user = 1dddeeeffff

;#########

[line3]

The sip-pjsip convert script combined all the registrations and the auth’s into one section. If you’re using the line function, you need separate registrations.
And I couldn’t get a combined auth section to work.