jitsi / jibri

Jitsi BRoadcasting Infrastructure
Apache License 2.0
600 stars 314 forks source link

feat: add the optional auto-answer-timer parameter for pjsua #509

Closed emrahcom closed 1 year ago

emrahcom commented 1 year ago

This commit allows to set --auto-answer-timer of pjsua through jitsi-component-selector API. Normally auto-answer-timer has a hardcoded value which is 30 secs and this doesn't suit all use-cases.

After this commit, it is possible to overwrite the default value (which is 30 secs) by setting it in API payload. As an example

{
  "callParams": {
    "callUrlInfo": {
      "baseUrl": "$JITSI_HOST",
      "callName": "$JITSI_ROOM?jwt=$TOKEN"
    }
  },
  "componentParams": {
    "type": "SIP-JIBRI",
    "region": "default-region",
    "environment": "default-env"
  },
  "metadata": {
    "sipClientParams": {
      "sipAddress": "sip:jibri@127.0.0.1",
      "displayName": "$DISPLAY_NAME",
      "autoAnswer": true,
      "autoAnswerTimer": 600
    }
  }
}
jitsi-jenkins commented 1 year ago

Hi, thanks for your contribution! If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

codecov[bot] commented 1 year ago

Codecov Report

Merging #509 (d4a7dce) into master (c23529a) will increase coverage by 0.02%. The diff coverage is 50.00%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/jitsi/jibri/pull/509/graphs/tree.svg?width=650&height=150&src=pr&token=P6jrfpYsWM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi)](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi) ```diff @@ Coverage Diff @@ ## master #509 +/- ## ============================================ + Coverage 48.05% 48.08% +0.02% Complexity 174 174 ============================================ Files 73 73 Lines 2110 2111 +1 Branches 202 202 ============================================ + Hits 1014 1015 +1 Misses 1026 1026 Partials 70 70 ``` | [Impacted Files](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi) | Coverage Δ | | |---|---|---| | [...in/org/jitsi/jibri/sipgateway/pjsua/PjsuaClient.kt](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi#diff-c3JjL21haW4va290bGluL29yZy9qaXRzaS9qaWJyaS9zaXBnYXRld2F5L3Bqc3VhL1Bqc3VhQ2xpZW50Lmt0) | `2.00% <0.00%> (ø)` | | | [...ain/kotlin/org/jitsi/jibri/sipgateway/SipClient.kt](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi#diff-c3JjL21haW4va290bGluL29yZy9qaXRzaS9qaWJyaS9zaXBnYXRld2F5L1NpcENsaWVudC5rdA==) | `66.66% <100.00%> (+1.96%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi). Last update [c23529a...d4a7dce](https://codecov.io/gh/jitsi/jibri/pull/509?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi).