Ip register in pjsip

Hi all

i have a problem to registration my user and my ip phones in pjsip on asterisk 13.2.0

My configuration:

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

[20010]
type=endpoint
context=default
disallow=all
allow=ulaw
allow=gsm
callerid=Operadora <20010>
direct_media=no
rtp_symmetric=yes
force_rport=yes
auth=20010
aors=20010
language=pt
aggregate_mwi=yes
mailboxes=20010@default
mwi_from_user=20010
[20010]
type=auth
auth_type=userpass
password=xxxxxx
username=20010
[20010]
type=aor
max_contacts=1

samebody can help me ?

Regards,

I’d suggest upgrading to the latest version and also providing logs and further detail, otherwise noone can help.

Hi jcop

i liked but i using sangoma cards A200 A500 and w400 and sangoma only have a patch for 13.2.0 and the last 13.4.0 but
the pci w400 doesn work very well

what i can do ? install the patch on version 13.2.0 ?
and than install the last version of asterisk ?

Regards,

I can’t comment on that as I’m unaware of the patches. If you provide logs and more details it may be possible to diagnose what is going on with your current version.

Hi Jacolp

i do these in cli

core set verbose 4
core set debug 4
pjsip set logger on

this is correct?

the cli ina asterisk or move ?

Regards,

hi jaolp

see these

ipb*CLI> pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <ip/cidr…>
Channel: <ChannelId…> <State…> <Time(sec)>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20010;@sip:20010@192.168.0.20:5062’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20011;@sip:20011@192.168.0.20:5063’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20012;@sip:20012@192.168.0.20:5064’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20014;@sip:20014@192.168.0.20:5065’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20015;@sip:20015@192.168.0.20:5067’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20016;@sip:20016@192.168.0.20:5066’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20018;@sip:20018@192.168.0.22:5063’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20091;@sip:20091@192.168.0.24:5062’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20094;@sip:20094@192.168.0.22:5062’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20095;@sip:20095@192.168.0.21:5062’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20096;@sip:20096@192.168.0.21:5063’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20097;@sip:20097@192.168.0.24:5060’ named ‘qualify_timeout’ at line 0 of
[Jun 1 14:02:57] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘6007;@sip:6007@192.168.0.22:5064’ named ‘qualify_timeout’ at line 0 of
ipb*CLI> pjsip show endpoint 20010

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <ip/cidr…>
Channel: <ChannelId…> <State…> <Time(sec)>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

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

ParameterName : ParameterValue

100rel : yes
accountcode :
aggregate_mwi : true
allow : (ulaw|gsm)
allow_subscribe : true
allow_transfer : true
aors : 20010
auth : 20010
call_group :
callerid :
callerid_privacy : allowed_not_screened
callerid_tag :
connected_line_method : invite
context : default
cos_audio : 0
cos_video : 0
device_state_busy_at : 0
direct_media : false
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false
dtls_ca_file :
dtls_ca_path :
dtls_cert_file :
dtls_cipher :
dtls_fingerprint : SHA-256
dtls_private_key :
dtls_rekey : 0
dtls_setup : active
dtls_verify : No
dtmf_mode : rfc4733
fax_detect : false
force_avp : false
force_rport : true
from_domain :
from_user :
ice_support : false
identify_by : username
inband_progress : false
language : pt
mailboxes : 20010@default
media_address :
media_encryption : none
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_suggest : default
mwi_from_user : 20010
named_call_group :
named_pickup_group :
one_touch_recording : false
outbound_auth :
outbound_proxy :
pickup_group :
record_off_feature : automixmon
record_on_feature : automixmon
rewrite_contact : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_symmetric : true
sdp_owner : -
sdp_session : Asterisk
send_diversion : true
send_pai : false
send_rpid : false
set_var :
srtp_tag_32 : false
sub_min_expiry : 0
t38_udptl : false
t38_udptl_ec : none
t38_udptl_ipv6 : false
t38_udptl_maxdatagram : 0
t38_udptl_nat : false
timers : yes
timers_min_se : 90
timers_sess_expires : 1800
tone_zone :
tos_audio : 0
tos_video : 0
transport :
trust_id_inbound : false
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false

