hw
2020-Jan-30 13:34 UTC
[asterisk-users] delivery verification of instant messages with pjsip
Hi, when sending IMs from endpoint to endpoint with the MessageSend() application, I can check the MESSAGE_SEND_STATUS and send another message to the sender of the message to notify them that their message was not sent when the status indicates it. This works fine with chan_sip. With chan_pjsip, this works differently in that MESSAGE_SEND_STATUS is "SUCCESS" after sending the message, and only later asterisk figures out that it is "Unable to retrieve contact for endpoint <xxx>" when there are no contacts and thus the message never gets delivered. How can I check if the endpoint has contacts --- or preferably --- if the message was actually delivered to an endpoint? It would be sufficient to get it to work with endpoints that are not supposed to have more than one contact.
Joshua C. Colp
2020-Jan-30 13:38 UTC
[asterisk-users] delivery verification of instant messages with pjsip
On Thu, Jan 30, 2020 at 9:35 AM hw <hw at gc-24.de> wrote:> Hi, > > when sending IMs from endpoint to endpoint with the MessageSend() > application, > I can check the MESSAGE_SEND_STATUS and send another message to the sender > of > the message to notify them that their message was not sent when the status > indicates it. > > This works fine with chan_sip. With chan_pjsip, this works differently in > that MESSAGE_SEND_STATUS is "SUCCESS" after sending the message, and only > later asterisk figures out that it is "Unable to retrieve contact for > endpoint > <xxx>" when there are no contacts and thus the message never gets > delivered. > > How can I check if the endpoint has contacts --- or preferably --- if the > message was actually delivered to an endpoint? It would be sufficient to > get > it to work with endpoints that are not supposed to have more than one > contact. >Making MESSAGE_SEND_STATUS reflect whether the message was sent or not for PJSIP was merged in 2 days ago[1]. It will be in a future release. If you don't want to wait you could use device state to know if the device is reachable (and thus a MESSAGE has a chance of being sent) using the DEVICE_STATE dialplan function[2]. [1] https://gerrit.asterisk.org/c/asterisk/+/13674 [2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_DEVICE_STATE -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200130/04543208/attachment.html>
hw
2020-Jan-30 14:20 UTC
[asterisk-users] delivery verification of instant messages with pjsip
On Thursday, January 30, 2020 2:38:31 PM CET Joshua C. Colp wrote:> On Thu, Jan 30, 2020 at 9:35 AM hw <hw at gc-24.de> wrote: > > Hi, > > > > when sending IMs from endpoint to endpoint with the MessageSend() > > application, > > I can check the MESSAGE_SEND_STATUS and send another message to the sender > > of > > the message to notify them that their message was not sent when the status > > indicates it. > > > > This works fine with chan_sip. With chan_pjsip, this works differently in > > that MESSAGE_SEND_STATUS is "SUCCESS" after sending the message, and only > > later asterisk figures out that it is "Unable to retrieve contact for > > endpoint > > <xxx>" when there are no contacts and thus the message never gets > > delivered. > > > > How can I check if the endpoint has contacts --- or preferably --- if the > > message was actually delivered to an endpoint? It would be sufficient to > > get > > it to work with endpoints that are not supposed to have more than one > > contact. > > Making MESSAGE_SEND_STATUS reflect whether the message was sent or not for > PJSIP was merged in 2 days ago[1]. It will be in a future release. If you > don't want to wait you could use device state to know if the device is > reachable (and thus a MESSAGE has a chance of being sent) using the > DEVICE_STATE dialplan function[2].Perfect answer, thanks! :) I think I'll just update from the git repo then and see if it works.> [1] https://gerrit.asterisk.org/c/asterisk/+/13674 > [2] > https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_DEVICE_STATE
Maybe Matching Threads
- delivery verification of instant messages with pjsip
- How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?
- Why I get repeat messages many times
- How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?
- How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?