[OpenSIPS-Users] not trigger on_failure_route[0] when use mi interface

2015-04-14 Thread chow
Hi:
 I use  t_uac_dlg send message.
 the destination  user in my location table.  actually,this user is
offline and not send  unregister。
 then, I sent  lots of message to this user,  only previous message  can 
trigger on_failure_route[].
 
 some  log  like this:
 Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_server: received
:t_uac_dlg:#012MESSAGE#012sip:rh0002...@ivoip.ronghe.tv#012sip:172.17.0.18:8060#012.#012"From:
sip:icast_wei...@ivoip.ronghe.tv#015#012To:
sip:rh0002...@ivoip.ronghe.tv#015#012Content-Type:
Multipart/Related#015#012"#012"--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
text/plain#015#012#015#012P-ICast-Message-Expire:
1429164748#015#012P-ICast-WeiXin-NickName:
孙悟空#015#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
application/xml#015#012#015#012#012#0121428991948#012#012#0126137473683113663203#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8--#015#012"#012#012
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_server: mi_buf is
:t_uac_dlg:#012MESSAGE#012sip:rh0002...@ivoip.ronghe.tv#012sip:172.17.0.18:8060#012.#012"From:
sip:icast_wei...@ivoip.ronghe.tv#015#012To:
sip:rh0002...@ivoip.ronghe.tv#015#012Content-Type:
Multipart/Related#015#012"#012"--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
text/plain#015#012#015#012P-ICast-Message-Expire:
1429164748#015#012P-ICast-WeiXin-NickName:
孙悟空#015#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
application/xml#015#012#015#012#012#0121428991948#012#012#0126137473683113663203#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8--#015#012"#012#012
and we have received 726 bytes
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:identify_command: the command starts here:
t_uac_dlg:#012MESSAGE#012sip:rh0002...@ivoip.ronghe.tv#012sip:172.17.0.18:8060#012.#012"From:
sip:icast_wei...@ivoip.ronghe.tv#015#012To:
sip:rh0002...@ivoip.ronghe.tv#015#012Content-Type:
Multipart/Related#015#012"#012"--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
text/plain#015#012#015#012P-ICast-Message-Expire:
1429164748#015#012P-ICast-WeiXin-NickName:
孙悟空#015#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
application/xml#015#012#015#012#012#0121428991948#012#012#0126137473683113663203#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8--#015#012"#012#012
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:identify_command: the command is t_uac_dlg
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:identify_command: dtgram->len is 726
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:identify_command: dtgram->len is 714
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_server: we have a valid command 
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_server: after identifing the command, the
received datagram is 
MESSAGE#012sip:rh0002...@ivoip.ronghe.tv#012sip:172.17.0.18:8060#012.#012"From:
sip:icast_wei...@ivoip.ronghe.tv#015#012To:
sip:rh0002...@ivoip.ronghe.tv#015#012Content-Type:
Multipart/Related#015#012"#012"--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
text/plain#015#012#015#012P-ICast-Message-Expire:
1429164748#015#012P-ICast-WeiXin-NickName:
孙悟空#015#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
application/xml#015#012#015#012#012#0121428991948#012#012#0126137473683113663203#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8--#015#012"#012#012
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_server: parsing the command's params
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_parse_node: the remaining datagram to be parsed
is
MESSAGE#012sip:rh0002...@ivoip.ronghe.tv#012sip:172.17.0.18:8060#012.#012"From:
sip:icast_wei...@ivoip.ronghe.tv#015#012To:
sip:rh0002...@ivoip.ronghe.tv#015#012Content-Type:
Multipart/Related#015#012"#012"--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
text/plain#015#012#015#012P-ICast-Message-Expire:
1429164748#015#012P-ICast-WeiXin-NickName:
孙悟空#015#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8#015#012Content-Type:
application/xml#015#012#015#012#012#0121428991948#012#012#0126137473683113663203#012#015#012--55ca910c3bd0e785f97e77b8fd9e4ec8--#015#012"#012#012
and 714 in length 
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_parse_node: the string is not just a quoted
string
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_parse_node: found newline before
attr_separator--we have just the attribute's value
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_parse_node: empty name, attr not quoted value
 found
Apr 14 14:12:28 ivoip /usr/sbin/opensips[36928]:
DBG:mi_datagram:mi_datagram_parse_node: 1 data->len is 714
Apr 14 14:12:28 ivoip /usr

Re: [OpenSIPS-Users] not trigger on_failure_route[0] when use mi interface

2015-04-14 Thread chow
   in  my  understanding: mi interface will first enter local_route, 
   in local route , will  generate SIP Message, this SIP Message will route
to main REQUEST_ROUTE.
   in  REQUEST_ROUTE, I have some code part like this:
   
   t_on_failure("sip_message");

   
   if this transaction have any error(I also use t_relay(0x02) in
route[relay]), the FAILURE_ROUTE will be trigger.
   

   
   but , in my case, in local_route, it generate 408 code, then exit.
   so, where I can call m_store() to store message when have any error.
  
   



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/not-trigger-on-failure-route-0-when-use-mi-interface-tp7596480p7596481.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] how do I check destination user is offline

