Asterisk
  1. Asterisk
  2. ASTERISK-26964

res_pjsip_session: Wrong From on reinvite when request and To URI differ

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 13.15.0
    • Target Release Version/s: 13.17.0, 14.6.0, 15.0.0
    • Security Level: None
    • Labels:
      None
    • Environment:
      Centos 6.7, asterisk 13.5
    • Frequency of Occurrence:
      Constant
    • Regression:
      No

      Description

      chan_pjsip creating wrong From header number on Re-invite

      Hello,

      in t38 state or session_refresh , chan_pjsip create Re-invite with wrong From header number for incoming channel.i think chan_pjsip creates "from header number" from "Request uri" and it should be "to header number" .
      it easy to understand from logs.

      i fixed the situtation this patch but i am not sure why need set_from_header function in pjsip_refresh function.

      Cheers.

      1. dialplan-1.txt
        0.2 kB
        Yasin CANER
      2. trace-1.txt
        2 kB
        Yasin CANER
      1. Asterisk 13 Re-invite True transaction.jpg
        66 kB
      2. Asterisk 13 Wrong from header in Re-invite.jpg
        30 kB

        Issue Links

          Activity

          Hide
          Asterisk Team added a comment -

          Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

          A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

          Then, if you are submitting a patch, please review the Patch Contribution Process.

          Show
          Asterisk Team added a comment - Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the Patch Contribution Process .
          Hide
          Rusty Newton added a comment -

          Yasin, your patch wasn't marked as a contribution. It must be attached as a contribution so that it will be associated with your license agreement.

          Please re-attach the patch and then push it up to Gerrit[1] so that it can be reviewed[2]. You'll then get feedback on any issues with it.

          Thanks for your work!

          [1] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage
          [2] https://wiki.asterisk.org/wiki/display/AST/Code+Review

          Show
          Rusty Newton added a comment - Yasin, your patch wasn't marked as a contribution. It must be attached as a contribution so that it will be associated with your license agreement. Please re-attach the patch and then push it up to Gerrit [1] so that it can be reviewed [2] . You'll then get feedback on any issues with it. Thanks for your work! [1] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage [2] https://wiki.asterisk.org/wiki/display/AST/Code+Review
          Hide
          Yasin CANER added a comment -

          i pushed this patch to gerrit.
          cheers

          Show
          Yasin CANER added a comment - i pushed this patch to gerrit. cheers
          Hide
          Joshua Colp added a comment -

          The operation was done there to handle the Anonymous support. Can you provide the configuration which can be used for reproducing this as well?

          Show
          Joshua Colp added a comment - The operation was done there to handle the Anonymous support. Can you provide the configuration which can be used for reproducing this as well?
          Hide
          Yasin CANER added a comment -

          hello Joshua,
          as you can see on topology , A side is a kamailio that using uac module, can manipulate from/to header and can restore. Here is link http://kamailio.org/docs/modules/4.4.x/modules/uac.html#uac.f.uac_replace_to(display,uri)

          to reprodoce this ,
          1- Request Uri and To header must be different. you can do it with kamailio or etc.
          2- set session_refresh() in dialplan , there is a example on attachments.
          3- you can compare between From header on re-invite and to-header on First Invite , they are different.

          i want to just show which part of code cause this problem so i sent this patch. if this patch apply, may be break others stuff.

          if it is only anonymous support , we can add another function to check Null for From Header number and set anonymouse as set_from_header do.

          if you want to test an event/move , i can help you.

          Cheers.

          Show
          Yasin CANER added a comment - hello Joshua, as you can see on topology , A side is a kamailio that using uac module, can manipulate from/to header and can restore. Here is link http://kamailio.org/docs/modules/4.4.x/modules/uac.html#uac.f.uac_replace_to(display,uri ) to reprodoce this , 1- Request Uri and To header must be different. you can do it with kamailio or etc. 2- set session_refresh() in dialplan , there is a example on attachments. 3- you can compare between From header on re-invite and to-header on First Invite , they are different. i want to just show which part of code cause this problem so i sent this patch. if this patch apply, may be break others stuff. if it is only anonymous support , we can add another function to check Null for From Header number and set anonymouse as set_from_header do. if you want to test an event/move , i can help you. Cheers.
          Hide
          Yasin CANER added a comment -

          after , comment/disable set_from_header function in refresh

          Show
          Yasin CANER added a comment - after , comment/disable set_from_header function in refresh
          Hide
          Friendly Automation added a comment -

          Change 5675 merged by Jenkins2:
          res_pjsip_session : fixed wrong From Header number On Re-invite

          https://gerrit.asterisk.org/5675

          Show
          Friendly Automation added a comment - Change 5675 merged by Jenkins2: res_pjsip_session : fixed wrong From Header number On Re-invite https://gerrit.asterisk.org/5675
          Hide
          Friendly Automation added a comment -

          Change 5676 merged by Jenkins2:
          res_pjsip_session : fixed wrong From Header number On Re-invite

          https://gerrit.asterisk.org/5676

          Show
          Friendly Automation added a comment - Change 5676 merged by Jenkins2: res_pjsip_session : fixed wrong From Header number On Re-invite https://gerrit.asterisk.org/5676
          Hide
          Friendly Automation added a comment -

          Change 5535 merged by Joshua Colp:
          res_pjsip_session : fixed wrong From Header number On Re-invite

          https://gerrit.asterisk.org/5535

          Show
          Friendly Automation added a comment - Change 5535 merged by Joshua Colp: res_pjsip_session : fixed wrong From Header number On Re-invite https://gerrit.asterisk.org/5535

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development