[SR-Users] Dialog is not cleaned up after failed calls and BYEs.

2013-02-15 Thread Aft nix
Hi,

I'm trying to limit concurrent calls through kamailio using following script:
#!ifdef WITH_CALL_LIMIT
if (is_method(INVITE)) {
dlg_manage();
$var(100) = 0;
get_profile_size(callquota, $fd, $var(100));
if ($var(100) = 100 ) {
xdbg(DEBUG: Simultaneous calls limit reached);
sl_send_reply(503,Simultaneous calls limit reached);
exit;
}

set_dlg_profile(callquota,$fd);

}
#!endif

But the dialogs are not cleaned up after the call ends or a failed call happens.

For example after two failed calls :

[root@new tls]# kamctl fifo profile_get_size callquota
profile::  name=callquota value= count=4

and the dialog list :

[root@new tls]# kamctl fifo dlg_list
dialog::  hash=896:11654
state:: 1
ref_count:: 1
timestart:: 0
timeout:: 0
callid:: iSGRqQR0C4suBpQD0rHAEgV42vw0Sbpe
from_uri:: sip:123@205.164.40.150
from_tag:: d8x2LDBptN9FRJWtqFTj4DIpuQlKq.KN
caller_contact:: sip:123@180.149.7.45:33852;ob
caller_cseq:: 11755
caller_route_set::
caller_bind_addr:: udp:185.8.105.70:9547
callee_bind_addr::
to_uri:: sip:8801684077496@205.164.40.150
to_tag::
callee_contact::
callee_cseq::
callee_route_set::
dialog::  hash=896:11655
state:: 1
ref_count:: 1
timestart:: 0
timeout:: 0
callid:: iSGRqQR0C4suBpQD0rHAEgV42vw0Sbpe
from_uri:: sip:123@205.164.40.150
from_tag:: d8x2LDBptN9FRJWtqFTj4DIpuQlKq.KN
caller_contact:: sip:123@180.149.7.45:33852;ob
caller_cseq:: 11755
caller_route_set::
caller_bind_addr:: udp:185.8.105.70:9547
callee_bind_addr::
to_uri:: sip:8801684077496@205.164.40.150
to_tag::
callee_contact::
callee_cseq::
callee_route_set::
dialog::  hash=896:11657
state:: 1
ref_count:: 1
timestart:: 0
timeout:: 0
callid:: iSGRqQR0C4suBpQD0rHAEgV42vw0Sbpe
from_uri:: sip:123@205.164.40.150
from_tag:: d8x2LDBptN9FRJWtqFTj4DIpuQlKq.KN
caller_contact:: sip:123@180.149.7.45:33852;ob
caller_cseq:: 11756
caller_route_set::
caller_bind_addr:: udp:185.8.105.70:9547
callee_bind_addr::
to_uri:: sip:8801684077496@205.164.40.150
to_tag::
callee_contact::
callee_cseq::
callee_route_set::
dialog::  hash=1532:8089
state:: 1
ref_count:: 1
timestart:: 0
timeout:: 0
callid:: povqQaC.sRhKvmUaLzzR83bRXxouoNy8
from_uri:: sip:123@205.164.40.150
from_tag:: qXQll3QXrff.t27FHY2hucPfJ7K8Pfrs
caller_contact:: sip:123@180.149.7.45:33852;ob
caller_cseq:: 9232
caller_route_set::
caller_bind_addr:: udp:185.8.105.70:9547
callee_bind_addr::
to_uri:: sip:8801684077496@205.164.40.150
to_tag::
callee_contact::
callee_cseq::
callee_route_set::


You can see there are multiple entries. And these dialog does not get
cleaned up. The data is collected when there was no call(pending or
connected).


My kamailio version is :

 [root@new tls]# kamailio -V
version: kamailio 4.0.0-pre0 (x86_64/linux) 83eafc
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS,
USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
SHM_MMAP, PKG_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 83eafc
compiled on 18:34:58 Jan 17 2013 with gcc 4.4.6

