Hello,
I’m having some problems to receive AMI events (PeerStatus for example) when using realtime to register users.
When configuring endpoints on pjsip.conf everything is ok, when using realtime, I only receive ChallengeSent and SuccessfulAuth events.
Here is my sorcery.conf :
[res_pjsip]
endpoint/cache=memory_cache,expire_on_reload=yes,object_lifetime_maximum=1
endpoint=realtime,ps_endpoints
endpoint=config,pjsip.conf,criteria=type=endpoint
auth/cache=memory_cache,expire_on_reload=yes,object_lifetime_maximum=1
auth=realtime,ps_auths
auth=config,pjsip.conf,criteria=type=auth
aor/cache=memory_cache,expire_on_reload=yes,object_lifetime_maximum=1
aor=realtime,ps_aors
aor=config,pjsip.conf,criteria=type=aor
Here my extconfig.conf:
[settings]
ps_endpoints => curl,localhost:8083/box-services/openapi/telephony/sip/account/info/endpoints
ps_aors => curl,localhost:8083/box-services/openapi/telephony/sip/account/info/aors
ps_auths => curl,localhost:8083/box-services/openapi/telephony/sip/account/info/auths
User is registered on my Asterisk server
box*CLI> pjsip show contacts
Contact: <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
Contact: sipphone1/sip:sipphone1@172.20.100.1:36141;rin 55eb273a96 Avail 34.247
Objects found: 1
box*CLI>
box*CLI> pjsip show aor sipphone1
Aor: <Aor..............................................> <MaxContact>
Contact: <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
Aor: sipphone1 1
Contact: sipphone1/sip:sipphone1@172.20.100.1:36141;r 55eb273a96 Avail 32.123
ParameterName : ParameterValue
==================================================================================
authenticate_qualify : false
contact : sip:sipphone1@172.20.100.1:36141;rinstance=e3c36db5f8a64cc1
default_expiration : 3600
mailboxes :
max_contacts : 1
maximum_expiration : 7200
minimum_expiration : 60
outbound_proxy :
qualify_frequency : 10
qualify_timeout : 15.000000
remove_existing : false
support_path : false
voicemail_extension :
box*CLI>
box*CLI> pjsip show auth sipphone1
I/OAuth: <AuthId/UserName.............................................................>
==========================================================================================
Auth: sipphone1/sipphone1
ParameterName : ParameterValue
=================================================
auth_type : md5
md5_cred : xxxxxxxxxxxxxxxxxxxxxxxx
nonce_lifetime : 32
oauth_clientid :
oauth_secret :
password :
realm : box
refresh_token :
username : sipphone1
box*CLI>
box*CLI> pjsip show endpoint sipphone1
Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.>
I/OAuth: <AuthId/UserName...........................................................>
Aor: <Aor............................................> <MaxContact>
Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................>
Identify: <Identify/Endpoint.........................................................>
Match: <criteria.........................>
Channel: <ChannelId......................................> <State.....> <Time.....>
Exten: <DialedExten...........> CLCID: <ConnectedLineCID.......>
==========================================================================================
Endpoint: sipphone1 Unavailable 0 of inf
InAuth: sipphone1/sipphone1
Aor: sipphone1 1
Contact: sipphone1/sip:sipphone1@172.20.100.1:36141 55eb273a96 Avail 36.836
ParameterName : ParameterValue
===================================================================================================
100rel : yes
PHONENAME : sipphone1
PHONETYPE : SIP
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : true
allow : (alaw|ilbc|g729|gsm|g723|ulaw)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
allow_unauthenticated_options : false
aors : sipphone1
asymmetric_rtp_codec : false
auth : sipphone1
bind_rtp_to_media_address : false
bundle : false
call_group :
callerid : <unknown>
callerid_privacy : allowed_not_screened
callerid_tag :
codec_prefs_incoming_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method : invite
contact_acl :
context : from-phone
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_auto_generate_cert : No
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
fax_detect_timeout : 0
follow_early_media_fork : true
force_avp : false
force_rport : true
from_domain :
from_user :
g726_non_standard : false
ice_support : false
identify_by : username,ip
ignore_183_without_sdp : false
inband_progress : false
incoming_call_offer_pref : local
incoming_mwi_mailbox :
language :
mailboxes :
max_audio_streams : 1
max_video_streams : 1
media_address :
media_encryption : no
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_passthrough : false
moh_suggest : default
mwi_from_user :
mwi_subscribe_replaces_unsolicited : no
named_call_group :
named_pickup_group :
notify_early_inuse_ringing : false
one_touch_recording : false
outbound_auth :
outbound_proxy :
outgoing_call_offer_pref : remote_merge
pickup_group :
preferred_codec_only : false
record_off_feature : automixmon
record_on_feature : automixmon
refer_blind_progress : true
rewrite_contact : true
rpid_immediate : false
rtcp_mux : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_keepalive : 0
rtp_symmetric : true
rtp_timeout : 0
rtp_timeout_hold : 0
sdp_owner : -
sdp_session : Asterisk
send_connected_line : yes
send_diversion : true
send_history_info : false
send_pai : false
send_rpid : false
srtp_tag_32 : false
stir_shaken : false
sub_min_expiry : 0
subscribe_context :
suppress_q850_reason_headers : false
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_connected_line : yes
trust_id_inbound : false
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false
voicemail_extension :
webrtc : no
My manager.conf file :
[root@box asterisk]# cat manager.conf
;
; Asterisk Call Management support
;
; By default asterisk will listen on localhost only.
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[manager]
secret=xxxxxxxxx
permit=0.0.0.0/0.0.0.0
;read=system,call,log,verbose,agent,command,user,all
;write=system,call,log,verbose,agent,command,user,all
read=all
write=all
[root@box asterisk]#
When I register my soft phone, I only receive following events:
[2021-07-06 09:11:00] VERBOSE[23731] manager.c: <-- Examining AMI event: -->
Event: ChallengeSent
Privilege: security,all
SequenceNumber: 61
File: manager.c
Line: 1864
Func: manager_default_msg_cb
EventTV: 2021-07-06T09:11:00.765+0000
Severity: Informational
Service: PJSIP
EventVersion: 1
AccountID: sipphone1
SessionID: _LiZG85XUZzqO3gcQT9ySA..
LocalAddress: IPV4/UDP/172.20.100.65/5060
RemoteAddress: IPV4/UDP/172.20.100.1/36141
Challenge:
[2021-07-06 09:11:00] VERBOSE[23735] manager.c: <-- Examining AMI event: -->
Event: ChallengeSent
Privilege: security,all
SequenceNumber: 61
File: manager.c
Line: 1864
Func: manager_default_msg_cb
EventTV: 2021-07-06T09:11:00.765+0000
Severity: Informational
Service: PJSIP
EventVersion: 1
AccountID: sipphone1
SessionID: _LiZG85XUZzqO3gcQT9ySA..
LocalAddress: IPV4/UDP/172.20.100.65/5060
RemoteAddress: IPV4/UDP/172.20.100.1/36141
Challenge:
[2021-07-06 09:11:00] VERBOSE[23731] manager.c: <-- Examining AMI event: -->
Event: SuccessfulAuth
Privilege: security,all
SequenceNumber: 62
File: manager.c
Line: 1864
Func: manager_default_msg_cb
EventTV: 2021-07-06T09:11:00.799+0000
Severity: Informational
Service: PJSIP
EventVersion: 1
AccountID: sipphone1
SessionID: _LiZG85XUZzqO3gcQT9ySA..
LocalAddress: IPV4/UDP/172.20.100.65/5060
RemoteAddress: IPV4/UDP/172.20.100.1/36141
UsingPassword: 1
[2021-07-06 09:11:00] VERBOSE[23735] manager.c: <-- Examining AMI event: -->
Event: SuccessfulAuth
Privilege: security,all
SequenceNumber: 62
File: manager.c
Line: 1864
Func: manager_default_msg_cb
EventTV: 2021-07-06T09:11:00.799+0000
Severity: Informational
Service: PJSIP
EventVersion: 1
AccountID: sipphone1
SessionID: _LiZG85XUZzqO3gcQT9ySA..
LocalAddress: IPV4/UDP/172.20.100.65/5060
RemoteAddress: IPV4/UDP/172.20.100.1/36141
UsingPassword: 1
I’m running Asterisk 18.4.0
Any help would be nice on my problem, I’ve read a lot of discussions about it but didn’t find any answer …
Thank you.
Florian