[Jun 1 14:03:00] ERROR[6451]: config_options.c:710 aco_process_var: Could not find option suitable for category ‘20010;@sip:20010@192.168.0.20:5062’ named ‘qualify_timeout’ at line 0 of

Regards,

You appear to have moved between versions which is causing stale data to not get loaded and removed. You will need to manually remove using “database detlree registrar/contact” on the Asterisk CLI.

Hi ,

ok now i clean all pjsip

but still not register :frowning:
ipbCLI> pjsip set logger on
PJSIP Logging enabled
ipb
CLI> pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <ip/cidr…>
Channel: <ChannelId…> <State…> <Time(sec)>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 20010/20010 Not in use 0 of inf
InAuth: 20010/20010
Aor: 20010 1
Contact: 20010/sip:2010@192.168.0.20:5060 Unknown nan

Endpoint: 20011/20011 Not in use 0 of inf
InAuth: 20011/20011
Aor: 20011 1
Contact: 20011/sip:20011@192.168.0.20:5060 Unknown nan

Regards

There appear to be contacts… did you explicitly configure them, if not then stuff has registered.

Hi ,

I need to configure ip phones in …_phones.conf ?

Regards,

Endpoints are configured in pjsip.conf unless you include alternate files. There’s an example[1] on the wiki which can be used for a phone.

[1] https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples

Hi
ok now i have feedback in cli
ipbxCLI> pjsip reload
Module ‘res_pjsip.so’ reloaded successfully.
Module ‘res_pjsip_authenticator_digest.so’ reloaded successfully.
Module ‘res_pjsip_endpoint_identifier_ip.so’ reloaded successfully.
Module ‘res_pjsip_mwi.so’ reloaded successfully.
Module ‘res_pjsip_notify.so’ reloaded successfully.
Module ‘res_pjsip_outbound_publish.so’ reloaded successfully.
Module ‘res_pjsip_publish_asterisk.so’ reloaded successfully.
Module ‘res_pjsip_outbound_registration.so’ reloaded successfully.
– Reloading module ‘res_pjsip.so’ (Basic SIP resource)
[Jun 5 21:59:06] NOTICE[6848]: sorcery.c:1254 sorcery_object_load: Type ‘transport’ is not reloadable, maintaining previous values
[Jun 5 21:59:06] NOTICE[6848]: sorcery.c:1254 sorcery_object_load: Type ‘system’ is not reloadable, maintaining previous values
– Reloading module ‘res_pjsip_authenticator_digest.so’ (PJSIP authentication resource)
– Reloading module ‘res_pjsip_endpoint_identifier_ip.so’ (PJSIP IP endpoint identifier)
– Reloading module ‘res_pjsip_mwi.so’ (PJSIP MWI resource)
– Reloading module ‘res_pjsip_notify.so’ (CLI/AMI PJSIP NOTIFY Support)
– Reloading module ‘res_pjsip_outbound_publish.so’ (PJSIP Outbound Publish Support)
– Reloading module ‘res_pjsip_publish_asterisk.so’ (PJSIP Asterisk Event PUBLISH Support)
– Reloading module ‘res_pjsip_outbound_registration.so’ (PJSIP Outbound Registration Support)
[Jun 5 21:59:09] NOTICE[4898]: chan_sip.c:27866 handle_request_register: Registration from ‘“Oi” sip:6001@192.168.0.103’ failed for ‘192.168.0.20:5069’ - Wrong password
[Jun 5 21:59:22] NOTICE[4898]: chan_sip.c:27866 handle_request_register: Registration from ‘“Operador” sip:Operador@192.168.0.103’ failed for ‘192.168.0.20:5063’ - Wrong password
ipbx
CLI>

