[asterisk-dev] pjsip: 180 Ringing contains wrong info in Remote-Party-ID

Richard Mudgett rmudgett at digium.com
Mon May 15 11:27:08 CDT 2017


On Mon, May 15, 2017 at 10:45 AM, Steve Murphy <murf at parsetree.com> wrote:

> Hello--
>
> I've got complaints that the phones are presenting the wrong info when
> making an outgoing call... instead of displaying the called party info,
> it's displaying the caller's info, which is highly uninteresting. I've been
> looking at the behavior with Yealink phones, but I'm told that ALL phones
> have the problem, and comparing with the sip channel driver.
>
> I'm working with asterisk (and pjsip) at version 13.15.0, so this is
> pretty much current behavior.
>
> I traced it down to the 180 Ringing message sent to the phone from
> Asterisk, in the course of making an outgoing call from the Yealink, in
> this case, to another extension on the same phone system.
>
> In the old chan_sip world, I see this:
>
> [May 13 13:10:58] <--- Transmitting (NAT) to 67.215.23.186:28762 --->
> [May 13 13:10:58] SIP/2.0 180 Ringing
> [May 13 13:10:58] Via: SIP/2.0/UDP 192.168.134.126:5060;branch=
> z9hG4bK1785363097;received=67.291.23.186;rport=28762
> [May 13 13:10:58] From: "Steve Murphy" <sip:nvl19049 at 190.190.190.190:5060
> >;tag=2559859725
> [May 13 13:10:58] To: <sip:767 at 190.190.190.190:5060>;tag=as0a66b2c7
> [May 13 13:10:58] Call-ID: 0_762068959 at 192.168.134.126
> [May 13 13:10:58] CSeq: 2 INVITE
> [May 13 13:10:58] Server: nexVortex Inc Hosted 3.0 PBX
> [May 13 13:10:58] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
> SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
> [May 13 13:10:58] Supported: replaces, timer
> [May 13 13:10:58] Contact: <sip:767 at 190.190.190.190:5060>
> [May 13 13:10:58] Remote-Party-ID: "Shifting Sands" <
> sip:767 at 190.190.190.190>;party=called;privacy=off;screen=no
> [May 13 13:10:58] Content-Length: 0
> [May 13 13:10:58]
>
> Note, that Asterisk serves up callerid info from the target extension in
> this header, providing not only the number of the target extension, but the
> callerid NAME info, also, which is pretty nice!
>
> ​But, in the PJSIP world, I see this instead (on a different test system):
>
> [May 13 08:21:59] <--- Transmitting SIP response (597 bytes) to UDP:
> 192.168.134.102:5060 --->
> [May 13 08:21:59] SIP/2.0 180 Ringing
> [May 13 08:21:59] Via: SIP/2.0/UDP 192.168.134.102:5060;rport=
> 5060;received=192.168.134.102;branch=z9hG4bK1705376406
> [May 13 08:21:59] Call-ID: 0_1685072057 at 192.168.134.102
> [May 13 08:21:59] From: "Steve" <sip:t12 at 192.168.134.227>;tag=3119644064
> [May 13 08:21:59] To: <sip:102 at 192.168.134.227>;tag=
> c7988cae-0380-49b4-84e6-0a03b656ab85
> [May 13 08:21:59] CSeq: 2 INVITE
> [May 13 08:21:59] Server: nexVortex SoupedUp Asterisk Hybrid
> [May 13 08:21:59] Contact: <sip:192.168.134.227:57969>
> [May 13 08:21:59] Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK,
> BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
> [May 13 08:21:59] Remote-Party-ID: "Steve" <sip:101 at 192.168.134.227>;
> privacy=off;screen=no
> [May 13 08:21:59] Content-Length:  0
>
>
> ​In this instance, it just looks like the rpid is a copy of the "From:"
> header. This isn't so interesting, as I already know my own name and
> extension number!
>
> I traced this down to the add_rpid_header() func in the
> res/res_pjsip_caller_id module... but I suspect that the connected line
> updates play a role here, and I'm too much a nube to know where the "right"
> information is.
>
> ​Am I hallucinating? Got a bad config? Or is there a bug here?
>

There isn't much to determine why the wrong party information [1] is being
used here.
I do think this is a configuration or dialplan issue and not a bug.  Maybe
you are using
CALLERID when you should be using CONNECTEDLINE on the PJSIP channel?

This could be a configuration issue caused by the difference between how
chan_sip
and chan_pjsip do things.  Since chan_sip predates pre-dial handlers you
had to setup
information in inheritable channel variables and the SipAddHeader
application before
dialing the destination so the outgoing channel gets created with expected
information.
For PJSIP channels you need to use pre-dial handlers [2] to setup
information on the
actual outgoing channel before the call gets placed.

Richard

[1]
https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information
[2] https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers
[3]
http://blogs.asterisk.org/2017/03/29/dialplan-handler-routines-allow-customization/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20170515/ae922f69/attachment.html>


More information about the asterisk-dev mailing list