2015-04-14 Thread chow
Hi ALL:
   User A  sent register to opensips. then User A client core-dump,  so
User A will  never sent unregister message to opensips.
   in this case , how do I  Immediately know User A unreachable .
registered function can not know this,
by the way,  transport protocol is TCP.
thanks a lot.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/how-do-I-check-destination-user-is-offline-tp7596490.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Memory leak issue?

2015-04-14 Thread Vlad Paiu

Hello,

Is the leak you are reporting happening in shared memory, or pkg ? Your 
logs contain just PKG memory dump ?


OpenSIPS 1.9 is no longer supported ( see [1] ), so I would advise you 
to update to the latest OpenSIPS 1.11 ( latest minor release is 1.11.4 )


[1] www.opensips.org/About/AvailableVersions

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 09.04.2015 09:09, microx wrote:

Hi all,

I'm using OpenSIPS version 1.9.2 to set up a SIP outbound proxy and two
internal SIP servers in my testing environment.
All SIP requests and responses follow the same following routes.
SIP client --> SIP outbound proxy --> SIP server --> SIP outbound proxy -->
SIP clients

With some stress tests in several days (many SIP client continue
registration), I find that OpenSIPS eats much more memory than what I
configuration. The eaten memory is not released after more than several hour
after the stress test is done. Following the official troubleshooting guide
about memory issue, I try to identify whether this is a memory leak issue.
Please kindly help to take a look at the attached log files. Besides, is it
possible that my incorrect configuration leads to memory leak? I am afraid
that I do not properly write the script to produce the memory leak issue.
Many thanks for any comment.

opensips_memory_leak_sipserver.gz


opensips_memory_leak_sipoutbound.gz



Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Memory-leak-issue-tp7596394.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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] lookup("location") extract received field value

2015-04-14 Thread Satish Patel
Hi,

I have following User registred over public IP but that client doesn't
support STUN so contact info showing private IP "192.168.1.6"

lookup function default extract "Contact:: sip:1001@192.168.1.6:27098"

Is there a way i can extract  "Received:: sip:173.XX.XX.215:27098"  so i
can create new URI and send call to that?

if (lookup("location")) {
..
..
}


[root@sip ~]# opensipsctl ul show
Domain:: location table=512 records=1
AOR:: 1...@sip.example.com
Contact:: sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db
Q=
Expires:: 3585
Callid:: NjIyYzg5NzU0NGNlYjFhZTEyMDZlNDk2NTgzMDUzYjY
Cseq:: 2
User-agent:: X-Lite 4.7.1 74247-44615bc7-W6.1
Received:: sip:173.XX.XX.215:27098
State:: CS_SYNC
Flags:: 0
Cflags:: NAT
Socket:: udp:182.XX.XX.164:5060
Methods:: 5951
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] SIP/2.0 477 Send failed (477/TM) - Route

2015-04-14 Thread Vlad Paiu

Hello,

What you can do is send the call to a destination which is not available 
at all, control the amount of time you want to give the client to 
register via the fr_timer, and when that timeout is exceeded try to 
route the call to the client.


Short snippet of code would be

if (!t_relay("3"))
{
if((is_method("INVITE")))
{
exec_avp("some script to wake-up the client");
# relay to localhost, discart port
$du = "sip:127.0.0.1:9";
# wait two seconds for the client to register
$T_fr_timeout = 2;
t_on_failure("route_to_client");
t_relay();
exit;
}
}

failure_route[route_to_client] {
if (t_was_cancelled())
exit;

# after two seconds, this will get called
# see if the client is registered now

lookup("location");
t_relay();
exit;
}

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 13.04.2015 18:20, leo wrote:

Hello Guys,

could you give the last clue on this? The point is once the UA is
re-registered, how to forward the call to it?
Thanks,

Leo



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/SIP-2-0-477-Send-failed-477-TM-Route-tp7595929p7596472.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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


Re: [OpenSIPS-Users] not trigger on_failure_route[0] when use mi interface

2015-04-14 Thread Vlad Paiu

Hello,

Currently there is no failure_route support for SIP messages generated 
internally by OpenSIPS.


What you can do is to loop the SIP Message back to OpenSIPS from the 
local_route , and that way you will get the looped MESSAGE in your main 
route , where you can arm a failure route.


Short snipped of code :

local_route {
if (is_method("MESSAGE")) {
$du = "sip:OPENSIPS_IP:OPENSIPS_PORT";
}
}

route {
...
...
if ($si == "OPENSIPS_IP" && $sp == "OPENSIPS_PORT") {
# processing of the looped message here
lookup("localtion");
t_on_failure("user_offline");
t_relay();
exit;
}
}

failure_route[user_offline] {
...
...
m_store();
}

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 14.04.2015 11:04, chow wrote:

in  my  understanding: mi interface will first enter local_route,
in local route , will  generate SIP Message, this SIP Message will route
to main REQUEST_ROUTE.
in  REQUEST_ROUTE, I have some code part like this:

t_on_failure("sip_message");



if this transaction have any error(I also use t_relay(0x02) in

route[relay]), the FAILURE_ROUTE will be trigger.



but , in my case, in local_route, it generate 408 code, then exit.

so, where I can call m_store() to store message when have any error.
   





--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/not-trigger-on-failure-route-0-when-use-mi-interface-tp7596480p7596481.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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


Re: [OpenSIPS-Users] how do I check destination user is offline

2015-04-14 Thread Vlad Paiu

Hello,

If the destination is TCP, then you can detect the failure to relay in 
your OpenSIPS script. See the flags that t_relay() takes at 
www.opensips.org/html/docs/modules/1.11.x/tm#id294528


if (!t_relay("0x02")) {
# failure to relay , treat error here
}

Make sure to also set low tcp_send_timeout and tcp_connect_timeout 
values , in order to detect the failures faster ( 
http://www.opensips.org/Documentation/Script-CoreParameters-1-11#toc92 )


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 14.04.2015 15:02, chow wrote:

Hi ALL:
User A  sent register to opensips. then User A client core-dump,  so
User A will  never sent unregister message to opensips.
in this case , how do I  Immediately know User A unreachable .
registered function can not know this,
by the way,  transport protocol is TCP.
 thanks a lot.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/how-do-I-check-destination-user-is-offline-tp7596490.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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


Re: [OpenSIPS-Users] lookup("location") extract received field value

2015-04-14 Thread Vlad Paiu

Hello,

From you ul show output, you don't have to do anything special for this 
to work - OpenSIPS will automatically relay the call to the Received:: 
value that's displayed in the ul show output, setting it as $du, while 
the actual Request-URI of the message will contain the private Contact 
that the client registered.


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 14.04.2015 18:09, Satish Patel wrote:


Hi,

I have following User registred over public IP but that client doesn't 
support STUN so contact info showing private IP "192.168.1.6"


lookup function default extract "Contact:: sip:1001@192.168.1.6:27098 
"


Is there a way i can extract  "Received:: sip:173.XX.XX.215:27098"  so 
i can create new URI and send call to that?


if (lookup("location")) {
..
..
}


[root@sip ~]# opensipsctl ul show
Domain:: location table=512 records=1
AOR:: 1...@sip.example.com 
Contact:: 
sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db Q=

Expires:: 3585
Callid:: 
NjIyYzg5NzU0NGNlYjFhZTEyMDZlNDk2NTgzMDUzYjY

Cseq:: 2
User-agent:: X-Lite 4.7.1 74247-44615bc7-W6.1
Received:: sip:173.XX.XX.215:27098
State:: CS_SYNC
Flags:: 0
Cflags:: NAT
Socket:: udp:182.XX.XX.164:5060
Methods:: 5951


___
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


Re: [OpenSIPS-Users] lookup("location") extract received field value

2015-04-14 Thread Satish Patel
Thanks Vlad,

$du   did magic, it is extracting Received:: value.

On Tue, Apr 14, 2015 at 11:34 AM, Vlad Paiu  wrote:

>  Hello,
>
> From you ul show output, you don't have to do anything special for this to
> work - OpenSIPS will automatically relay the call to the Received:: value
> that's displayed in the ul show output, setting it as $du, while the actual
> Request-URI of the message will contain the private Contact that the client
> registered.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 14.04.2015 18:09, Satish Patel wrote:
>
>
>  Hi,
>
>  I have following User registred over public IP but that client doesn't
> support STUN so contact info showing private IP "192.168.1.6"
>
>  lookup function default extract "Contact:: sip:1001@192.168.1.6:27098"
>
>  Is there a way i can extract  "Received:: sip:173.XX.XX.215:27098"  so i
> can create new URI and send call to that?
>
>  if (lookup("location")) {
>  ..
> ..
> }
>
>
>  [root@sip ~]# opensipsctl ul show
> Domain:: location table=512 records=1
> AOR:: 1...@sip.example.com
> Contact::
> sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db Q=
> Expires:: 3585
> Callid::
> NjIyYzg5NzU0NGNlYjFhZTEyMDZlNDk2NTgzMDUzYjY
> Cseq:: 2
> User-agent:: X-Lite 4.7.1 74247-44615bc7-W6.1
> Received:: sip:173.XX.XX.215:27098
> State:: CS_SYNC
> Flags:: 0
> Cflags:: NAT
> Socket:: udp:182.XX.XX.164:5060
> Methods:: 5951
>
>
> ___
> 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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [OpenSIPS-Devel] Contest and prizes - OpenSIPS 2.1 testing

2015-04-14 Thread Răzvan Crainea

Hello, All!

The winner of the third Bug Hunt edition[1] is Bernard 
Buitenhuis(@bbuitenhuis)[2] for the fork=no crash. Many thanks for 
reporting it!


The fourth edition has now started and lasts until 20th of April, 2015! 
Don't miss your chance to win a nice OpenSIPS t-shirt, as well as the 
full OpenSIPS' team gratitude!


[1] http://www.opensips.org/Community/BugHuntContest
[2] https://github.com/bbuitenhuis

Cheers,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

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