Ruisheng Peng
2021-Feb-04 02:11 UTC
[asterisk-users] Hangup() not working for handsets using pls transport?
Hi all,
I managed to get tls transport going with asterisk 16.14.0, and set one
handset (SOFTPHONE_B) to use the transport. I have set up a few other
handsets (both soft and hard) to use udp and tcp transports:
voip1*CLI> pjsip show endpoints
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: 0000f30A0A01 Not in
use 0 of inf
InAuth: 0000f30A0A01/0000f30A0A01
Aor: 0000f30A0A01 1
Contact: 0000f30A0A01/sip:0000f30A0A01 at 128.171.77.1 4800418965
NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Endpoint: 0000f30B0B02 Not in
use 0 of inf
InAuth: 0000f30B0B02/0000f30B0B02
Aor: 0000f30B0B02 1
Contact: 0000f30B0B02/sip:0000f30B0B02 at 128.171.77.4 615cc2a2c6
NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Endpoint: SOFTPHONE_A
Unavailable 0 of inf
InAuth: SOFTPHONE_A/SOFTPHONE_A
Aor: SOFTPHONE_A 2
Transport: transport-tcp tcp 0 0 0.0.0.0:5060
Endpoint: SOFTPHONE_B Not in
use 0 of inf
InAuth: SOFTPHONE_B/SOFTPHONE_B
Aor: SOFTPHONE_B 2
Contact: SOFTPHONE_B/sip:SOFTPHONE_B at 128.171.168.23 78257ab30a
NonQual nan
Transport: transport-tls tls 0 0 0.0.0.0:5061
Objects found: 4
voip1*CLI>
For testing, I have the following in /etc/asterisk/extensions.conf:
[globals]
; General internal dialing options used in context Dial-Users.
; Only the timeout is defined here. See the Dial app documentation for
; additional options.
INTERNAL_DIAL_OPT=,30
RP_Yealink = PJSIP/0000f30A0A01
RP_Cisco = PJSIP/0000f30B0B02
RP_HMBP = PJSIP/SOFTPHONE_A
RP_OMBP = PJSIP/SOFTPHONE_B
[sets]
exten => 100,1,Dial(${RP_Yealink},10,m)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 101,1,Dial(${RP_Cisco},10)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 102,1,Dial(${RP_HMBP})
exten => 103,1,Dial(${RP_OMBP},10)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
When using handsets with udp or tcp transports to dial ext 100, it'd hangup
after the no-one-arround message. However, when using the handset with tls
transport, it doesn't hang up on its own if ext 100 is not answered. I
have to click the hangup button to accomplish that. Here's what asterisk
log shows:
== Setting global variable 'SIPDOMAIN' to '128.171.77.23'
-- Executing [100 at sets:1] Dial("PJSIP/SOFTPHONE_B-00000007",
"
PJSIP/0000f30A0A01,10,m") in new stack
-- Called PJSIP/0000f30A0A01
-- Started music on hold, class 'default', on channel
'PJSIP/SOFTPHONE_B-00000007'
> 0x7f0fa801ede0 -- Strict RTP learning after remote address set to:
128.171.168.233:7078
-- PJSIP/0000f30A0A01-00000008 is ringing
-- PJSIP/0000f30A0A01-00000008 is ringing
> 0x7f0fa801ede0 -- Strict RTP switching to RTP target address
128.171.168.233:7078 as source
> 0x7f0fa801ede0 -- Strict RTP learning complete - Locking on source
address 128.171.168.233:7078
-- Nobody picked up in 10000 ms
-- Stopped music on hold on PJSIP/SOFTPHONE_B-00000007
-- Executing [100 at sets:2]
Playback("PJSIP/SOFTPHONE_B-00000007", "
vm-nobodyavail") in new stack
-- <PJSIP/SOFTPHONE_B-00000007> Playing 'vm-nobodyavail.slin'
(language
'en')
-- Executing [100 at sets:3] Hangup("PJSIP/SOFTPHONE_B-00000007",
"") in
new stack
== Spawn extension (sets, 100, 3) exited non-zero on
'PJSIP/SOFTPHONE_B-00000007'
voip1*CLI>
Another quirk is when I use a phone with udp transport (RP_Yealink) to
call a phone with tls transport (RP_OMBP) it immediately jumps
the no-one-around message w/o ringing, then hang up. The tls phone is
shown available but asterisk sees it busy:
== Setting global variable 'SIPDOMAIN' to '128.171.77.23'
-- Executing [103 at sets:1] Dial("PJSIP/0000f30A0A01-0000000d",
"
PJSIP/SOFTPHONE_B,10") in new stack
-- Called PJSIP/SOFTPHONE_B
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [103 at sets:2]
Playback("PJSIP/0000f30A0A01-0000000d", "
vm-nobodyavail") in new stack
> 0x7f0fa000c330 -- Strict RTP learning after remote address set to:
128.171.77.118:11790
> 0x7f0fa000c330 -- Strict RTP switching to RTP target address
128.171.77.118:11790 as source
-- <PJSIP/0000f30A0A01-0000000d> Playing 'vm-nobodyavail.slin'
(language 'en')
-- Executing [103 at sets:3] Hangup("PJSIP/0000f30A0A01-0000000d",
"") in
new stack
== Spawn extension (sets, 103, 3) exited non-zero on
'PJSIP/0000f30A0A01-0000000d'
voip1*CLI>
Suppose it's not cool to mix transports among your handsets? Any
suggestions?
Thanks,
--Ruisheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20210203/2fbecd6e/attachment.html>
Joshua C. Colp
2021-Feb-04 09:43 UTC
[asterisk-users] Hangup() not working for handsets using pls transport?
On Wed, Feb 3, 2021 at 11:02 PM Ruisheng Peng <rpeng at ifa.hawaii.edu> wrote: <snip> When using handsets with udp or tcp transports to dial ext 100, it'd hangup> after the no-one-arround message. However, when using the handset with tls > transport, it doesn't hang up on its own if ext 100 is not answered. I > have to click the hangup button to accomplish that. Here's what asterisk > log shows: > > == Setting global variable 'SIPDOMAIN' to '128.171.77.23' > > -- Executing [100 at sets:1] Dial("PJSIP/SOFTPHONE_B-00000007", " > PJSIP/0000f30A0A01,10,m") in new stack > > -- Called PJSIP/0000f30A0A01 > > -- Started music on hold, class 'default', on channel > 'PJSIP/SOFTPHONE_B-00000007' > > > 0x7f0fa801ede0 -- Strict RTP learning after remote address set > to: 128.171.168.233:7078 > > -- PJSIP/0000f30A0A01-00000008 is ringing > > -- PJSIP/0000f30A0A01-00000008 is ringing > > > 0x7f0fa801ede0 -- Strict RTP switching to RTP target address > 128.171.168.233:7078 as source > > > 0x7f0fa801ede0 -- Strict RTP learning complete - Locking on > source address 128.171.168.233:7078 > > -- Nobody picked up in 10000 ms > > -- Stopped music on hold on PJSIP/SOFTPHONE_B-00000007 > > -- Executing [100 at sets:2] Playback("PJSIP/SOFTPHONE_B-00000007", " > vm-nobodyavail") in new stack > > -- <PJSIP/SOFTPHONE_B-00000007> Playing 'vm-nobodyavail.slin' > (language 'en') > > -- Executing [100 at sets:3] Hangup("PJSIP/SOFTPHONE_B-00000007", "") in > new stack > > == Spawn extension (sets, 100, 3) exited non-zero on > 'PJSIP/SOFTPHONE_B-00000007' > voip1*CLI> > > Another quirk is when I use a phone with udp transport (RP_Yealink) to > call a phone with tls transport (RP_OMBP) it immediately jumps > the no-one-around message w/o ringing, then hang up. The tls phone is > shown available but asterisk sees it busy: > > == Setting global variable 'SIPDOMAIN' to '128.171.77.23' > > -- Executing [103 at sets:1] Dial("PJSIP/0000f30A0A01-0000000d", " > PJSIP/SOFTPHONE_B,10") in new stack > > -- Called PJSIP/SOFTPHONE_B > > == Everyone is busy/congested at this time (1:0/1/0) > > -- Executing [103 at sets:2] Playback("PJSIP/0000f30A0A01-0000000d", " > vm-nobodyavail") in new stack > > > 0x7f0fa000c330 -- Strict RTP learning after remote address set > to: 128.171.77.118:11790 > > > 0x7f0fa000c330 -- Strict RTP switching to RTP target address > 128.171.77.118:11790 as source > > -- <PJSIP/0000f30A0A01-0000000d> Playing 'vm-nobodyavail.slin' > (language 'en') > > -- Executing [103 at sets:3] Hangup("PJSIP/0000f30A0A01-0000000d", "") > in new stack > > == Spawn extension (sets, 103, 3) exited non-zero on > 'PJSIP/0000f30A0A01-0000000d' > > voip1*CLI> > > Suppose it's not cool to mix transports among your handsets? Any > suggestions? >I'd suggest looking at the actual SIP signaling to see what is going on using "pjsip set logger on" and also providing configuration. This would allow better insight into what exactly is going on. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210204/225202e7/attachment.html>