[Home]

Summary:ASTERISK-26964: res_pjsip_session: Wrong From on reinvite when request and To URI differ
Reporter:Yasin CANER (ycaner)Labels:
Date Opened:2017-04-25 03:39:52Date Closed:2017-05-23 09:08:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip_session
Versions:13.15.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-26988 res_pjsip_session: user_eq_phone adds double user=phone parameters to URIs
Environment:Centos 6.7, asterisk 13.5Attachments:( 0) Asterisk_13_Re-invite_True_transaction.jpg
( 1) Asterisk_13_Wrong_from_header_in_Re-invite.jpg
( 2) dialplan-1.txt
( 3) trace-1.txt
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.

Comments:By: Asterisk Team (asteriskteam) 2017-04-25 03:39:53.836-0500

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|https://wiki.asterisk.org/wiki/display/AST/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|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-04-25 18:09:49.587-0500

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


By: Yasin CANER (ycaner) 2017-04-27 01:06:51.727-0500

i pushed this patch to gerrit.
cheers

By: Joshua C. Colp (jcolp) 2017-04-27 11:54:38.627-0500

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

By: Yasin CANER (ycaner) 2017-04-28 02:00:56.153-0500

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.

By: Yasin CANER (ycaner) 2017-05-10 04:10:42.395-0500

after , comment/disable set_from_header function in refresh

By: Friendly Automation (friendly-automation) 2017-05-23 09:08:01.830-0500

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

[https://gerrit.asterisk.org/5675|https://gerrit.asterisk.org/5675]

By: Friendly Automation (friendly-automation) 2017-05-23 09:08:49.166-0500

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

[https://gerrit.asterisk.org/5676|https://gerrit.asterisk.org/5676]

By: Friendly Automation (friendly-automation) 2017-05-23 09:18:41.616-0500

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

[https://gerrit.asterisk.org/5535|https://gerrit.asterisk.org/5535]