Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-12 Thread Ruisheng Peng
I was able to get on the UI of the Yealink T32G and fiddle with the
setting.  Here's the setting for TLS transport in
/etc/asterisk/extensions.conf:

[transport-tls]

type = transport

protocol = tls

bind = 0.0.0.0:5061

; ca_list_file = /etc/asterisk/keys/ca.crt

; cert_file = /etc/asterisk/keys/asterisk.crt

; priv_key_file = /etc/asterisk/keys/asterisk.key

cert_file = /etc/asterisk/keys/fullchain.pem

priv_key_file = /etc/asterisk/keys/privkey.pem


method = tlsv1_2

allow_reload = true

Using FQHN for sip server still results in the same error with the phone
failing to registered:

[Feb 12 16:55:33] WARNING[2080] pjproject:SSL
SSL_ERROR_SSL (Handshake): Level: 0 err: <336027900>  len: 0 peer:
128.171.77.34:45830

I tried to upload my cert.pem (by Letsencrypt) to the phone as one of the
trusted certificates and check "accept only trusted certificates".  It
didn't help.  Nor does unchecking "accept only trusted certificates''.
There seem to be some reports in freepbx forum re trouble setting up
yearlink phones with tls transport:

https://community.freepbx.org/t/tls-freepbx-and-yealink/59174

 Yealink's writeup re using security certificates was for certain
models/firmware levels, and mine isn't among them.  I guess I'll probably
have to accept that the few Yealink T32G will not play nice with TLS
transport and buy the "sanctioned" models when rolling out the new Asterisk
16.14 server.  I may also try my luck with the Cisco 7940/7960 phones that
populate most of our offices.

  Thanks,

--Ruisheng


On Fri, Feb 12, 2021 at 3:13 PM Ruisheng Peng  wrote:

> Thanks Joshua for the tip re using hostname rather than IP address when
> configuring the phone.  It worked nicely on the linphone on my macbookpro
> at home.  Dialplans are followed faithfully w/o the problems I experienced
> earlier.  I'll test using the hostname on the Yealink phone next time I'm
> in office.
>
>   Thanks,
>
> --Ruisheng
>
> On Fri, Feb 12, 2021 at 4:48 AM Joshua C. Colp  wrote:
>
>> On Thu, Feb 11, 2021 at 9:01 PM Ruisheng Peng 
>> wrote:
>>
>>> Sorry, my bad.  I failed to change the transport to tls on the provision
>>> for the hardphone, nor did change the transport on the linphone setup.
>>> However, after I do that, the hardphone (Yealink T32G) failed to register,
>>> citing:
>>>
>>> [Feb 11 14:16:03] WARNING[24936]: pjproject: :
>>> SSL SSL_ERROR_SSL (Handshake): Level: 0 err: <336027900> >> routines-SSL23_GET_CLIENT_HELLO-unknown protocol> len: 0 peer:
>>> 128.171.77.34:30401
>>>
>>
>> This would be caused by the TLS transport configuration on Asterisk or
>> the phone potentially. You'd need to provide the transport definition from
>> pjsip.conf. Without that I can say the "method" option is likely needing
>> changing. I'm not familiar with what is supported by Yealink.
>>
>>
>>> on the linphone side, it also fails to register:
>>>
>>> 2021-02-11 13:26:32:637 [linphone/belle-sip] MESSAGE Trying to connect
>>> to [TLS://:::128.171.77.23:5061]
>>>
>>> 2021-02-11 13:26:32:652 [linphone/belle-sip] MESSAGE Channel
>>> [0x7fc8b800]: Connected at TCP level, now doing TLS handshake with
>>> cname=128.171.77.23
>>>
>>> 2021-02-11 13:26:32:654 [linphone/belle-sip] MESSAGE Channel
>>> [0x7fc8b800]: SSL handshake in progress...
>>>
>>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>>> depth=[2], flags=[]:
>>>
>>> cert. version : 3
>>>
>>> serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
>>>
>>> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>>>
>>> subject name  : O=Digital Signature Trust Co., CN=DST Root CA X3
>>>
>>> issued  on: 2000-09-30 21:12:19
>>>
>>> expires on: 2021-09-30 14:01:15
>>>
>>> signed using  : RSA with SHA1
>>>
>>> RSA key size  : 2048 bits
>>>
>>> basic constraints : CA=true
>>>
>>> key usage : Key Cert Sign, CRL Sign
>>>
>>>
>>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>>> depth=[1], flags=[]:
>>>
>>> cert. version : 3
>>>
>>> serial number : 40:01:75:04:83:14:A4:C8:21:8C:84:A9:0C:16:CD:DF
>>>
>>> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>>>
>>> subject name  : C=US, O=Let's Encrypt, CN=R3
>>>
>>> issued  on: 2020-10-07 19:21:40
>>>
>>> expires on: 2021-09-29 19:21:40
>>>
>>> signed using  : RSA with SHA-256
>>>
>>> RSA key size  : 2048 bits
>>>
>>> basic constraints : CA=true, max_pathlen=0
>>>
>>> key usage : Digital Signature, Key Cert Sign, CRL Sign
>>>
>>> ext key usage : TLS Web Server Authentication, TLS Web Client
>>> Authentication
>>>
>>>
>>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>>> depth=[0], flags=[CN-mismatch ]:
>>>
>>> cert. version : 3
>>>
>>> serial number : 03:F0:83:3C:5D:41:76:BC:4E:B2:E6:AB:60:8C:F9:5E:27:86
>>>
>>> issuer name   : C=US, O=Let's Encrypt, CN=R3
>>>
>>> subject name  : 

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-12 Thread Ruisheng Peng
Thanks Joshua for the tip re using hostname rather than IP address when
configuring the phone.  It worked nicely on the linphone on my macbookpro
at home.  Dialplans are followed faithfully w/o the problems I experienced
earlier.  I'll test using the hostname on the Yealink phone next time I'm
in office.

  Thanks,

--Ruisheng

On Fri, Feb 12, 2021 at 4:48 AM Joshua C. Colp  wrote:

> On Thu, Feb 11, 2021 at 9:01 PM Ruisheng Peng 
> wrote:
>
>> Sorry, my bad.  I failed to change the transport to tls on the provision
>> for the hardphone, nor did change the transport on the linphone setup.
>> However, after I do that, the hardphone (Yealink T32G) failed to register,
>> citing:
>>
>> [Feb 11 14:16:03] WARNING[24936]: pjproject: :SSL
>> SSL_ERROR_SSL (Handshake): Level: 0 err: <336027900> > routines-SSL23_GET_CLIENT_HELLO-unknown protocol> len: 0 peer:
>> 128.171.77.34:30401
>>
>
> This would be caused by the TLS transport configuration on Asterisk or the
> phone potentially. You'd need to provide the transport definition from
> pjsip.conf. Without that I can say the "method" option is likely needing
> changing. I'm not familiar with what is supported by Yealink.
>
>
>> on the linphone side, it also fails to register:
>>
>> 2021-02-11 13:26:32:637 [linphone/belle-sip] MESSAGE Trying to connect to
>> [TLS://:::128.171.77.23:5061]
>>
>> 2021-02-11 13:26:32:652 [linphone/belle-sip] MESSAGE Channel
>> [0x7fc8b800]: Connected at TCP level, now doing TLS handshake with
>> cname=128.171.77.23
>>
>> 2021-02-11 13:26:32:654 [linphone/belle-sip] MESSAGE Channel
>> [0x7fc8b800]: SSL handshake in progress...
>>
>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>> depth=[2], flags=[]:
>>
>> cert. version : 3
>>
>> serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
>>
>> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>>
>> subject name  : O=Digital Signature Trust Co., CN=DST Root CA X3
>>
>> issued  on: 2000-09-30 21:12:19
>>
>> expires on: 2021-09-30 14:01:15
>>
>> signed using  : RSA with SHA1
>>
>> RSA key size  : 2048 bits
>>
>> basic constraints : CA=true
>>
>> key usage : Key Cert Sign, CRL Sign
>>
>>
>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>> depth=[1], flags=[]:
>>
>> cert. version : 3
>>
>> serial number : 40:01:75:04:83:14:A4:C8:21:8C:84:A9:0C:16:CD:DF
>>
>> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>>
>> subject name  : C=US, O=Let's Encrypt, CN=R3
>>
>> issued  on: 2020-10-07 19:21:40
>>
>> expires on: 2021-09-29 19:21:40
>>
>> signed using  : RSA with SHA-256
>>
>> RSA key size  : 2048 bits
>>
>> basic constraints : CA=true, max_pathlen=0
>>
>> key usage : Digital Signature, Key Cert Sign, CRL Sign
>>
>> ext key usage : TLS Web Server Authentication, TLS Web Client
>> Authentication
>>
>>
>> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
>> depth=[0], flags=[CN-mismatch ]:
>>
>> cert. version : 3
>>
>> serial number : 03:F0:83:3C:5D:41:76:BC:4E:B2:E6:AB:60:8C:F9:5E:27:86
>>
>> issuer name   : C=US, O=Let's Encrypt, CN=R3
>>
>> subject name  : CN=voip1.ifa.hawaii.edu
>>
>> issued  on: 2020-12-30 02:56:29
>>
>> expires on: 2021-03-30 02:56:29
>>
>> signed using  : RSA with SHA-256
>>
>> RSA key size  : 2048 bits
>>
>> basic constraints : CA=false
>>
>> subject alt name  : voip1.ifa.hawaii.edu
>>
>> key usage : Digital Signature, Key Encipherment
>>
>> ext key usage : TLS Web Server Authentication, TLS Web Client
>> Authentication
>>
>>
>> 2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Channel
>> [0x7fc8b800]: SSL handshake failed : X509 - Certificate verification
>> failed, e.g. CRL, CA or signature check failed
>>
>> 2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Cannot connect to
>> [TLS://128.171.77.23:5061]
>>
>
> I don't use linphone or have any experience so can only provide general
> comments. Either the certificate chain is incomplete and the client can't
> verify, or the client doesn't have the certificate authority root
> certificate as trusted. As well if you aren't doing so you have to connect
> to the hostname - you can't specify the IP address.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-12 Thread Joshua C. Colp
On Thu, Feb 11, 2021 at 9:01 PM Ruisheng Peng  wrote:

> Sorry, my bad.  I failed to change the transport to tls on the provision
> for the hardphone, nor did change the transport on the linphone setup.
> However, after I do that, the hardphone (Yealink T32G) failed to register,
> citing:
>
> [Feb 11 14:16:03] WARNING[24936]: pjproject: :SSL
> SSL_ERROR_SSL (Handshake): Level: 0 err: <336027900>  routines-SSL23_GET_CLIENT_HELLO-unknown protocol> len: 0 peer:
> 128.171.77.34:30401
>

This would be caused by the TLS transport configuration on Asterisk or the
phone potentially. You'd need to provide the transport definition from
pjsip.conf. Without that I can say the "method" option is likely needing
changing. I'm not familiar with what is supported by Yealink.


> on the linphone side, it also fails to register:
>
> 2021-02-11 13:26:32:637 [linphone/belle-sip] MESSAGE Trying to connect to
> [TLS://:::128.171.77.23:5061]
>
> 2021-02-11 13:26:32:652 [linphone/belle-sip] MESSAGE Channel
> [0x7fc8b800]: Connected at TCP level, now doing TLS handshake with
> cname=128.171.77.23
>
> 2021-02-11 13:26:32:654 [linphone/belle-sip] MESSAGE Channel
> [0x7fc8b800]: SSL handshake in progress...
>
> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
> depth=[2], flags=[]:
>
> cert. version : 3
>
> serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
>
> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>
> subject name  : O=Digital Signature Trust Co., CN=DST Root CA X3
>
> issued  on: 2000-09-30 21:12:19
>
> expires on: 2021-09-30 14:01:15
>
> signed using  : RSA with SHA1
>
> RSA key size  : 2048 bits
>
> basic constraints : CA=true
>
> key usage : Key Cert Sign, CRL Sign
>
>
> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
> depth=[1], flags=[]:
>
> cert. version : 3
>
> serial number : 40:01:75:04:83:14:A4:C8:21:8C:84:A9:0C:16:CD:DF
>
> issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3
>
> subject name  : C=US, O=Let's Encrypt, CN=R3
>
> issued  on: 2020-10-07 19:21:40
>
> expires on: 2021-09-29 19:21:40
>
> signed using  : RSA with SHA-256
>
> RSA key size  : 2048 bits
>
> basic constraints : CA=true, max_pathlen=0
>
> key usage : Digital Signature, Key Cert Sign, CRL Sign
>
> ext key usage : TLS Web Server Authentication, TLS Web Client
> Authentication
>
>
> 2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
> depth=[0], flags=[CN-mismatch ]:
>
> cert. version : 3
>
> serial number : 03:F0:83:3C:5D:41:76:BC:4E:B2:E6:AB:60:8C:F9:5E:27:86
>
> issuer name   : C=US, O=Let's Encrypt, CN=R3
>
> subject name  : CN=voip1.ifa.hawaii.edu
>
> issued  on: 2020-12-30 02:56:29
>
> expires on: 2021-03-30 02:56:29
>
> signed using  : RSA with SHA-256
>
> RSA key size  : 2048 bits
>
> basic constraints : CA=false
>
> subject alt name  : voip1.ifa.hawaii.edu
>
> key usage : Digital Signature, Key Encipherment
>
> ext key usage : TLS Web Server Authentication, TLS Web Client
> Authentication
>
>
> 2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Channel
> [0x7fc8b800]: SSL handshake failed : X509 - Certificate verification
> failed, e.g. CRL, CA or signature check failed
>
> 2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Cannot connect to
> [TLS://128.171.77.23:5061]
>

I don't use linphone or have any experience so can only provide general
comments. Either the certificate chain is incomplete and the client can't
verify, or the client doesn't have the certificate authority root
certificate as trusted. As well if you aren't doing so you have to connect
to the hostname - you can't specify the IP address.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-11 Thread Ruisheng Peng
Sorry, my bad.  I failed to change the transport to tls on the provision
for the hardphone, nor did change the transport on the linphone setup.
However, after I do that, the hardphone (Yealink T32G) failed to register,
citing:

[Feb 11 14:16:03] WARNING[24936]: pjproject: :SSL
SSL_ERROR_SSL (Handshake): Level: 0 err: <336027900>  len: 0 peer:
128.171.77.34:30401

on the linphone side, it also fails to register:

2021-02-11 13:26:32:637 [linphone/belle-sip] MESSAGE Trying to connect to
[TLS://:::128.171.77.23:5061]

2021-02-11 13:26:32:652 [linphone/belle-sip] MESSAGE Channel
[0x7fc8b800]: Connected at TCP level, now doing TLS handshake with
cname=128.171.77.23

2021-02-11 13:26:32:654 [linphone/belle-sip] MESSAGE Channel
[0x7fc8b800]: SSL handshake in progress...

2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
depth=[2], flags=[]:

cert. version : 3

serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B

issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3

subject name  : O=Digital Signature Trust Co., CN=DST Root CA X3

issued  on: 2000-09-30 21:12:19

expires on: 2021-09-30 14:01:15

signed using  : RSA with SHA1

RSA key size  : 2048 bits

basic constraints : CA=true

key usage : Key Cert Sign, CRL Sign


2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
depth=[1], flags=[]:

cert. version : 3

serial number : 40:01:75:04:83:14:A4:C8:21:8C:84:A9:0C:16:CD:DF

issuer name   : O=Digital Signature Trust Co., CN=DST Root CA X3

subject name  : C=US, O=Let's Encrypt, CN=R3

issued  on: 2020-10-07 19:21:40

expires on: 2021-09-29 19:21:40

signed using  : RSA with SHA-256

RSA key size  : 2048 bits

basic constraints : CA=true, max_pathlen=0

key usage : Digital Signature, Key Cert Sign, CRL Sign

ext key usage : TLS Web Server Authentication, TLS Web Client
Authentication


2021-02-11 13:26:32:674 [linphone/belle-sip] MESSAGE Found certificate
depth=[0], flags=[CN-mismatch ]:

cert. version : 3

serial number : 03:F0:83:3C:5D:41:76:BC:4E:B2:E6:AB:60:8C:F9:5E:27:86

issuer name   : C=US, O=Let's Encrypt, CN=R3

subject name  : CN=voip1.ifa.hawaii.edu

issued  on: 2020-12-30 02:56:29

expires on: 2021-03-30 02:56:29

signed using  : RSA with SHA-256

RSA key size  : 2048 bits

basic constraints : CA=false

subject alt name  : voip1.ifa.hawaii.edu

key usage : Digital Signature, Key Encipherment

ext key usage : TLS Web Server Authentication, TLS Web Client
Authentication


2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Channel
[0x7fc8b800]: SSL handshake failed : X509 - Certificate verification
failed, e.g. CRL, CA or signature check failed

2021-02-11 13:26:32:674 [linphone/belle-sip] ERROR Cannot connect to [TLS://
128.171.77.23:5061]


On Mon, Feb 8, 2021 at 12:27 PM Joshua C. Colp  wrote:

> On Mon, Feb 8, 2021 at 6:14 PM Ruisheng Peng  wrote:
>
>> Thanks Jashua for the suggestion.  To find out if the issue was only
>> limited to the softphone that was using tls transport (SOFTPHONE_B on ext
>> 103, a linphone running off my MBP), I also turned one of the hard phone
>> (f30A0A01 on ext 100, a Yealink T32G) into using tls transport.  It
>> behaves similarly to the linphone in that the Hangup() call in dialplan is
>> silently ignored, and the handsets would alway appear as busy/unavilable.
>>
>
> Have you configured the devices, on them or using their provisioning, to
> use TLS? It does not appear so as they are using UDP, while you're forcing
> a TLS transport in Asterisk. This would not work.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-08 Thread Joshua C. Colp
On Mon, Feb 8, 2021 at 6:14 PM Ruisheng Peng  wrote:

> Thanks Jashua for the suggestion.  To find out if the issue was only
> limited to the softphone that was using tls transport (SOFTPHONE_B on ext
> 103, a linphone running off my MBP), I also turned one of the hard phone
> (f30A0A01 on ext 100, a Yealink T32G) into using tls transport.  It
> behaves similarly to the linphone in that the Hangup() call in dialplan is
> silently ignored, and the handsets would alway appear as busy/unavilable.
>

Have you configured the devices, on them or using their provisioning, to
use TLS? It does not appear so as they are using UDP, while you're forcing
a TLS transport in Asterisk. This would not work.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-08 Thread Ruisheng Peng
Thanks Jashua for the suggestion.  To find out if the issue was only
limited to the softphone that was using tls transport (SOFTPHONE_B on ext
103, a linphone running off my MBP), I also turned one of the hard phone
(f30A0A01 on ext 100, a Yealink T32G) into using tls transport.  It
behaves similarly to the linphone in that the Hangup() call in dialplan is
silently ignored, and the handsets would alway appear as busy/unavilable.

Here're the relevant part of my /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/f30A0A01

RP_Cisco = PJSIP/f30B0B02

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()


exten => 110,1,Dial(${RP_Yealink}&${RP_Cisco})


exten => 200,1,Answer()

   same => n,Playback(hello-world)

   same => n,Hangup()

  Here're what pjsip logger captures when using the tls softphone (on ext
103) to call ext 101 (Hello World!). I had to click the hanup button on the
linphone some 15s later to terminate the call.

<--- Received SIP request (1199 bytes) from UDP:128.171.168.233:5060 --->

INVITE sip:200@128.171.77.23 SIP/2.0

Via: SIP/2.0/UDP 128.171.168.233:5060;branch=z9hG4bK.D-YbrxKYs;rport

From: "VOIP1_test" ;tag=XvCbVpnIJ

To: sip:200@128.171.77.23

CSeq: 20 INVITE

Call-ID: ziUzVUxYw7

Max-Forwards: 70

Supported: replaces, outbound, gruu

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO, UPDATE

Content-Type: application/sdp

Content-Length: 531

Contact: ;expires=3599;+sip.instance=""

User-Agent: Linphone Desktop/4.2.2 (macOS 10.15, Qt 5.14.2)
LinphoneCore/4.4.0-13-gc99cb9c88


v=0

o=SOFTPHONE_B 1261 3707 IN IP4 128.171.168.233

s=Talk

c=IN IP4 128.171.168.233

t=0 0

a=rtcp-xr:rcvr-rtt=all:1 stat-summary=loss,dup,jitt,TTL voip-metrics

m=audio 7078 RTP/AVP 96 97 98 0 8 18 101 99 100

a=rtpmap:96 opus/48000/2

a=fmtp:96 useinbandfec=1

a=rtpmap:97 speex/16000

a=fmtp:97 vbr=on

a=rtpmap:98 speex/8000

a=fmtp:98 vbr=on

a=fmtp:18 annexb=yes

a=rtpmap:101 telephone-event/48000

a=rtpmap:99 telephone-event/16000

a=rtpmap:100 telephone-event/8000

a=rtcp-fb:* trr-int 1000

a=rtcp-fb:* ccm tmmbr


<--- Transmitting SIP response (479 bytes) to UDP:128.171.168.233:5060 --->

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 128.171.168.233:5060
;rport=5060;received=128.171.168.233;branch=z9hG4bK.D-YbrxKYs

Call-ID: ziUzVUxYw7

From: "VOIP1_test" ;tag=XvCbVpnIJ

To: ;tag=z9hG4bK.D-YbrxKYs

CSeq: 20 INVITE

WWW-Authenticate: Digest
realm="asterisk",nonce="1612573994/b1f976725d3cbb6b1fc9af5923a87ac7",opaque="50221ed627077186",algorithm=md5,qop="auth"

Server: Asterisk PBX 16.14.0

Content-Length:  0



<--- Received SIP request (412 bytes) from UDP:128.171.168.233:5060 --->

ACK sip:200@128.171.77.23 SIP/2.0

Via: SIP/2.0/UDP 128.171.168.233:5060;branch=z9hG4bK.D-YbrxKYs;rport

Call-ID: ziUzVUxYw7

From: "VOIP1_test" ;tag=XvCbVpnIJ

To: ;tag=z9hG4bK.D-YbrxKYs

Contact: ;expires=3599;+sip.instance=""

Max-Forwards: 70

CSeq: 20 ACK



<--- Received SIP request (1484 bytes) from UDP:128.171.168.233:5060 --->

INVITE sip:200@128.171.77.23 SIP/2.0

Via: SIP/2.0/UDP 128.171.168.233:5060;branch=z9hG4bK.HgO8RDlH4;rport

From: "VOIP1_test" ;tag=XvCbVpnIJ

To: sip:200@128.171.77.23

CSeq: 21 INVITE

Call-ID: ziUzVUxYw7

Max-Forwards: 70

Supported: replaces, outbound, gruu

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO, UPDATE

Content-Type: application/sdp

Content-Length: 531

Contact: ;expires=3599;+sip.instance=""

User-Agent: Linphone Desktop/4.2.2 (macOS 10.15, Qt 5.14.2)
LinphoneCore/4.4.0-13-gc99cb9c88

Authorization:  Digest realm="asterisk",
nonce="1612573994/b1f976725d3cbb6b1fc9af5923a87ac7", algorithm=md5,
opaque="50221ed627077186", username="SOFTPHONE_B",  uri="
sip:200@128.171.77.23", response="352ca45cd5adc103f4b679713905bde9",
cnonce="7F142IC~o5UVxMll", nc=0001, qop=auth


v=0

o=SOFTPHONE_B 1261 3707 IN IP4 128.171.168.233

s=Talk

c=IN IP4 128.171.168.233

t=0 0

a=rtcp-xr:rcvr-rtt=all:1 stat-summary=loss,dup,jitt,TTL voip-metrics

m=audio 7078 RTP/AVP 96 97 98 0 8 18 101 99 100

a=rtpmap:96 opus/48000/2

a=fmtp:96 useinbandfec=1

a=rtpmap:97 speex/16000

a=fmtp:97 vbr=on

a=rtpmap:98 speex/8000

a=fmtp:98 vbr=on

a=fmtp:18 annexb=yes

a=rtpmap:101 telephone-event/48000

a=rtpmap:99 telephone-event/16000

a=rtpmap:100 telephone-event/8000

a=rtcp-fb:* trr-int 1000

a=rtcp-fb:* ccm tmmbr


  == Setting global variable 'SIPDOMAIN' to 

Re: [asterisk-users] Hangup() not working for handsets using pls transport?

2021-02-04 Thread Joshua C. Colp
On Wed, Feb 3, 2021 at 11:02 PM Ruisheng Peng  wrote:



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@sets:1] Dial("PJSIP/SOFTPHONE_B-0007", "
> PJSIP/f30A0A01,10,m") in new stack
>
> -- Called PJSIP/f30A0A01
>
> -- Started music on hold, class 'default', on channel
> 'PJSIP/SOFTPHONE_B-0007'
>
>> 0x7f0fa801ede0 -- Strict RTP learning after remote address set
> to: 128.171.168.233:7078
>
> -- PJSIP/f30A0A01-0008 is ringing
>
> -- PJSIP/f30A0A01-0008 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 1 ms
>
> -- Stopped music on hold on PJSIP/SOFTPHONE_B-0007
>
> -- Executing [100@sets:2] Playback("PJSIP/SOFTPHONE_B-0007", "
> vm-nobodyavail") in new stack
>
> --  Playing 'vm-nobodyavail.slin'
> (language 'en')
>
> -- Executing [100@sets:3] Hangup("PJSIP/SOFTPHONE_B-0007", "") in
> new stack
>
>   == Spawn extension (sets, 100, 3) exited non-zero on
> 'PJSIP/SOFTPHONE_B-0007'
> 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@sets:1] Dial("PJSIP/f30A0A01-000d", "
> PJSIP/SOFTPHONE_B,10") in new stack
>
> -- Called PJSIP/SOFTPHONE_B
>
>   == Everyone is busy/congested at this time (1:0/1/0)
>
> -- Executing [103@sets:2] Playback("PJSIP/f30A0A01-000d", "
> 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
>
> --  Playing 'vm-nobodyavail.slin'
> (language 'en')
>
> -- Executing [103@sets:3] Hangup("PJSIP/f30A0A01-000d", "")
> in new stack
>
>   == Spawn extension (sets, 103, 3) exited non-zero on
> 'PJSIP/f30A0A01-000d'
>
> 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
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users