Re: [OpenSIPS-Users] config 477 for offline message

2021-10-20 Thread jacky z
Hi Bogdan-Andrei,

Yes. 0x02 flag works. I knew this but struggled a lot to figure out where
to do the t_relay(0x02). It works now and no 477 sent. Thanks!

Regards,
Jacky


Hi,
>
> Using the 0x02 flag should do the trick . If you enable it, do you still
> see the TM sending the 477 reply automatically ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 10/14/21 5:17 AM, jacky z wrote:
>
> Hi Team,
>
> I am working on msilo module for offline message processing. When a
> message receiver just closed the user agent but the server hasn't updated
> the "location", the server will try to send the message several times
> through TCP/TLS and failed with "477". How can we capture this "477" and
> m_store the offline message? It seems the sample scripts don't handle this
> scenario. I also tried the following scripts in the route[relay] and the
> scripts were not executed based on the log. Appreciate your help! Thanks!
>
> if (!t_relay(0x02) ) {
>
> if (is_method("MESSAGE")) {
>
> if (m_store("$ou")) {
> log("MSILO: offline message stored\n");
> send_reply(202, "Accepted");
> }else{
> log("MSILO: offline message NOT stored\n");
> send_reply(503, "Service Unavailable");
> }
> exit;
>
> }
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] config 477 for offline message

2021-10-18 Thread Bogdan-Andrei Iancu

Hi,

Using the 0x02 flag should do the trick . If you enable it, do you still 
see the TM sending the 477 reply automatically ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/14/21 5:17 AM, jacky z wrote:

Hi Team,

I am working on msilo module for offline message processing. When a 
message receiver just closed the user agent but the server hasn't 
updated the "location", the server will try to send the message 
several times through TCP/TLS and failed with "477". How can we 
capture this "477" and m_store the offline message? It seems the 
sample scripts don't handle this scenario. I also tried the following 
scripts in the route[relay] and the scripts were not executed based on 
the log. Appreciate your help! Thanks!


if (!t_relay(0x02) ) {

if (is_method("MESSAGE")) {

if (m_store("$ou")) {
log("MSILO: offline message stored\n");
send_reply(202, "Accepted");
}else{
log("MSILO: offline message NOT stored\n");
send_reply(503, "Service Unavailable");
}
exit;

}

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] config 477 for offline message

2021-10-13 Thread jacky z
Hi Team,

I am working on msilo module for offline message processing. When a message
receiver just closed the user agent but the server hasn't updated the
"location", the server will try to send the message several times through
TCP/TLS and failed with "477". How can we capture this "477" and m_store
the offline message? It seems the sample scripts don't handle this
scenario. I also tried the following scripts in the route[relay] and the
scripts were not executed based on the log. Appreciate your help! Thanks!

if (!t_relay(0x02) ) {

if (is_method("MESSAGE")) {

if (m_store("$ou")) {
log("MSILO: offline message stored\n");
send_reply(202, "Accepted");
}else{
log("MSILO: offline message NOT stored\n");
send_reply(503, "Service Unavailable");
}
exit;

}
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users