Any suggestion?(It seems dialog module is not working as it should be.
I've also tried calling unset_profile() forcefully in failure route
with no luck)
--
-aft

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Warning - What does this mean?

2013-02-15 Thread Krishna Kurapati
I am seeing this error lately.

/usr/local/sbin/kamailio[28559]: WARNING: tm [t_lookup.c:1543]: WARNING:
script writer didn't release transaction

What does this mean?

Krish Kura
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Peter Dunkley

Hello,

Is there any reason why I couldn't use the existing siptrace() function 
in event_route[msrp:frame-in] to relay all MSRP messages to a SIP 
Capture node?


Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Peter Dunkley

Also, what about stuff from event_route[xhttp:request]?


On 15/02/13 14:45, Peter Dunkley wrote:

Hello,

Is there any reason why I couldn't use the existing siptrace() 
function in event_route[msrp:frame-in] to relay all MSRP messages to a 
SIP Capture node?


Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Peter Dunkley
I know that the HEP3 protocol is designed to handle different message 
types, so I am curious as to whether the implementation of the capture 
node can handle it.


Also, if the capture node can handle it and it does go into the DB will 
it cause problems for webhomer, or will webhomer simply ignore non-SIP 
entries (which would be absolutely fine for my use-case)?


Regards,

Peter


On 15/02/13 15:22, Dragos Dinu wrote:

Hi,

As far as I know, although making siptrace encapsulate different types 
of messages is not something very difficult, the sipcapture module is 
developed to write SIP messages into database.


Webhomer 3 reads SIP-related data from DB, so it displays only SIP.

Regards,
Dragos

On 02/15/2013 04:45 PM, Peter Dunkley wrote:

Hello,

Is there any reason why I couldn't use the existing siptrace() function
in event_route[msrp:frame-in] to relay all MSRP messages to a SIP
Capture node?

Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

2013-02-15 Thread V Tone
Hi,

I'm having problems getting started with the app_python module. I'm getting
the following in the logs:

 5(8890) : core [action.c:785]: BUG: do_action: bad set*() type 14
 5(8890) ERROR: core [action.c:1568]: run action error at: :0
 5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
 5(8890) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled
exception in the Python code:
 5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error in
do_action

My Python module is very basic:

class Router(object):
def child_init(self, child_id):
return 0

def route(self, msg):
msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
return 0

def mod_init():
instance = Router()
return instance

I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what I'm
doing wrong?

Many thanks in advance,

vtone
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Dragos Dinu

Sipcapture can't handle it, because it parses the data as SIP message.

If sipcapture would be able to handle it and get it into the DB, 
Webhomer will be able to show it, because it shows all the entries that 
you write into the DB.
You can, for example, write the MSRP message into the 'msg' column of 
the table and leave all the other sip-related columns blank. Webhomer 
will display the data just like that. Think of Webhomer as a 
user-interface to see everything that is in there (and to search data).


Hope it helps,

Dragos

On 02/15/2013 05:30 PM, Peter Dunkley wrote:

I know that the HEP3 protocol is designed to handle different message
types, so I am curious as to whether the implementation of the capture
node can handle it.

Also, if the capture node can handle it and it does go into the DB will
it cause problems for webhomer, or will webhomer simply ignore non-SIP
entries (which would be absolutely fine for my use-case)?

Regards,

Peter


On 15/02/13 15:22, Dragos Dinu wrote:

Hi,

As far as I know, although making siptrace encapsulate different types
of messages is not something very difficult, the sipcapture module is
developed to write SIP messages into database.

Webhomer 3 reads SIP-related data from DB, so it displays only SIP.

Regards,
Dragos

On 02/15/2013 04:45 PM, Peter Dunkley wrote:

Hello,

Is there any reason why I couldn't use the existing siptrace() function
in event_route[msrp:frame-in] to relay all MSRP messages to a SIP
Capture node?

Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Peter Dunkley
OK.  So sipcapture parses the messages itself instead of using the 
Kamailio's message parsing (which does handle HTTP and MSRP)?


Regards,

Peter

On 15/02/13 15:47, Dragos Dinu wrote:

Sipcapture can't handle it, because it parses the data as SIP message.

If sipcapture would be able to handle it and get it into the DB, 
Webhomer will be able to show it, because it shows all the entries 
that you write into the DB.
You can, for example, write the MSRP message into the 'msg' column of 
the table and leave all the other sip-related columns blank. Webhomer 
will display the data just like that. Think of Webhomer as a 
user-interface to see everything that is in there (and to search data).


Hope it helps,

Dragos

On 02/15/2013 05:30 PM, Peter Dunkley wrote:

I know that the HEP3 protocol is designed to handle different message
types, so I am curious as to whether the implementation of the capture
node can handle it.

Also, if the capture node can handle it and it does go into the DB will
it cause problems for webhomer, or will webhomer simply ignore non-SIP
entries (which would be absolutely fine for my use-case)?

Regards,

Peter


On 15/02/13 15:22, Dragos Dinu wrote:

Hi,

As far as I know, although making siptrace encapsulate different types
of messages is not something very difficult, the sipcapture module is
developed to write SIP messages into database.

Webhomer 3 reads SIP-related data from DB, so it displays only SIP.

Regards,
Dragos

On 02/15/2013 04:45 PM, Peter Dunkley wrote:

Hello,

Is there any reason why I couldn't use the existing siptrace() 
function

in event_route[msrp:frame-in] to relay all MSRP messages to a SIP
Capture node?

Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
list

sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Peter Dunkley
Actually, the sipcapture module does use the Kamailio message parsing.  
It looks like only a few small changes will be required to make it 
recognise and handle HTTP and MSRP.


I will look into doing this.

Regards,

Peter

On 15/02/13 15:56, Peter Dunkley wrote:
OK.  So sipcapture parses the messages itself instead of using the 
Kamailio's message parsing (which does handle HTTP and MSRP)?


Regards,

Peter

On 15/02/13 15:47, Dragos Dinu wrote:

Sipcapture can't handle it, because it parses the data as SIP message.

If sipcapture would be able to handle it and get it into the DB, 
Webhomer will be able to show it, because it shows all the entries 
that you write into the DB.
You can, for example, write the MSRP message into the 'msg' column of 
the table and leave all the other sip-related columns blank. Webhomer 
will display the data just like that. Think of Webhomer as a 
user-interface to see everything that is in there (and to search data).


Hope it helps,

Dragos

On 02/15/2013 05:30 PM, Peter Dunkley wrote:

I know that the HEP3 protocol is designed to handle different message
types, so I am curious as to whether the implementation of the capture
node can handle it.

Also, if the capture node can handle it and it does go into the DB will
it cause problems for webhomer, or will webhomer simply ignore non-SIP
entries (which would be absolutely fine for my use-case)?

Regards,

Peter


On 15/02/13 15:22, Dragos Dinu wrote:

Hi,

As far as I know, although making siptrace encapsulate different types
of messages is not something very difficult, the sipcapture module is
developed to write SIP messages into database.

Webhomer 3 reads SIP-related data from DB, so it displays only SIP.

Regards,
Dragos

On 02/15/2013 04:45 PM, Peter Dunkley wrote:

Hello,

Is there any reason why I couldn't use the existing siptrace() 
function

in event_route[msrp:frame-in] to relay all MSRP messages to a SIP
Capture node?

Will the SIP Capture node handle receiving these messages?

What will end up in the WebHomer display in these cases?

Regards,

Peter

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
list

sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
list

sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace/sipcapture and MSRP

2013-02-15 Thread Alexandr Dubovikov
Peter, before need to implement HEPv3 into siptrace module. Currently it has
only HEPv1/v2 support.

Can you please contact me in gtalk, we can do it together step by step.


Wbr,
Alexandr

-Original Message-
From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Peter Dunkley
Sent: Friday, February 15, 2013 5:02 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] siptrace/sipcapture and MSRP

Actually, the sipcapture module does use the Kamailio message parsing.  
It looks like only a few small changes will be required to make it recognise
and handle HTTP and MSRP.

I will look into doing this.

Regards,

Peter

On 15/02/13 15:56, Peter Dunkley wrote:
 OK.  So sipcapture parses the messages itself instead of using the 
 Kamailio's message parsing (which does handle HTTP and MSRP)?

 Regards,

 Peter

 On 15/02/13 15:47, Dragos Dinu wrote:
 Sipcapture can't handle it, because it parses the data as SIP message.

 If sipcapture would be able to handle it and get it into the DB, 
 Webhomer will be able to show it, because it shows all the entries 
 that you write into the DB.
 You can, for example, write the MSRP message into the 'msg' column of 
 the table and leave all the other sip-related columns blank. Webhomer 
 will display the data just like that. Think of Webhomer as a 
 user-interface to see everything that is in there (and to search data).

 Hope it helps,

 Dragos

 On 02/15/2013 05:30 PM, Peter Dunkley wrote:
 I know that the HEP3 protocol is designed to handle different 
 message types, so I am curious as to whether the implementation of 
 the capture node can handle it.

 Also, if the capture node can handle it and it does go into the DB 
 will it cause problems for webhomer, or will webhomer simply ignore 
 non-SIP entries (which would be absolutely fine for my use-case)?

 Regards,

 Peter


 On 15/02/13 15:22, Dragos Dinu wrote:
 Hi,

 As far as I know, although making siptrace encapsulate different 
 types of messages is not something very difficult, the sipcapture 
 module is developed to write SIP messages into database.

 Webhomer 3 reads SIP-related data from DB, so it displays only SIP.

 Regards,
 Dragos

 On 02/15/2013 04:45 PM, Peter Dunkley wrote:
 Hello,

 Is there any reason why I couldn't use the existing siptrace() 
 function in event_route[msrp:frame-in] to relay all MSRP messages 
 to a SIP Capture node?

 Will the SIP Capture node handle receiving these messages?

 What will end up in the WebHomer display in these cases?

 Regards,

 Peter

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

2013-02-15 Thread Konstantin M.
Hello,

Ok, bug is confirmed.
I will fix it a soon.

Can I ask you - are you using now v4 or still using 3.x ?



2013/2/15 V Tone vtone...@gmail.com

 Hi,

 I'm having problems getting started with the app_python module. I'm
 getting the following in the logs:

  5(8890) : core [action.c:785]: BUG: do_action: bad set*() type 14
  5(8890) ERROR: core [action.c:1568]: run action error at: :0
  5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
  5(8890) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled
 exception in the Python code:
  5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error in
 do_action

 My Python module is very basic:

 class Router(object):
 def child_init(self, child_id):
 return 0

 def route(self, msg):
 msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
 return 0

 def mod_init():
 instance = Router()
 return instance

 I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what I'm
 doing wrong?

 Many thanks in advance,

 vtone

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

2013-02-15 Thread V Tone
Thanks Konstantin, much appreciated. I am using 3.x... I'll jump up to 4
and wait your feedback.


On 15 February 2013 17:39, Konstantin M. evilz...@gmail.com wrote:

 Hello,

 Ok, bug is confirmed.
 I will fix it a soon.

 Can I ask you - are you using now v4 or still using 3.x ?



 2013/2/15 V Tone vtone...@gmail.com

 Hi,

 I'm having problems getting started with the app_python module. I'm
 getting the following in the logs:

  5(8890) : core [action.c:785]: BUG: do_action: bad set*() type 14
  5(8890) ERROR: core [action.c:1568]: run action error at: :0
  5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
  5(8890) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled
 exception in the Python code:
  5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error
 in do_action

 My Python module is very basic:

 class Router(object):
 def child_init(self, child_id):
 return 0

 def route(self, msg):
 msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
 return 0

 def mod_init():
 instance = Router()
 return instance

 I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what
 I'm doing wrong?

 Many thanks in advance,

 vtone

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

2013-02-15 Thread Konstantin M.
A quick workaround - open file 'app_python/python_msgobj.c' with any text
editor, find function 'msg_rewrite_ruri' and
change a line (inside this function):
from
act.val[0].type = STR_ST;
to:
act.val[0].type = STRING_ST;

then recompile, it should work.

I will commit to git for v4 in a some min.

2013/2/15 V Tone vtone...@gmail.com

 Thanks Konstantin, much appreciated. I am using 3.x... I'll jump up to 4
 and wait your feedback.


 On 15 February 2013 17:39, Konstantin M. evilz...@gmail.com wrote:

 Hello,

 Ok, bug is confirmed.
 I will fix it a soon.

 Can I ask you - are you using now v4 or still using 3.x ?



 2013/2/15 V Tone vtone...@gmail.com

 Hi,

 I'm having problems getting started with the app_python module. I'm
 getting the following in the logs:

  5(8890) : core [action.c:785]: BUG: do_action: bad set*() type 14
  5(8890) ERROR: core [action.c:1568]: run action error at: :0
  5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
  5(8890) ERROR: app_python [python_support.c:38]: python_exec2:
 Unhandled exception in the Python code:
  5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error
 in do_action

 My Python module is very basic:

 class Router(object):
 def child_init(self, child_id):
 return 0

 def route(self, msg):
 msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
 return 0

 def mod_init():
 instance = Router()
 return instance

 I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what
 I'm doing wrong?

 Many thanks in advance,

 vtone

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

2013-02-15 Thread V Tone
ok I'll try it.

Speaking of workarounds, is there any reason that call_function to core
module functions should not work?

 5(11462) DEBUG: core [sr_module.c:680]: find_export_record: rewriteuri
not found
 5(11462) ERROR: app_python [python_support.c:132]: python_exec2: Unhandled
exception in the Python code:
RuntimeError: no such function


On 15 February 2013 17:59, Konstantin M. evilz...@gmail.com wrote:

 A quick workaround - open file 'app_python/python_msgobj.c' with any text
 editor, find function 'msg_rewrite_ruri' and
 change a line (inside this function):
 from
 act.val[0].type = STR_ST;
 to:
 act.val[0].type = STRING_ST;

 then recompile, it should work.

 I will commit to git for v4 in a some min.


 2013/2/15 V Tone vtone...@gmail.com

 Thanks Konstantin, much appreciated. I am using 3.x... I'll jump up to 4
 and wait your feedback.


 On 15 February 2013 17:39, Konstantin M. evilz...@gmail.com wrote:

 Hello,

 Ok, bug is confirmed.
 I will fix it a soon.

 Can I ask you - are you using now v4 or still using 3.x ?



 2013/2/15 V Tone vtone...@gmail.com

 Hi,

 I'm having problems getting started with the app_python module. I'm
 getting the following in the logs:

  5(8890) : core [action.c:785]: BUG: do_action: bad set*() type 14
  5(8890) ERROR: core [action.c:1568]: run action error at: :0
  5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
  5(8890) ERROR: app_python [python_support.c:38]: python_exec2:
 Unhandled exception in the Python code:
  5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error
 in do_action

 My Python module is very basic:

 class Router(object):
 def child_init(self, child_id):
 return 0

 def route(self, msg):
 msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
 return 0

 def mod_init():
 instance = Router()
 return instance

 I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what
 I'm doing wrong?

 Many thanks in advance,

 vtone

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] openser db on an external mysql server

2013-02-15 Thread Prakash N
Hi Daniel / Muhammad ,

   Thanks for your great support

   The problem now only got fixed ,the solution is  children=1 changes in
kamailio.cfg

I have tested Ubuntu 12 and Centos 5.7 both having the issue and
solution will be the above

I am continuing testing with Asterisk 1.8 Real time  with Kamailio and
I will update you the testing result by next week

With Regards

N.Prakash



