[resolved] DPMA with SIP / PJSIP

Hi,

I’m training with Asterisk 13.14.1 and DPMA 13.0_3.4.3.
Until now, I worked with Asterisk 11.x and SIP with DPMA.

But after many search, I don’t understand how to configure res_digium_phone.conf, sip.conf and pjsip.conf.

res_digium_phone.conf

[general]
;-----------------------------------------------------------------------------
; GENERAL
;-----------------------------------------------------------------------------
; -- Authentification Options
server_uuid=asttestsip1
userlist_auth=disabled
config_auth=pin
; -- mDNS Discovery disable
service_discovery_enabled=no
; -- File Directory pour Display Rules
file_directory=/var/lib/asterisk/digium_phones

;-----------------------------------------------------------------------------
; NETWORK
;-----------------------------------------------------------------------------
[asttestsip1]
type=network
alias=asttestsip1
cidr=172.25.0.0/16
; Registration : Serveurs SIP Primaire et Secondaire
registration_address=172.20.170.26
registration_port=5060
; File URL pour : applications, blfitems, contacts, logos, ringtones, firmwares
file_url_prefix=http://172.20.170.15/phones/digium
ntp_server=astntp
udp_ka_interval=60

;-----------------------------------------------------------------------------
; FIRMWARE
;-----------------------------------------------------------------------------
[D40-2_3_4]
type=firmware
model=D40
version=2_3_4
file=firmware/firmware_2_3_4_package/2_3_4_D40_firmware.eff

;- Phone : 0123456789 --------------------
[0123456789]
type=phone
network=asttestsip1
firmware=D40-2_3_4
pin=voicemail
timezone=Europe/Paris
active_locale=fr_FR
ntp_resync=86400
full_name=0123456789
line=0123456789
; Logos : into file_url_prefix
d40_logo_file=logos/company_D40.png
d70_logo_file=logos/company_D70.png
; Contacts : into file_directory
contact=contacts/0123456789_contacts.xml
; BLF conf : into file_url_prefix
blf_contact_group=COMPANY
blf_items=blfitems/0123456789_blfitems.xml
blf_unused_linekeys=yes
contacts_max_subscriptions=20
application=voicemail
web_ui_enabled=yes
;- Line : 0123456789 ---------------------
[0123456789]
type=line
line_label=0123456789
mailbox=0123456789@company
digit_map=[0-9]xxx|1[578]|19[16]|11[02459]|116000|9xxxx|0[1-9]xxxxxxxx
transport=udp
;-----------------------------------------

sip.conf

[general]
bindport=5060
bind=0.0.0.0
transport=udp

callcounter=yes
accept_outofcall_message=yes
outofcall_message_context=dpma_message_context
auth_message_requests=no

[0123456789]
type=friend
host=dynamic
defaultuser=0123456789
secret=1234
callerid="COMPANY Test 03" <0123456789>
mailbox=0123456789@company
context=fromEXTEN
insecure=invite,port
call-limit=2
allow=!all,ulaw,alaw

pjsip.conf

[global]
type=global
default_outbound_endpoint=dpma_endpoint

[transport-udp]
type=transport
protocol=udp

[dpma_endpoint]
type=endpoint

[endpoint-udp](!)
type=endpoint
context=fromEXTEN
disallow=all
allow=alaw
allow=ulaw
transport=transport-udp
send_pai=yes
trust_id_inbound=yes
direct_media=yes
dtmf_mode=rfc4733
language=fr

[0123456789]
type=aor
max_contacts=1

[0123456789]
type=auth
auth_type=userpass
username=0123456789
password=1234

[0123456789](endpoint-udp)
auth=0123456789
aors=0123456789
callerid=COMPANY Test 03 <0123456789>
mailboxes=0123456789@company

It doesn’t work. In first, because sip.conf and pjsip.conf use the same bind.
After, I don’t understand

Could you help me ?

Thanks !!

I forgot, I use isc-dchp
option boot-server “sip:proxy@server.example.com:5060”;

pjsip show endpoints

 Endpoint:  0123456789/0123456789                                Unavailable   0 of inf
     InAuth:  0123456789/0123456789
        Aor:  0123456789                                         1

 Endpoint:  dpma_endpoint                                        Unavailable   0 of inf

sip show peers

0123456789/0123456789     (Unspecified)                            D  Auto (No)  No             0        Unmonitored

I tried with this configuration :

option boot-server “sip:proxy@server.example.com:5061";

sip.conf

[general]
udpbindaddr=0.0.0.0:5061
callcounter=yesaccept_outofcall_message=yes
outofcall_message_context=dpma_message_context
auth_message_requests=no

I change into res_digium_phone.conf for each phones account, just pin :

pin=1234

I pass DPMA configuration, but I have a “Failed to authenticate” endpoint :

[Oct 13 16:20:15] NOTICE[16122]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'REGISTER' from '"0123456789" <sip:0123456789@172.20.170.26>' failed for '172.25.90.21:5060' (callid: XbrCQeDFL68lo2YZzLaR2Uv9pzhsgTHT) - Failed to authenticate

Is there a reason you are attempting to use both PJSIP and chan_sip at the same time?

I’d noload chan_sip.so in modules.conf and only use PJSIP unless you have a need for both channel drivers.

It can’t hurt to modify your dpma_endpoint to specify what transport you are using.

I begin with PJSIP.
I use DPMA and when I read wiki : Home - Asterisk Documentation
I supposed, I need SIP for DPMA recognition and PJSIP.

But I understand my mistake while reading you…
And I just re-read this wiki page : Home - Asterisk Documentation

I suppose I need this module : res_pjsip_endpoint_identifier_dpma.so ?

Thanks :grin: !!!

Yup reading that page it should work with PJSIP only.

And yes the module will help.

I have add
module.conf

noload => chan_sip.so

And res_pjsip_endpoint_identifier_dpma.so in directory /usr/lib/asterisk/modules/

It works fine !!!
Thanks JohnKiniston !! :smile:

“lift one’s head up from the track” !

1 Like