ii try change pass word but all time give the same error

Regards,

Are you trying to use chan_sip or chan_pjsip? Both can’t be bound to the same port, and in the log you’ve provided chan_sip appears to be bound to the SIP port and accepting traffic instead. You can change this in sip.conf or configure chan_sip to not be loaded in modules.conf

hi
now make one test i clean all configuration on sip.conf and pjsip.conf in cli i do sip reload and pjsip reload
y try use comand database deltree resgistrar/contact reboot the machine in cli asterisk 2 extencions still
try register how istś possibol ?
and try make these
ipbx*CLI> pjsip reload
Module ‘res_pjsip.so’ reloaded successfully.
Module ‘res_pjsip_authenticator_digest.so’ reloaded successfully.
Module ‘res_pjsip_endpoint_identifier_ip.so’ reloaded successfully.
Module ‘res_pjsip_mwi.so’ reloaded successfully.
Module ‘res_pjsip_notify.so’ reloaded successfully.
Module ‘res_pjsip_outbound_publish.so’ reloaded successfully.
Module ‘res_pjsip_publish_asterisk.so’ reloaded successfully.
Module ‘res_pjsip_outbound_registration.so’ reloaded successfully.
– Reloading module ‘res_pjsip.so’ (Basic SIP resource)
[Jun 7 09:46:25] NOTICE[9822]: sorcery.c:1254 sorcery_object_load: Type ‘transport’ is not reloadable, maintaining previous values
[Jun 7 09:46:25] NOTICE[9822]: sorcery.c:1254 sorcery_object_load: Type ‘system’ is not reloadable, maintaining previous values
– Reloading module ‘res_pjsip_authenticator_digest.so’ (PJSIP authentication resource)
– Reloading module ‘res_pjsip_endpoint_identifier_ip.so’ (PJSIP IP endpoint identifier)
– Reloading module ‘res_pjsip_mwi.so’ (PJSIP MWI resource)
– Reloading module ‘res_pjsip_notify.so’ (CLI/AMI PJSIP NOTIFY Support)
– Reloading module ‘res_pjsip_outbound_publish.so’ (PJSIP Outbound Publish Support)
– Reloading module ‘res_pjsip_publish_asterisk.so’ (PJSIP Asterisk Event PUBLISH Support)
– Reloading module ‘res_pjsip_outbound_registration.so’ (PJSIP Outbound Registration Support)
[Jun 7 09:46:46] NOTICE[4929]: chan_sip.c:27866 handle_request_register: Registration from ‘“20050” sip:20050@192.168.0.29’ failed for ‘192.168.0.20:5063’ - Wrong password
[Jun 7 09:46:47] NOTICE[4929]: chan_sip.c:27866 handle_request_register: Registration from ‘“Oi” sip:6001@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
== Using SIP RTP CoS mark 5
– Executing [5500358923165165@default:1] NoOp(“SIP/192.168.0.103-00000001”, “5500358923165165”) in new stack
– Executing [5500358923165165@default:2] Dial(“SIP/192.168.0.103-00000001”, “DAHDI/i1/5500358923165165,60”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called DAHDI/i1/5500358923165165
– DAHDI/i1/5500358923165165-1 is proceeding passing it to SIP/192.168.0.103-00000001
– DAHDI/i1/5500358923165165-1 is ringing
– DAHDI/i1/5500358923165165-1 answered SIP/192.168.0.103-00000001
– Channel SIP/192.168.0.103-00000001 joined ‘simple_bridge’ basic-bridge
– Channel DAHDI/i1/5500358923165165-1 joined ‘simple_bridge’ basic-bridge
[Jun 7 09:47:17] NOTICE[4929]: chan_sip.c:27866 handle_request_register: Registration from ‘“20050” sip:20050@192.168.0.29’ failed for ‘192.168.0.20:5063’ - Wrong password
– Span 1: Channel 0/1 got hangup request, cause 16
– Channel DAHDI/i1/5500358923165165-1 left ‘simple_bridge’ basic-bridge
– Channel SIP/192.168.0.103-00000001 left ‘simple_bridge’ basic-bridge
– Hungup ‘DAHDI/i1/5500358923165165-1’
== Spawn extension (default, 5500358923165165, 2) exited non-zero on ‘SIP/192.168.0.103-00000001’
[Jun 7 09:47:35] WARNING[4929]: chan_sip.c:4047 retrans_pkt: Retransmission timeout reached on transmission 9af09b8a0261a4cfc9b52d692d4a5f8d for seqno 1 (Critical Response) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response
[Jun 7 09:47:47] NOTICE[4929]: chan_sip.c:27866 handle_request_register: Registration from ‘“20050” sip:20050@192.168.0.29’ failed for ‘192.168.0.20:5063’ - Wrong password

Regards,

Okay, first off: Which channel driver do you want to use for SIP for devices? chan_sip or chan_pjsip.

hi

I wanted to use pjsip :wink:

Okay, so in order to use PJSIP you need to change the bind port of chan_sip - for example “udpbindaddr=0.0.0.0:5062” in the general section. This will run it on port 5062. Once that is done you should be able to use PJSIP using what you’ve posted before.

Hi

i only register just one :wink: , ;(

hi
ok when i use udpbindaddr=0.0.0.0:5062 in chan_sip just one 20020 in phone register but in cli a don see any thing
like pjsip show registrations any thing appears .

i try to use the commands more relevant and you ca see what happens.
ipbx*CLI> pjsip list aors

  Aor:  <Aor..............................................>  <MaxContact>

=========================================================================================

  Aor:  20020                                                0
  Aor:  20030                                                0

ipbx*CLI> pjsip show auths

I/OAuth: <AuthId/UserName…>

 Auth:  20020/20020
 Auth:  20030/20030

[Jun 8 09:39:29] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
ipbx*CLI> pjsip show channels
No objects found.

[Jun 8 09:39:59] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
ipbx*CLI> pjsip show channels
No objects found.

ipbx*CLI> pjsip show contacts

Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>

Contact: 20020/sip:20020@192.168.0.20:5060 Unknown nan
Contact: 20030/sip:20030@192.168.0.20:5060 Unknown nan

ipbx*CLI> pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <ip/cidr…>
Channel: <ChannelId…> <State…> <Time(sec)>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 20020/20020 Not in use 0 of inf
InAuth: 20020/20020
Aor: 20020 0
Contact: 20020/sip:20020@192.168.0.20:5060 Unknown nan

Endpoint: 20030/20030 Not in use 0 of inf
InAuth: 20030/20030
Aor: 20030 0
Contact: 20030/sip:20030@192.168.0.20:5060 Unknown nan

[Jun 8 09:40:21] WARNING[16653]: chan_sip.c:4109 retrans_pkt: Timeout on 370762c9d761cb69a721cb9e9252ad01 on non-critical invite transaction.
[Jun 8 09:40:29] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
ipbx*CLI> pjsip show identifies
No objects found.

ipbx*CLI> pjsip show registrations
No objects found.

ipbx*CLI> pjsip show transports
No objects found.

[Jun 8 09:40:59] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
[Jun 8 09:41:29] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
[Jun 8 09:41:49] WARNING[16653]: chan_sip.c:4109 retrans_pkt: Timeout on 532a96e61c61e966c923b56770666b5e on non-critical invite transaction.
[Jun 8 09:41:59] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password
[Jun 8 09:42:29] NOTICE[16653]: chan_sip.c:27866 handle_request_register: Registration from ‘“20040” sip:20040@192.168.0.29’ failed for ‘192.168.0.20:5062’ - Wrong password

Regrds

What is the current configuration and the console output at startup?