Hi,
I am totally new in PJSIP and things with it. I configured transport, endpoint, aor and auth it looks properly but while I try to register I see on CLI something like that:
|[Feb 14 13:09:20] WARNING[10968]: pjproject: <?>: | tsx0x7f64fc017f78 ..Error sending Response msg 200/REGISTER/cseq=27942 (tdta0x55983fffa238): Transport not available for use (PJSIP_ETPNOTAVAIL)|
|---|---|
|[Feb 14 13:09:20] WARNING[10968]: pjproject: <?>: | tsx0x7f64fc017f78 ..Error sending Response msg 200/REGISTER/cseq=27942 (tdta0x7f65140015d8): Transport not available for use (PJSIP_ETPNOTAVAIL)|
|[Feb 14 13:09:21] WARNING[10968]: pjproject: <?>: | tsx0x7f64fc017f78 ..Error sending Response msg 200/REGISTER/cseq=27942 (tdta0x7f651000d6e8): Transport not available for use (PJSIP_ETPNOTAVAIL)|
|[Feb 14 13:09:23] WARNING[10968]: pjproject: <?>: | tsx0x7f64fc017f78 ..Error sending Response msg 200/REGISTER/cseq=27942 (tdta0x7f65a0012468): Transport not available for use (PJSIP_ETPNOTAVAIL)|
jcolp
February 14, 2019, 1:15pm
2
What is the actual configuration? I’d also suggest not setting “transport” on endpoint, it’s generally not needed.
Ok, i removed transport from endpoint’s configuration. What part of config you need? It is in DB so again I will have to write script to drop config into humanreadable format.
jcolp
February 14, 2019, 1:18pm
4
Console output, the SIP traffic itself (pjsip set logger on), information about the endpoint registering, and the endpoint configuration.
pjsip logger
*CLI> <--- Received SIP request (598 bytes) from UDP:89.69.255.64:62067 --->
REGISTER sip:gateway.szaman.it:5090 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.104:62067;rport;branch=z9hG4bKPj747628b77556434dbc73ca3c17bcf56c
Route: <sip:gateway.szaman.it:5090;lr>
Max-Forwards: 70
From: "1000" <sip:1000@gateway.szaman.it>;tag=95a4235f5a7e4095bcfc7dbcdf7b2e4c
To: "1000" <sip:1000@gateway.szaman.it>
Call-ID: eccd6c6b612c454bb811b70e0c84a81f
CSeq: 50002 REGISTER
User-Agent: MicroSIP/3.18.3
Contact: "1000" <sip:1000@192.168.88.104:62067;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
<--- Transmitting SIP response (527 bytes) to UDP:89.69.255.64:62067 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.104:62067;rport=62067;received=89.69.255.64;branch=z9hG4bKPj747628b77556434dbc73ca3c17bcf56c
Call-ID: eccd6c6b612c454bb811b70e0c84a81f
From: "1000" <sip:1000@gateway.szaman.it>;tag=95a4235f5a7e4095bcfc7dbcdf7b2e4c
To: "1000" <sip:1000@gateway.szaman.it>;tag=z9hG4bKPj747628b77556434dbc73ca3c17bcf56c
CSeq: 50002 REGISTER
Date: Thu, 14 Feb 2019 15:55:15 GMT
Contact: <sip:1000@89.69.255.64:62067;ob>;expires=299
Expires: 300
Server: Asterisk PBX 16.1.1
Content-Length: 0
[Feb 14 15:55:15] WARNING[11253]: pjproject: <?>: tsx0x7f667401c808 ..Error sending Response msg 200/REGISTER/cseq=50002 (tdta0x55d1c61f6e88): Transport not available for use (PJSIP_ETPNOTAVAIL)
<--- Transmitting SIP response (530 bytes) to UDP:89.69.255.64:62067 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.104:62067;rport=62067;received=89.69.255.64;branch=z9hG4bKPj747628b77556434dbc73ca3c17bcf56c
Call-ID: eccd6c6b612c454bb811b70e0c84a81f
From: "1000" <sip:1000@gateway.szaman.it>;tag=95a4235f5a7e4095bcfc7dbcdf7b2e4c
To: "1000" <sip:1000@gateway.szaman.it>;tag=z9hG4bKPj747628b77556434dbc73ca3c17bcf56c
CSeq: 50002 REGISTER
Date: Thu, 14 Feb 2019 15:55:15 GMT
Contact: <sip:1000@164.132.140.248:62067;ob>;expires=299
Expires: 300
Server: Asterisk PBX 16.1.1
Content-Length: 0
asterisk config from database
ps_aors
==ROW of ps_aors==
id = 1000
max_contacts = 1
remove_existing = yes
ps_auths
==ROW of ps_auths==
id = 1000
auth_type = userpass
password = changedPassword
username = 1000
ps_endpoints
==ROW of ps_endpoints==
id = 1000
aors = 1000
context = internal
allow = ulaw,alaw
dtmf_mode = rfc4733
force_rport = yes
ice_support = yes
rewrite_contact = yes
rtp_symmetric = yes
send_pai = yes
timers = yes
ps_transports
==ROW of ps_transports==
id = transport-udp
bind = 0.0.0.0:5090
external_media_address = 164.132.140.248
external_signaling_address = 164.132.140.248
local_net = 192.168.100.0/24
protocol = udp
tos = cs3
cos = 3
allow_reload = yes
ok I update endpoint configuration because auth parameter was missed. And in fact this error stop appear but i stil cant make register
==ROW of ps_aors==
id = 1000
max_contacts = 1
remove_existing = yes
ps_auths
==ROW of ps_auths==
id = 1000
auth_type = userpass
password = changed
username = 1000
ps_endpoints
==ROW of ps_endpoints==
id = 1000
aors = 1000
auth = 1000
context = internal
allow = ulaw,alaw
ps_transports
==ROW of ps_transports==
id = transport-udp
bind = 0.0.0.0:5090
external_media_address = 164.132.140.248
external_signaling_address = 164.132.140.248
local_net = 192.168.100.0/24
protocol = udp
tos = cs3
cos = 3
allow_reload = yes
and sip track
--- Received SIP request (598 bytes) from UDP:89.69.255.64:62067 --->
REGISTER sip:gateway.szaman.it:5090 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.104:62067;rport;branch=z9hG4bKPj57cbbd4974cc48a5ab82a2889f4e7696
Route: <sip:gateway.szaman.it:5090;lr>
Max-Forwards: 70
From: "1000" <sip:1000@gateway.szaman.it>;tag=05d3d52107fc4cb6aedc440f8b463a26
To: "1000" <sip:1000@gateway.szaman.it>
Call-ID: aad3afb897674022a031b8c16171e95e
CSeq: 58699 REGISTER
User-Agent: MicroSIP/3.18.3
Contact: "1000" <sip:1000@192.168.88.104:62067;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
<--- Transmitting SIP response (577 bytes) to UDP:89.69.255.64:62067 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.88.104:62067;rport=62067;received=89.69.255.64;branch=z9hG4bKPj57cbbd4974cc48a5ab82a2889f4e7696
Call-ID: aad3afb897674022a031b8c16171e95e
From: "1000" <sip:1000@gateway.szaman.it>;tag=05d3d52107fc4cb6aedc440f8b463a26
To: "1000" <sip:1000@gateway.szaman.it>;tag=z9hG4bKPj57cbbd4974cc48a5ab82a2889f4e7696
CSeq: 58699 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1550167563/8ad9d61da8d109958524ab032e013ec8",opaque="0004a14c512fa070",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.1.1
Content-Length: 0
OK, There is some problem with putting transports into database
Why doesn’t the endpoint(s) have a transport= setting defined telling the endpoint which transport to use?
I think I remember reading that transports should not be put in the database
https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
"PJSIP transport object types are not stored in realtime as unexpected results can occur. "
1 Like
Nice shot. I will check my another Asterisk instance and be sure if there I have transport in DB or in file
EDIT. Checked. I have on my another asterisk box transport configured in file. So assume your suggest is solution to my problem