Summary:ASTERISK-19417: CLONE - Unable to edit From Caller Name with RPID
Reporter:Maciej Krajewski (jamicque)Labels:
Date Opened:2012-02-21 08:57:39.000-0600Date Closed:2017-12-19 06:11:34.000-0600
Versions: Frequency of
is a clone ofASTERISK-19391 Unable to edit From Caller Name with RPID
Environment:Attachments:( 0) rpid_from_name.patch
Description:When using RPID header with CallerID set to prohibit we cannot edit the From Caller Name filed. Furthermore Asterisk 1.8 sets the value of this filed to asterisk.

According to http://tools.ietf.org/html/draft-ietf-sip-privacy-00 in this case, Caller Name Filed should be left blank. So it would be helpful if we could change this value from DialPlan/AGI.

Dial Plan:
exten => 111,1,Set(CALLERID(name-pres)=prohib)
exten => 111,n,Set(CALLERID(num-pres)=prohib)
exten => 111,n,Set(CALLERID(name)=Hello)
exten => 111,n,Dial(SIP/+48xxxxxxxxx@ffff)

Peers configuration is from Real Time. Peer ffff has rpid=rpid flag.

INVITE sip:+48xxxxxxxxx@sip.freeconet.pl:5060 SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK55074a83;rport
Max-Forwards: 70
From: "asterisk" <sip:login1@sip.freeconet.pl>;tag=as63cff618
To: <sip:+48xxxxxxxxx@sip.freeconet.pl:5060>
Contact: <sip:xxxx@>
Call-ID: 3bd0220e5442f6226379f7613ceb1c0b@sip.freeconet.pl
CSeq: 102 INVITE
User-Agent: IP PBX
Date: Mon, 20 Feb 2012 15:34:53 GMT
Supported: replaces, timer
Remote-Party-ID: "Hello" <sip:test001@sip.freeconet.pl>;party=calling;privacy=full;screen=yes
Content-Type: application/sdp
Content-Length: 271
Comments:By: Maciej Krajewski (jamicque) 2012-02-21 09:02:55.476-0600

I agree with Matt's comment on from field. However this document is full of bugs. Fist there is a description of from field:
From: The UAC SHOULD supply a cryptographically random
identifier for the userinfo, and a non-identifying hostname, e.g.
"localhost", in the host name.
and in the other hand in examples there is no callerid name in FROM field.
I would look at this ticket as regression - in asterisk 1.6 there was no callerid name in from field when RPID was enabled.
Nevertheless ability not to change "asterisk" in from field should be considered as a bug. IMHO no username is better than hardcoded asterisk.

By: Matt Jordan (mjordan) 2012-02-21 16:17:17.626-0600

There isn't a Caller-ID field in the From: header; that is a name that is supplied by the system.  Could it be something else?  Sure, but regardless of whether or not the behavior has changed from 1.6, that is not a regression - that is an implementation detail.  If you were depending on that field being blank, then you were depending on undefined behavior that is not mandated by any RFC (at least not that I'm aware of).

Asking that the field can be changed from the dialplan is fine, but that would be a feature request, not a bug fix.  I'm not sure I'd agree with it as a feature, but that's still something that someone, if they so chose, could write and submit for review on ReviewBoard.

[edit] As an aside, I never claimed that we were compliant with that draft RFC, nor was I claiming that we should be.  I was merely using it to point out that the bug that they filed wasn't supported by the draft RFC either.

By: Matt Jordan (mjordan) 2012-02-21 16:17:46.318-0600

If you'd like to write a patch for this feature, I'll keep this issue open - otherwise I'll close it out.

By: Krzysztof Chmielewski (kristoff) 2012-02-22 08:46:45.304-0600

I made a small patch, which resolves this situation (hard code unfortunately). From_name is being set to the same value as from_number which in case of privacy with RPID seems to be OK.

By: Maciej Krajewski (jamicque) 2012-02-22 09:00:51.393-0600

Krzysztof Chmielewski attached the patch where from username is set with one from username. Such behavior is better than one sending "Asterisk".

By: Leif Madsen (lmadsen) 2012-02-22 13:52:00.166-0600

Don't forget to set a component when filing issues. Thanks!

By: Walter Doekes (wdoekes) 2012-03-08 02:23:47.532-0600

Is this an issue with trunk too? In trunk, an empty display name should be left out completely. (Look for the 'cid_has_name' variable.) That's better than setting it to username like your patch does.

By: Maciej Krajewski (jamicque) 2012-03-08 02:56:44.448-0600

In trunk works fine - however in my newest patch ASTERISK-19465 (the newest is on revievboard) I've made an exception that if rpid is used and fromname is set than the domain should be left (now it is anonymous.invalid).

If no one has any comments - the ticket can be closed.

By: Joshua C. Colp (jcolp) 2017-12-19 06:11:34.315-0600

Closed per reporter.