<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 16, 2021 at 12:50 AM Jean Aunis <<a href="mailto:jean.aunis@prescom.fr">jean.aunis@prescom.fr</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>
    <div>Le 15/06/2021 à 15:28, George Joseph a
      écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">[2021-06-15 10:42:49.885] WARNING[5163]:
        res_pjsip_messaging.c:247 <br>
        <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">
            insert_user_in_contact_uri: Dest: 'PJSIP/3200@linphone' MSG
            SEND FAIL: <br>
            There's already a username in endpoint linphone's contact
            URI <br>
            '<a href="http://sip:linphone@127.0.0.1:5063" target="_blank">sip:linphone@127.0.0.1:5063</a>;line=068b0910396d2ed'.<br>
            [2021-06-15 10:42:49.885] ERROR[5163]:
            res_pjsip_messaging.c:1240</blockquote>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Yeah that's the expected behavior although I guess I can
            change it.  I figured that if there was a user already
            specified in the contact uri that overwriting it with
            something else was probably not a good idea.    Now that I
            think of it though, I was thinking more from sending
            messages upstream to a provider not downstream to a client.</div>
          <div><br>
          </div>
          <div>So what should the behavior be?  To construct the Request
            URI replace any user in the contact URI with the user or
            number specified in the MessageSend call?</div>
        </div>
      </div>
    </blockquote>
    <p>I would be in favour of trusting the dialplan. If someone wants
      to send a message to an endpoint with a specific number, that
      should be possible. That looks more flexible to me.<br></p></div></blockquote><div>I should have a patch up for that in a few hours.</div><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><p>
    </p>
    <p>By the way, I'm fine with the modification of MessageSend you
      describe. What about applying the same modification to the
      MessageSend AMI action and to the sendMessage /
      sendMessageToEndpoint requests in ARI ?<br></p></div></blockquote><div>The Message related AMI and ARI stuff call the same core functions so they automatically support the "PJSIP/" form of the destination as well as the refactored parsing code for the rest of the destination forms.   Adding the third "to" parameter that was added to the dialplan app is a little more problematic for AMI and ARI.  Dialplan apps don't have named parameters so adding the third one was no problem.  Both the AMI and ARI calls have named parameters and the first one is already named "to" so renaming that one to "destination" and adding "to" would break the contract in Asterisk 16 and 18.   I can, and will, make that change for For Asterisk 19 however,</div><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><p>
    </p>
  </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>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div></div>