[asterisk-bugs] [JIRA] (ASTERISK-28564) Memory leak with pjsip 2.9 and SIPS / SRTP

Sean Bright (JIRA) noreply at issues.asterisk.org
Thu Oct 3 09:40:47 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248223#comment-248223 ] 

Sean Bright edited comment on ASTERISK-28564 at 10/3/19 9:40 AM:
-----------------------------------------------------------------

There is no specific configuration I would be aware of. Just configure SRTP / SIPS / TLS 1.2 and you should get the problem.

{noformat}
pjsip.registration.conf
---------------------------------
[trunk]
type=registration
transport=0.0.0.0-tls
outbound_auth=trunk
retry_interval=60
fatal_retry_interval=0
forbidden_retry_interval=10
max_retries=10000
expiration=660
line=yes
endpoint=trunk
auth_rejection_permanent=yes
contact_user=+49123456789
server_uri=sip:tel.t-online.de
client_uri=sip:+49123456789 at tel.t-online.de


pjsip.transports_custom.conf
------------------------------------------
[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5061
allow_reload=no
tos=cs3
cos=3

[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
ca_list_file=/etc/pki/tls/certs/ca-bundle.crt
method=tlsv1_2
verify_server=yes
allow_reload=no
tos=cs3
cos=3

pjsip.transports_custom_post.conf 
--------------------------------------------------
[0.0.0.0-udp](+)
tos=0xb8

[0.0.0.0-tls](+)
method=tlsv1_2
tos=0xb8


pjsip.auth_custom.conf
----------------------------------
[trunk]
type=auth
auth_type=userpass
password=12345
username=+49123456789

pjsip.identify_custom.conf
--------------------------------------
[trunk]
type=identify
endpoint=trunk
match=127.0.0.10
{noformat}

Hope this is enough or do you need some more information?
If you can't reproduce it, we have to rethink about how to proceed.


was (Author: micha):
There is no specific configuration I would be aware of. Just configure SRTP / SIPS / TLS 1.2 and you should get the problem.

pjsip.registration.conf
---------------------------------
[trunk]
type=registration
transport=0.0.0.0-tls
outbound_auth=trunk
retry_interval=60
fatal_retry_interval=0
forbidden_retry_interval=10
max_retries=10000
expiration=660
line=yes
endpoint=trunk
auth_rejection_permanent=yes
contact_user=+49123456789
server_uri=sip:tel.t-online.de
client_uri=sip:+49123456789 at tel.t-online.de


pjsip.transports_custom.conf
------------------------------------------
[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5061
allow_reload=no
tos=cs3
cos=3

[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
ca_list_file=/etc/pki/tls/certs/ca-bundle.crt
method=tlsv1_2
verify_server=yes
allow_reload=no
tos=cs3
cos=3

pjsip.transports_custom_post.conf 
--------------------------------------------------
[0.0.0.0-udp](+)
tos=0xb8

[0.0.0.0-tls](+)
method=tlsv1_2
tos=0xb8


pjsip.auth_custom.conf
----------------------------------
[trunk]
type=auth
auth_type=userpass
password=12345
username=+49123456789

pjsip.identify_custom.conf
--------------------------------------
[trunk]
type=identify
endpoint=trunk
match=127.0.0.10


Hope this is enough or do you need some more information?
If you can't reproduce it, we have to rethink about how to proceed.

> Memory leak with pjsip 2.9 and SIPS / SRTP
> ------------------------------------------
>
>                 Key: ASTERISK-28564
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28564
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 16.5.0
>         Environment: CentOS 7
>            Reporter: Michael Maier
>            Assignee: Unassigned
>              Labels: pjsip
>
> There is one more memory leak even in asterisk 16.6.0-rc2, which can't be seen with pjsip 2.8 instead of 2.9. It can be seen on inbound calls (not sure if it's on outbound calls, too) using SIPS and SRTP.
> Examples:
> 1 Call, duration about 1 h: ~ +1,2 MB
> 5 short calls (< 1 minute): ~ +1 MB
> Example for the inbound INVITE and OK package:
> <--- Received SIP request (2276 bytes) from TLS:217.0.20.195:5061 --->
> INVITE sip:+491234567890 at 12.13.14.15:5061;transport=tcp;line=abcdefg SIP/2.0
> Max-Forwards: 49
> Via: SIP/2.0/TLS 217.0.20.195:5061;branch=z9hG4bKg3Zqkv7ivdsp3wo1jhdbdvgy5dwsq6jye
> To: <sip:+491234567890 at telekom.de;user=phone>
> From: <sip:+4945678901234 at tmobile.de;user=phone>;tag=h7g4Esbg_p65540t1570108521m378032c299263169s1_1621954413-1461120854
> Call-ID: p65540t1570108521m378032c299263169s2
> CSeq: 1 INVITE
> Contact: <sip:sgc_c at 217.0.20.195:5061;transport=tls>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
> Record-Route: <sip:217.0.20.195:5061;transport=tls;lr>
> Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
> History-Info: <sip:+491234567890;npdi;rn=+49199C901234567890 at tmobile.de;user=phone>;index=1
> Min-Se: 900
> P-Asserted-Identity: <sip:+4945678901234 at tmobile.de;user=phone>
> P-Asserted-Identity: <tel:+4945678901234>
> Session-Expires: 1800
> Supported: timer
> Supported: 100rel
> Supported: histinfo
> Supported: 199
> Supported: uui
> Supported: norefersub
> Content-Type: application/sdp
> Content-Length: 1061
> Session-ID: 253f41678c65f936805ef6b071943e64
> Allow: REGISTER, REFER, NOTIFY, SUBSCRIBE, UPDATE, PRACK, INFO, INVITE, ACK, OPTIONS, CANCEL, BYE
> v=0
> o=- 1011696818 1621954173 IN IP4 217.0.20.195
> s=-
> c=IN IP4 217.0.135.5
> t=0 0
> m=audio 27888 RTP/SAVP 96 97 9 98 99 100 101 8 102 103
> b=AS:84
> a=rtpmap:96 AMR-WB/16000
> a=fmtp:96 mode-set=0,1,2; mode-change-period=2; mode-change-neighbor=1; max-red=0
> a=rtpmap:97 AMR-WB/16000
> a=fmtp:97 mode-change-capability=2; max-red=0
> a=rtpmap:9 G722/8000
> a=rtpmap:98 AMR/8000
> a=fmtp:98 mode-set=0,2,4,7; mode-change-period=2; mode-change-neighbor=1; max-red=0
> a=rtpmap:99 AMR/8000
> a=fmtp:99 mode-set=0,2,4; mode-change-period=2; mode-change-neighbor=1; max-red=0
> a=rtpmap:100 AMR/8000
> a=fmtp:100 mode-set=0,1,2,3,4,5,6,7; mode-change-period=2; mode-change-neighbor=1; max-red=0
> a=rtpmap:101 AMR/8000
> a=fmtp:101 mode-set=0,1,2,3,4,5,6,7; max-red=0
> a=rtpmap:8 PCMA/8000
> a=rtpmap:102 telephone-event/8000
> a=rtpmap:103 telephone-event/16000
> a=ptime:20
> a=maxptime:30
> a=3ge2ae:applied
> a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:HTNhK8lOYS+/1ORuNEbEhnsisXj4PEVIh8FBKmTR
> a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:6qBJEfKKXxbpJTepS298yUmUl/891GwnlURC3tdn
> <--- Transmitting SIP response (1178 bytes) to TLS:217.0.20.195:5061 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/TLS 217.0.20.195:5061;rport=5061;received=217.0.20.195;branch=z9hG4bKg3Zqkv7ivdsp3wo1jhdbdvgy5dwsq6jye
> Record-Route: <sip:217.0.20.195:5061;transport=TLS;lr>
> Call-ID: p65540t1570108521m378032c299263169s2
> From: <sip:+4945678901234 at tmobile.de;user=phone>;tag=h7g4Esbg_p65540t1570108521m378032c299263169s1_1621954413-1461120854
> To: <sip:+491234567890 at telekom.de;user=phone>;tag=94f22858-9c32-44c5-8a45-76964f62684a
> CSeq: 1 INVITE
> Server: FPBX-14.0.11(16.5.1)
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
> Contact: <sip:12.13.14.15:5061;transport=TLS>
> Supported: 100rel, timer, replaces, norefersub
> Session-Expires: 1800;refresher=uac
> Require: timer
> Content-Type: application/sdp
> Content-Length:   368
> v=0
> o=- 1011696818 1621954176 IN IP4 12.13.14.15
> s=Asterisk
> c=IN IP4 12.13.14.15
> t=0 0
> m=audio 10032 RTP/SAVP 9 8 102
> a=3ge2ae:requested
> a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:OnkHAdHasSl83UnyFNuDSrBx+OsRF8DRZ6c5PnmJ
> a=rtpmap:9 G722/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:102 telephone-event/8000
> a=fmtp:102 0-16
> a=ptime:20
> a=maxptime:150
> a=sendrecv



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list