[asterisk-bugs] [JIRA] (ASTERISK-25317) asterisk sends too many stun requests

Stefan Engström (JIRA) noreply at issues.asterisk.org
Tue Nov 3 05:16:33 CST 2015


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

Stefan Engström commented on ASTERISK-25317:
--------------------------------------------

It seems that in pjnath/src/pjnath/ice_session.c,

in on_stun_rx_request, (which is called many times between offer sent and answer received, since chrome sends stun requests in that time interval)

there is code which populates a list called ice->early_check:
 if (ice->rcand_cnt == 0) {
        /* We don't have answer yet, so keep this request for later */
        LOG4((ice->obj_name, "Received an early check for comp %d Ignoring it!!!",
              rcheck->comp_id));
        pj_list_push_back(&ice->early_check, rcheck);
 } else ...


When we receive the remote candidates (chrome's), we call pj_ice_sess_start_check,
which creates a new stun request for each entry in the list early_check, which are all sent at once:

...
/* First, perform all pending triggered checks, simultaneously. */
    rcheck = ice->early_check.next;
    while (rcheck != &ice->early_check) {
        LOG4((ice->obj_name,
              "Performing delayed triggerred check for component %d",
              rcheck->comp_id));
...

I do not understand the purpose of this procedure by pjnath, but by commenting out the line pj_list_push_back(&ice->early_check, rcheck) in pjnath/src/pjnath/ice_session.c I could avoid the stun-spam, and everything seems to work. I have not found any alternative to this yet... Maybe one can disable these early_check by some other means...



> asterisk sends too many stun requests
> -------------------------------------
>
>                 Key: ASTERISK-25317
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25317
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/WebSocket, Resources/res_rtp_asterisk
>    Affects Versions: 13.5.0
>         Environment: Fedora 20 - x86_64, asterisk 13.5, pjprojects 2.4, sipml5 chrome
>            Reporter: Stefan Engström
>         Attachments: pjnathticket.txt, wiresharkstunburst.PNG
>
>
> The use case is asterisk dialing a webrtc chan_sip peer who uses chrome
> After upgrading to asterisk 13.5 and pjprojects 2.4, I still have an issue with asterisk sending too many stun requests (10-100 identical ones within a millisecond) after receiving a "SDP Answer" from a chrome webrtc client.
> I do not know if this causes any real issues noticable for the end-user, but there's certainly unecessary network spikes.
> Note that this does _not_ happen when calling the same peer on a firefox browser.
> This issue happens 100% of the time for me and only the magnitude of the stun-spam varies. Can anyone reproduce it?



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



More information about the asterisk-bugs mailing list