jitsi / jibri

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

feat: add the optional proxy parameter for pjsua #505

Closed emrahcom closed 1 year ago

emrahcom commented 1 year ago

This commit adds an optional --proxy parameter for pjsua client. It allows to set SIP proxy through jitsi-component-selector API.

If there is no proxy in the API request, the application still sets the forced proxy to not break the old setups. --proxy=...transport=tcp;hide

A sample request may be like the following

{
  "callParams": {
    "callUrlInfo": {
      "baseUrl": "$JITSI_HOST",
      "callName": "$JITSI_ROOM"
    }
  },
  "componentParams": {
    "type": "SIP-JIBRI",
    "region": "default-region",
    "environment": "default-env"
  },
  "metadata": {
    "sipClientParams": {
      "userName": "$CALLER_USERNAME",
      "password": "$CALLER_PASSWORD",
      "sipAddress": "$CALLEE",
      "displayName": "Caller",
      "proxy": "$SIP_PROXY",
      "autoAnswer": false
    }
  },
  "callLoginParams": {
    "domain": "sip.jitsi.mydomain.com",
    "username": "sip",
    "password": "$PROSODY_SIP_PASSWD"
  }
}
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 #505 (eba71ae) into master (e10d22d) will decrease coverage by 0.05%. The diff coverage is 28.57%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/jitsi/jibri/pull/505/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/505?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi) ```diff @@ Coverage Diff @@ ## master #505 +/- ## ============================================ - Coverage 48.10% 48.05% -0.05% Complexity 174 174 ============================================ Files 73 73 Lines 2106 2110 +4 Branches 200 202 +2 ============================================ + Hits 1013 1014 +1 - Misses 1023 1026 +3 Partials 70 70 ``` | [Impacted Files](https://codecov.io/gh/jitsi/jibri/pull/505?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/505?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%> (-0.13%)` | :arrow_down: | | [...ain/kotlin/org/jitsi/jibri/sipgateway/SipClient.kt](https://codecov.io/gh/jitsi/jibri/pull/505?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi#diff-c3JjL21haW4va290bGluL29yZy9qaXRzaS9qaWJyaS9zaXBnYXRld2F5L1NpcENsaWVudC5rdA==) | `64.70% <100.00%> (+2.20%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/jitsi/jibri/pull/505?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/505?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jitsi). Last update [e10d22d...eba71ae](https://codecov.io/gh/jitsi/jibri/pull/505?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).