[Home]

Summary:ASTERISK-28149: PJSIP: Setting CallerID for outbound channel from predial handler doesn't work
Reporter:Dmitry Sytchev (kbdfck)Labels:pjsip
Date Opened:2018-11-04 10:37:54.000-0600Date Closed:2018-11-05 04:39:17.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:14.6.0 16.0.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:When using chan_sip, it is possible to set outbound CallerID(num) from predial handler, effectively setting From: in outbound sip packets.

In case of PJSIP it seems to ignore it in  outbound channels predial handler.  If we set it on source channel before launching Dial application, it works fine.
But we want to set CallerID per outbound channel so need some way to resolve this.
{noformat}
context route_users {
       _X. => {
               Dial(PJSIP/10000,,b(set_clid,1,1));
       }
}

context set_clid {
       _X => {
               Set(CALLERID(num)=123123123);
       }
}
{noformat}
Despite Set(CALLERID(num)) is launched on originated channel, it doesn't set CallerID.
We don't use PAI or RPID, so we need to set CallerID in From.

Maybe I miss some parameter or PJSIP setting? In case with chan_sip this just works.
Comments:By: Asterisk Team (asteriskteam) 2018-11-04 10:37:56.858-0600

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: Richard Mudgett (rmudgett) 2018-11-04 13:52:32.367-0600

This is a misunderstanding, not a bug.  You need to use CONNECTEDLINE in the pre-dial handler to send it to the called party.  Please see the party id propagation section here.
https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information

By: Dmitry Sytchev (kbdfck) 2018-11-05 04:38:23.822-0600

Richard, thanks for pointing me on that.
With CONNECTEDLINE(num) on originated channel this works fine!

By: Dmitry Sytchev (kbdfck) 2018-11-05 04:39:17.406-0600

Use CONNECTEDLINE instead of CALLERID in outbound channel  predial handler

By: Dmitry Sytchev (kbdfck) 2018-11-15 14:18:12.396-0600

We  used CONNECTEDLINE and this approach works.  But if we use it, Asterisk sets connectedline on outbound leg of call to what set as connectedline to have caller id, so we don't have real connected line info of first leg set on outbound channel. CallerID in AMI events of outbound channel is not reflecting its real CallerID too...

What else can be do to set real CallerID on outbound channel not using connected line?

By: Asterisk Team (asteriskteam) 2018-11-15 14:18:12.785-0600

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Richard Mudgett (rmudgett) 2018-11-15 14:46:14.213-0600

I don't understand what you said.  Please describe it better and provide logs demonstrating the problem.
{noformat}
       --> PJSIP/A(CALLERID(num of A) ------->        --> PJSIP/B(CONNECTEDLINE(num of A) -->
Phone A                                         Bridge                                         Phone B
       <-- PJSIP/A(CONNECTEDLINE(num of B) <--        <-- PJSIP/B(CALLERID(num of B) <-------
{noformat}

Party id information flows from one side to the other as indicated only when certain events happen to trigger a connected line update.

By: Asterisk Team (asteriskteam) 2018-12-01 12:00:02.008-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines