[asterisk-dev] PJSIP messaging : specifying the user portion of the request-URI

Jean Aunis jean.aunis at prescom.fr
Wed Jun 16 01:50:20 CDT 2021


Le 15/06/2021 à 15:28, George Joseph a écrit :
> [2021-06-15 10:42:49.885] WARNING[5163]: res_pjsip_messaging.c:247
>
>     insert_user_in_contact_uri: Dest: 'PJSIP/3200 at linphone' MSG SEND
>     FAIL:
>     There's already a username in endpoint linphone's contact URI
>     'sip:linphone at 127.0.0.1:5063
>     <http://sip:linphone@127.0.0.1:5063>;line=068b0910396d2ed'.
>     [2021-06-15 10:42:49.885] ERROR[5163]: res_pjsip_messaging.c:1240
>
>
>
> 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.
>
> 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?

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.

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 ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20210616/7935d47d/attachment.html>


More information about the asterisk-dev mailing list