<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 6, 2018 at 1:51 AM Olivier <<a href="mailto:oza.4h07@gmail.com">oza.4h07@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-06-05 20:29 GMT+02:00 George Joseph <span dir="ltr"><<a href="mailto:gjoseph@digium.com" target="_blank">gjoseph@digium.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class="m_-7963923139958039229gmail-m_8156523664473219877gmail-"><div dir="ltr">On Tue, Jun 5, 2018 at 10:59 AM Olivier <<a href="mailto:oza.4h07@gmail.com" target="_blank">oza.4h07@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-06-05 15:27 GMT+02:00 George Joseph <span dir="ltr"><<a href="mailto:gjoseph@digium.com" target="_blank">gjoseph@digium.com</a>></span>:<br></div><div class="gmail_quote">Thank  you very much, George for replying.<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span><div dir="ltr">On Tue, Jun 5, 2018 at 3:35 AM Olivier <<a href="mailto:oza.4h07@gmail.com" target="_blank">oza.4h07@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>After a long discussion with a friend, I would like to ask here:</div><div><br></div><div>1.According SIP RFCs, is possible/recommended to have different values in From and P-Asserted-Id fields ?<br></div><div>For instance, From field showing 123456789 and P-Asserted-Id showing 987654321 (beside privacy considerations) ?</div></div></blockquote><div><br></div></span><div>Possible? yes absolutely. </div></div></div></blockquote><div><br></div><div>How would you then configure both headers, respectively ?<br><br></div><div>From memory, in previous testings, whenever  CALLERID was set to WHATEVER, P-Asserted-Id was also set to WHATEVER and vice versa, so that I inferred from this that  P-Asserted-Id was <span class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479m_2548870943854986704gmail-">meant for Privacy considerations and nothing else (see [1])<br></span></div></div></div></div></blockquote><div><br></div></span><div>PAI should be used to indicate the calling party's identification regardless of privacy concerns.  In the dialplan you can use the CALLERPRES function to control privacy on a call by call basis.</div><div><div class="m_-7963923139958039229gmail-m_8156523664473219877gmail-h5"><div><br></div><div><br></div></div></div></div></div></blockquote><div><br></div><div>I'm sorry but I still have a doubt ...<br></div><div>Let me re-phrase my question:<br><br></div><div>My setup is:<br></div><div>Asterisk <--- PJSIP ---> Bob<br></div><div><br></div><div>For a reason, I want Bob's phone to receive a call with the following headers:<br><br></div><div>From: "Foo" <<a href="mailto:sip%3A999@1.2.3.4" target="_blank">sip:999@1.2.3.4</a>>;tag=as75ee8c7c<br></div><div>P-Asserted-Id:  "Foo" <<a href="mailto:sip%3A999@1.2.3.4" target="_blank">sip:88888@1.2.3.4</a>>;whatever</div><div><br></div><div>My dialplan is:<br></div><div>same = n,Set(CALLERID(num)=999)<br></div><div>XXX<br></div><div>same = n,Dial(PJSIP/123456@bob)<br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>What shall I replace XXX with to allow me to set 88888 in the user part of P-Asserted-Id<span class="m_-7963923139958039229gmail-"> URI (see example above) ?<br></span></div></div></div></div></blockquote><div><br></div><div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">You don't need anything for XXX.  Just the "<span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Set(CALLERID(num)=999)" should do it.  </span></div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span class="m_-7963923139958039229gmail-"></span></div><div>CALLERPRES<span class="m_-7963923139958039229gmail-"> would </span>change From or P-Asserted-Id<span class="m_-7963923139958039229gmail-"> but</span> not having different user parts in URI, would it ?<br></div></div></div></div></blockquote><div><br></div><div>CALLERPRES affects From and Contact but doesn't affect PAI at all.  It does add a Privacy header though.</div><div>BTW, you should use CALLERID(pres) instead of CALLERPRES.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>To my knowledge, a possible way to implement what I'm after is to "turn off" P-Asserted-Id<span> feature, add a custom P-Asserted-Id header with PJSIP_HEADER.<br></span></div><div><span>Am I missing something ?<br></span></div></div></div></div></blockquote><div><br></div><div>Either that or I am. :)   The example you have above should work.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span></span></div><div><span><br></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div class="m_-7963923139958039229gmail-m_8156523664473219877gmail-h5"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479m_2548870943854986704gmail-"><br><br>[1] <a href="https://www.voip-info.org/p-asserted-identity-and-remote-party-id-header/" target="_blank">https://www.voip-info.org/p-asserted-identity-and-remote-party-id-header/</a><br></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> Recommended? who knows?  Implementations are all over the place.  I've always thought of the From header as identifying the user agent making the request which kinda agrees with RFC3261.   The PAI header should contain the identity of the original caller.</div><span><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>2. When Bob forwards to Cory a call coming from Alice, would expect Diversion/History-Info header to include Alice's number ?</div></div></blockquote><div><br></div></span><div>No.  The diversion header shows who the diverter is.</div><div><a href="https://tools.ietf.org/html/rfc5806" target="_blank">https://tools.ietf.org/html/rfc5806</a></div></div></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote><div><br><br></div><div>Thank for  this reference: I think I confused diverter/caller/callee roles when I first read this document.<br><br></div><div class="gmail_quote">So, if Bob forwards to Cory a call from Alice, in which headers would you expect Alice and Bob numbers to respectively appear ?<br><div><br></div></div></div></div></div></blockquote><div><br></div><div>Well, if you just have 3 user agents without asterisk in the middle</div><div>Alice sends INVITE to Bob.<br></div><div>Bob returns a 302 to Alice with Cory as the Contact and Bob as the Diversion<br></div><div>Alice sends an ACK to Bob.</div><div>Alice sends a new INVITE to Cory.</div><div><br></div><div>If Asterisk is in the middle then...</div><div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Alice sends INVITE to Bob via Asterisk<br></div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Asterisk sends INVITE to Bob with Alice in From/PAI</div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Bob returns a 302 to Asterisk with Cory in Contact and Bob in Diversion<br></div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Asterisk returns a 181 "Call is being forwarded" to Alice.</div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Asterisk goes back to the dialplan to find Cory.</div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Asterisk sends an INVITE to Cory with Alice in From/PAI and Bob in Diversion.</div><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">When Cory answers, Asterisk sends back a 200 OK to Alice with Cory in PAI and Bob in Diversion</div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="gmail_quote"><div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Best regards</div></div><span class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479m_2548870943854986704gmail-m_5590322768619603512HOEnZb"><font color="#888888">
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></font></span></blockquote></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div class="m_-7963923139958039229gmail-m_8156523664473219877gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479m_2548870943854986704gmail-m_5590322768619603512HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479m_2548870943854986704gmail-m_5590322768619603512m_-6478963772488978782gmail_signature"><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.asterisk.org</a><br><div><br></div></div></div></font></span></div>
<br>-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div></div><div><div class="m_-7963923139958039229gmail-m_8156523664473219877gmail-h5"><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-7963923139958039229gmail-m_8156523664473219877gmail-m_3572733137722236479gmail_signature"><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.asterisk.org</a><br><div><br></div></div></div></div></div></div>
<br>-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.asterisk.org</a><br><div><br></div></div></div></div>