On Fri, Feb 15, 2013 at 1:24 AM, Muhammad Shahzad shaherya...@gmail.comwrote:

 Thanks for insight. It is sad that many users do not give necessary logs
 and traces for debug even after several requests, nor they follow the
 advice and go for their own creativity making it very difficult to help
 them out.

 In my experience the best way to learn a technology, problem or just about
 anything is to become a good copy cat. After repeating same thing a few
 times one starts to understand the concept and only then one should go for
 adventure of own creativity.

 Anyways, i hope Prakash's problem is solved now, since i haven't seen
 anything new from him/her on this thread today. ;-)

 Thank you.


 On Thu, Feb 14, 2013 at 7:20 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:


 On 2/14/13 7:09 PM, Daniel-Constantin Mierla wrote:

 I want to add few details about some case that I encountered in the past.
 On some specific OS'es, especially centos, seems to be a limit on the
 number of new connections allowed in the host.


 To be more precise, it is about a limit on the rate of new connections.
 So the problem is when many new connections are opened at more or less same
 time. All is fine when new connections are opened with some delay between
 them.

 Cheers,
 Daniel


 That results in some kamailio processes being able to connect, some not,
 with over all result of failing to start kamailio.

 For that reason, there is a config parameter that can be used to control
 the forking rate at startup:

 http://www.kamailio.org/wiki/cookbooks/devel/core#fork_delay

 In case of some kamailio process can connect and some cannot, try with
 this parameter.

 Cheers,
 Daniel


 On 2/13/13 5:12 PM, Muhammad Shahzad wrote:

 Now, we have different mysql error as well as different network topology,

  1. Kamailio IP has changed from, previously 192.168.1.170, now it is
 192.168.1.60 as the error says.

  *Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7576]: ERROR: core
 [pt.c:350]: ERROR: fork_process(): init_child failed for  process 7, pid
 7576, udp receiver child=2 sock=192.168.1.60:5060*

  2. MySQL server has changed, previously it was 192.168.1.1, now its
 192.168.1.170 as the error says,

  *Feb 14 01:41:01 192 /usr/local/sbin/kamailio[7575]: ERROR: db_mysql
 [km_my_con.c:109]: driver error: Can't connect to MySQL server on
 '192.168.1.170' (4)*

  3. MySQL connection error has changed, previously, Unknown database,
 now it is Can't connect to MySQL server.


 Below i am giving steps again, please carefully check them,

  1. On mysql server, make sure mysql service is running and listening
 for connections on 192.168.1.170, (make sure this ip is correct as well).

  netstat -plan | grep 3306

  2. On mysql server, make sure openser database is created and fully
 populated.

  mysql -p openser
 SELECT * FROM version;

  3. On mysql server, make sure you have user for kamailio service
 'openser'@'192.168.1.60' (make sure kamailio ip here is correct) is
 created with full permissions on openser database.

  SHOW GRANTS FOR 'openser'@'192.168.1.60';

 4. On kamailio server, make sure you can access openser database using
 user name openser and password operserrw manually (make sure user name
 and password are correct and mentioned in kamailio.cfg correctly).

 mysql -u openser -h 192.168.1.170 -p openser
 SELECT * FROM version;

  5. On kamailio server, check db connection string (db username,
 password and host), start kamailio service and check debug logs in
 /var/log/message to see if kamailio is able to connect to mysql database.
 If not then repeat step 1-4 again.

 Hope it solves the problem.


 Thank you.


 On Wed, Feb 13, 2013 at 4:23 PM, Prakash N prakas...@tevatel.com wrote:

 Hi Shahzap ,

 Thanks for your detail mail

 Now  i have reinstalled  other server ,still i am having the
 same problem

 If i use localhost it is working correctly ,if i changed to
 remote sever not working( i have changed DB HOST = 192.168.1.170 (remote
 server )

  mysql -u openser -h 192.168.1.170 -p - I can able to connect


  SHOW GRANTS FOR 'openser'@'192.168.1.170';  it is also granted

  Output

 ++
 | Grants for openser@192.168.1.170
   |

 ++
 | GRANT USAGE ON *.* TO 'openser'@'192.168.1.170' IDENTIFIED BY
 PASSWORD 

[SR-Users] Any substitute or replace function for the request-/response line of SIP messages available?

2013-02-15 Thread Klaus Feichtinger

Hi,

I have a very specific situation that the implementation of a customer 
SIP user agent is absolutely not standards conform. Therefore, I use 
Kamailio as a SIP protocol adapter between the non-standard conform user 
agent(s) and the typical RFC3261 compliant user agents. Most conversions 
are working fine. But in a very specific scenario I have to 
change/convert a SIP response message to a SIP request message and 
change the SIP method´s name. This conversion is no problem for the SIP 
header fields. However, I haven't found a way for adapting the 
response-/request line of a SIP message. This line seems to be protected.


The described situation of the perverse conversion I try to realize is 
following (please do not ask why? or think I'm mad...):

(mad) UA1 == INVITE == SIP-Prot-Adapter(Kamailio) == INVITE == (typ.)UA2
UA1 == BYE == SIP-Prot-Adapter(Kamailio) == 488 == (typ.)UA2
UA1 == BYE == SIP-Prot-Adapter(Kamailio) == ACK == (typ.)UA2

I use the textops module for substitution and/or replacement in SIP 
header fields. But the subst and replace functions cannot be used 
for the request-/response line on top of the SIP messages. I was a 
little bit irritated, as the search function is still working on these 
lines, but not the subst/replace function. Creating a new SIP message 
with the UAC module (as alternative) is not okay, as this new message 
does not use the same values for Call-ID, From-tag a.s.o. and these 
values can't be changed before sending the message.


Does anybody know a way / function / method for manipulating the 
request-/response line of a message? It would be perfect using a 
function á la sed/subst.


Thanks
Klaus

P.S. I tested with kamailio-3.3.3

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Any substitute or replace function for the request-/response line of SIP messages available?

2013-02-15 Thread Alex Balashov

At the risk of sounding unhelpful, if you are having to modify the
request/status line, there's probably something more deeply wrong here,
and you should probably endeavour to fix the problem in a somewhat more
realistic manner.

Furthermore, it must be said that proxies do not make a particularly
good protocol adaptor;  in contrast to thicker back-to-back user
agents (B2BUAs), which build out two logically independent call legs and
bridge signaling events between them selectively, as they see fit,
proxies are more or less obligated, in principle, to pass on what they
receive, in unadulterated form.  Kamailio does offer some hacks around
that, in the form of textops and so on, but it doesn't really mean that
it is the right tool for the job.

That said, if you are dead-set on doing this, your best for regenerating 
a reply into a request is the 'uac' module and uac_req_send() functionality:


http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html#id2494432

-- Alex

On 02/15/2013 03:22 PM, Klaus Feichtinger wrote:


Hi,

I have a very specific situation that the implementation of a
customer SIP user agent is absolutely not standards conform.
Therefore, I use Kamailio as a SIP protocol adapter between the
non-standard conform user agent(s) and the typical RFC3261 compliant
user agents. Most conversions are working fine. But in a very
specific scenario I have to change/convert a SIP response message to
a SIP request message and change the SIP method´s name. This
conversion is no problem for the SIP header fields. However, I
haven't found a way for adapting the response-/request line of a SIP
message. This line seems to be protected.

The described situation of the perverse conversion I try to realize
is following (please do not ask why? or think I'm mad...): (mad)
UA1 == INVITE == SIP-Prot-Adapter(Kamailio) == INVITE == (typ.)UA2
 UA1 == BYE == SIP-Prot-Adapter(Kamailio) == 488 == (typ.)UA2 UA1
== BYE == SIP-Prot-Adapter(Kamailio) == ACK == (typ.)UA2

I use the textops module for substitution and/or replacement in
SIP header fields. But the subst and replace functions cannot be
used for the request-/response line on top of the SIP messages. I
was a little bit irritated, as the search function is still working
on these lines, but not the subst/replace function. Creating a new
SIP message with the UAC module (as alternative) is not okay, as this
new message does not use the same values for Call-ID, From-tag a.s.o.
and these values can't be changed before sending the message.

Does anybody know a way / function / method for manipulating the
request-/response line of a message? It would be perfect using a
function á la sed/subst.

Thanks Klaus

P.S. I tested with kamailio-3.3.3

___ SIP Express Router
(SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users