Re: [SR-Users] drouting

2015-04-24 Thread Keith
Hi,

I am using drouting but having issues when trying to route numbers in E164
in the prefix. Any ideas how to allow for a + in the prefix field in the DB?

Thanks
Keith
___
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] drouting

2015-04-24 Thread Daniel-Constantin Mierla
Hello,

On 24/04/15 11:59, Keith wrote:
 Hi,

 I am using drouting but having issues when trying to route numbers in
 E164 in the prefix. Any ideas how to allow for a + in the prefix field
 in the DB?

checking quickly, looks like drouting was designed to accept only digits
for prefix.

You can try following options:

1) store 00 instead of + in database and replace + with 00 in
kamailio.cfg before calling drouting function

2) edit modules/drouting/prefix_tree.h and replace the block:

#define PTREE_CHILDREN 10
#define IS_DECIMAL_DIGIT(d) \
(((d)='0')  ((d)= '9')) 

with:

#define PTREE_CHILDREN 11
#define IS_DECIMAL_DIGIT(d) \
( ((d)=='+') || ( ((d)='0')  ((d)= '9') ) ) 

recompile and re-install module.

If 2) works, then it can be considered to be fixed in the main git
repository.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] drouting failure loop

2014-06-02 Thread Daniel-Constantin Mierla

Hello,

On 30/05/14 20:54, Pete Ashdown wrote:

I'm trying to get my head around how to do a failure loop in droute
through all possible destinations, and if all destinations are
exhausted, go to failureroute.  Does anyone have an example of this?
Without the ability to do a while on (!t_relay()) to determine whether
to go to use_next_gw(), I'm not sure how I can.
Maybe you can show how you try it because the typical way for failure 
re-routing is:


request_route{ ... t_on_failure(...); t_relay() } === failure_route{ 
... t_on_failure(...); t_relay() } === failure_route{ ... 
t_on_failure(...); t_relay() } 


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
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] Drouting

2014-04-29 Thread aawaise
Hello, 

I want to decide route for incoming INVITE packet on basis of Domain
entry in Location Table, i.e domain part of the user, used for identifing
the user (along with the username part). Useful in multi domain scenarios,
which is defined by

modparam(usrloc, use_domain, 1)
As far as I have read, I believe Drouting is the solution to this problem.
Need some guidance in this regard.

Any help in this regard will be highly appreciated.
Thanks  :)



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/Drouting-tp127034p127329.html
Sent from the Users mailing list archive at Nabble.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


Re: [SR-Users] drouting/LCR/dispatcher

2014-04-29 Thread Gary Wallis

On 4/29/2014 06:36, Keith wrote:

Hi all,

I am having trouble deciding which one of these is best. I was going to
start to use drouting but that doesn't seem to give me the probe
efficiency of dispatcher. However I need to control calls based on
destinations to different voice carriers.

I'm looking for a combination of them to enable me to get the
functionality required.

Any ideas/pointers?

Thanks
Keith


Me too...There are many solutions.

I ended up using the old droute module, but mostly since I inherited a 
working cfg file from OpenSIPS that I got to work after many hours of 
debugging.


I would be happy to share what I found out.

Best regards,
Gary

___
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] DRouting, routeid is not triggered

2014-04-28 Thread Daniel-Constantin Mierla

Hello,

ok, I will backport.

Cheers,
Daniel

On 27/04/14 16:44, Maciej Bylica wrote:

Hi Daniel,

It works... thanks alot for your help.

Mac.


2014-04-25 0:48 GMT+02:00 Maciej Bylica mb...@gazeta.pl 
mailto:mb...@gazeta.pl:


Hi Daniel,

I am about to do this on Fri and will give you feedback soon.

Thanks
Mac.



Can you try the patch from commit:

-

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3386295d7607a58d37a65b6822bf5f98b3fefa0

If you are using git, do a git pull, then you can pick the
commit in your branch (if you are not on master):

git cherry-pick -x c3386295d7607a58d37a65b6822bf5f98b3fefa0

Cheers,
Daniel


On 24/04/14 17:16, Daniel-Constantin Mierla wrote:

Hello,

busy with the release I didn't have time to troubleshoot more
yet.

Cheers,
Daniel

On 24/04/14 17:10, Maciej Bylica wrote:

Hello

Do you need any other data to verify?

Thanks.


2014-04-23 12:11 GMT+02:00 Maciej Bylica mb...@gazeta.pl:

Hi Daniel,

Here is debug you requested.

DEBUG: core [parser/msg_parser.c:623]: parse_msg():
SIP Request:
DEBUG: core [parser/msg_parser.c:625]: parse_msg():
ámethod: áINVITE
DEBUG: core [parser/msg_parser.c:627]: parse_msg():
áuri: á á sip:43111223344@10.10.10.5
DEBUG: core [parser/msg_parser.c:629]: parse_msg():
áversion: SIP/2.0
DEBUG: core [parser/parse_via.c:1284]:
parse_via_param(): Found param type 235, rport =
n/a; state=6
DEBUG: core [parser/parse_via.c:1284]:
parse_via_param(): Found param type 232, branch =
z9hG4bKZZDHrKg1B4Q1c; state=16
DEBUG: core [parser/parse_via.c:2672]: parse_via():
end of header reached, state=5
DEBUG: core [parser/msg_parser.c:513]:
parse_headers(): parse_headers: Via found, flags=2
DEBUG: core [parser/msg_parser.c:515]:
parse_headers(): parse_headers: this is the first via
DEBUG: core [receive.c:152]: receive_msg(): After
parse_msg...
DEBUG: core [receive.c:193]: receive_msg(): preparing
to run routing scripts...
DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present():
value = 69
DEBUG: maxfwd [maxfwd.c:161]: process_maxfwd_header():
value 69 decreased to 16
DEBUG: core [parser/parse_addr_spec.c:893]:
parse_addr_spec(): end of header reached, state=10
DEBUG: core [parser/msg_parser.c:190]:
get_hdr_field(): DEBUG: get_hdr_field: To [32];
uri=[sip:43111223344@10.10.10.5]
DEBUG: core [parser/msg_parser.c:192]:
get_hdr_field(): DEBUG: to body
[sip:43111223344@10.10.10.5#015#012]
DEBUG: core [parser/msg_parser.c:170]:
get_hdr_field(): get_hdr_field: cseq CSeq: 58787375
INVITE
DEBUG: core [parser/msg_parser.c:204]:
get_hdr_field(): DEBUG: get_hdr_body : content_length=203
DEBUG: core [parser/msg_parser.c:106]:
get_hdr_field(): found end of header
DEBUG: core [parser/parse_addr_spec.c:176]:
parse_to_param(): DEBUG: add_param: tag=1eQFK719e4cyS
DEBUG: core [parser/parse_addr_spec.c:893]:
parse_addr_spec(): end of header reached, state=29
DEBUG: sanity [mod_sanity.c:255]: w_sanity_check():
sanity checks result: 1
DEBUG: siputils [checks.c:103]: has_totag(): no





--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
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] DRouting, routeid is not triggered

2014-04-27 Thread Maciej Bylica
Hi Daniel,

It works... thanks alot for your help.

Mac.


2014-04-25 0:48 GMT+02:00 Maciej Bylica mb...@gazeta.pl:

 Hi Daniel,

 I am about to do this on Fri and will give you feedback soon.

 Thanks
 Mac.



  Can you try the patch from commit:

 -
 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3386295d7607a58d37a65b6822bf5f98b3fefa0

 If you are using git, do a git pull, then you can pick the commit in your
 branch (if you are not on master):

 git cherry-pick -x c3386295d7607a58d37a65b6822bf5f98b3fefa0

 Cheers,
 Daniel


 On 24/04/14 17:16, Daniel-Constantin Mierla wrote:

 Hello,

 busy with the release I didn't have time to troubleshoot more yet.

 Cheers,
 Daniel

 On 24/04/14 17:10, Maciej Bylica wrote:

 Hello

  Do you need any other data to verify?

  Thanks.


 2014-04-23 12:11 GMT+02:00 Maciej Bylica mb...@gazeta.pl:

 Hi Daniel,

  Here is debug you requested.

  DEBUG: core [parser/msg_parser.c:623]: parse_msg(): SIP Request:
 DEBUG: core [parser/msg_parser.c:625]: parse_msg(): ámethod: áINVITE
 DEBUG: core [parser/msg_parser.c:627]: parse_msg(): áuri: á á 
 sip:43111223344@10.10.10.5
 DEBUG: core [parser/msg_parser.c:629]: parse_msg(): áversion: SIP/2.0
 DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
 type 235, rport = n/a; state=6
 DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
 type 232, branch = z9hG4bKZZDHrKg1B4Q1c; state=16
 DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header
 reached, state=5
 DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers:
 Via found, flags=2
 DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers:
 this is the first via
 DEBUG: core [receive.c:152]: receive_msg(): After parse_msg...
 DEBUG: core [receive.c:193]: receive_msg(): preparing to run routing
 scripts...
 DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 69
 DEBUG: maxfwd [maxfwd.c:161]: process_maxfwd_header(): value 69 decreased
 to 16
 DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
 header reached, state=10
 DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG:
 get_hdr_field: To [32]; uri=[sip:43111223344@10.10.10.5]
 DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body
 [sip:43111223344@10.10.10.5#015#012]
 DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field:
 cseq CSeq: 58787375 INVITE
 DEBUG: core [parser/msg_parser.c:204]: get_hdr_field(): DEBUG:
 get_hdr_body : content_length=203
 DEBUG: core [parser/msg_parser.c:106]: get_hdr_field(): found end of
 header
 DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG:
 add_param: tag=1eQFK719e4cyS
 DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
 header reached, state=29
 DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result:
 1
 DEBUG: siputils [checks.c:103]: has_totag(): no


___
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] Drouting

2014-04-24 Thread Keith
Hi all,

So I moved away from LCR and dispatcher to use drouting but I can't see how
to use probing. In OpenSIPS I can see this is built into the module but
it's not in Kamailio.

Any ideas how I can get round this? I want to use drouting for all my
routing needs.

Cheers
Keith
___
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] DRouting, routeid is not triggered

2014-04-24 Thread Maciej Bylica
Hello

Do you need any other data to verify?

Thanks.


2014-04-23 12:11 GMT+02:00 Maciej Bylica mb...@gazeta.pl:

 Hi Daniel,

 Here is debug you requested.

 DEBUG: core [parser/msg_parser.c:623]: parse_msg(): SIP Request:
 DEBUG: core [parser/msg_parser.c:625]: parse_msg():  method:  INVITE
 DEBUG: core [parser/msg_parser.c:627]: parse_msg():  uri: 
 sip:43111223344@10.10.10.5
 DEBUG: core [parser/msg_parser.c:629]: parse_msg():  version: SIP/2.0
 DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
 type 235, rport = n/a; state=6
 DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
 type 232, branch = z9hG4bKZZDHrKg1B4Q1c; state=16
 DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header
 reached, state=5
 DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers:
 Via found, flags=2
 DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers:
 this is the first via
 DEBUG: core [receive.c:152]: receive_msg(): After parse_msg...
 DEBUG: core [receive.c:193]: receive_msg(): preparing to run routing
 scripts...
 DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 69
 DEBUG: maxfwd [maxfwd.c:161]: process_maxfwd_header(): value 69 decreased
 to 16
 DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
 header reached, state=10
 DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG:
 get_hdr_field: To [32]; uri=[sip:43111223344@10.10.10.5]
 DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [
 sip:43111223344@10.10.10.5#015#012]
 DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field:
 cseq CSeq: 58787375 INVITE
 DEBUG: core [parser/msg_parser.c:204]: get_hdr_field(): DEBUG:
 get_hdr_body : content_length=203
 DEBUG: core [parser/msg_parser.c:106]: get_hdr_field(): found end of
 header
 DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG:
 add_param: tag=1eQFK719e4cyS
 DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
 header reached, state=29
 DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1
 DEBUG: siputils [checks.c:103]: has_totag(): no totag
 DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1
 global id=0 T start=0x
 DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start
 searching: hash=49678, isACK=0
 DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction
 matching failed
 DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request:
 no transaction found
 DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1
 global id=1 T end=(nil)
 DEBUG: core [socket_info.c:583]: grep_sock_info(): grep_sock_info -
 checking if host==us: 12==9  [10.10.10.5] == [127.0.0.1]
 DEBUG: core [socket_info.c:587]: grep_sock_info(): grep_sock_info -
 checking if port 5060 (advertise 0) matches port 5060
 DEBUG: core [socket_info.c:583]: grep_sock_info(): grep_sock_info -
 checking if host==us: 12==12  [10.10.10.5] == [10.10.10.5]
 DEBUG: core [socket_info.c:587]: grep_sock_info(): grep_sock_info -
 checking if port 5060 (advertise 0) matches port 5060
 DEBUG: registrar [lookup.c:158]: lookup(): '43111223344' Not found in
 usrloc
 DEBUG: tm [t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=1 ,
 global msg id=1 , T on entrance=(nil)
 DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start
 searching: hash=49678, isACK=0
 DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction
 matching failed
 DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request:
 no transaction found
 DEBUG: tm [t_hooks.c:374]: run_reqin_callbacks_internal(): DBG:
 trans=0x7f9ae79e2c10, callback type 1, id 0 entered
 DEBUG: tm [t_hooks.c:374]: run_reqin_callbacks_internal(): DBG:
 trans=0x7f9ae79e2c10, callback type 1, id 0 entered
 DEBUG: core [md5utils.c:67]: MD5StringArray(): DEBUG: MD5 calculated:
 60b78f5b572d3477887c1e8305c94b0a
 DEBUG: drouting [drouting.c:720]: do_routing(): using dr group 10
 DEBUG: drouting [prefix_tree.c:87]: internal_check_rt(): found rgid 10
 (rule list 0x7f9ae79e2a58)
 DEBUG: drouting [drouting.c:895]: do_routing(): setting attr [] as for ruri
 DEBUG: drouting [drouting.c:912]: do_routing(): setting the gw [0] as ruri
 sip:43111223344@10.10.10.9
 DEBUG: tm [t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=1 ,
 global msg id=1 , T on entrance=0x7f9ae79e2c10
 DEBUG: tm [t_lookup.c:1378]: t_newtran(): DEBUG: t_newtran: transaction
 already in process 0x7f9ae79e2c10
 DEBUG: tm [t_funcs.c:347]: t_relay_to(): SER: new INVITE
 DEBUG: core [msg_translator.c:204]: check_via_address():
 check_via_address(10.10.5.5, 10.10.5.5, 0)
 DEBUG: core [mem/shm_mem.c:111]: _shm_resize(): WARNING:vqm_resize:
 resize(0) called
 DEBUG: tm [t_reply.c:728]: _reply_light(): DEBUG: reply sent out.
 buf=0x7f9afe08a608: SIP/2.0 100 trying -..., shmem=0x7f9ae79e5860: SIP/2.0
 100 trying -
 

Re: [SR-Users] DRouting, routeid is not triggered

2014-04-23 Thread Maciej Bylica
Hi Daniel,

Here is debug you requested.

DEBUG: core [parser/msg_parser.c:623]: parse_msg(): SIP Request:
DEBUG: core [parser/msg_parser.c:625]: parse_msg():  method:  INVITE
DEBUG: core [parser/msg_parser.c:627]: parse_msg():  uri: 
sip:43111223344@10.10.10.5
DEBUG: core [parser/msg_parser.c:629]: parse_msg():  version: SIP/2.0
DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
type 235, rport = n/a; state=6
DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param
type 232, branch = z9hG4bKZZDHrKg1B4Q1c; state=16
DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header
reached, state=5
DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers:
Via found, flags=2
DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers:
this is the first via
DEBUG: core [receive.c:152]: receive_msg(): After parse_msg...
DEBUG: core [receive.c:193]: receive_msg(): preparing to run routing
scripts...
DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 69
DEBUG: maxfwd [maxfwd.c:161]: process_maxfwd_header(): value 69 decreased
to 16
DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
header reached, state=10
DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG:
get_hdr_field: To [32]; uri=[sip:43111223344@10.10.10.5]
DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [
sip:43111223344@10.10.10.5#015#012]
DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field:
cseq CSeq: 58787375 INVITE
DEBUG: core [parser/msg_parser.c:204]: get_hdr_field(): DEBUG:
get_hdr_body : content_length=203
DEBUG: core [parser/msg_parser.c:106]: get_hdr_field(): found end of
header
DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG:
add_param: tag=1eQFK719e4cyS
DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of
header reached, state=29
DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1
DEBUG: siputils [checks.c:103]: has_totag(): no totag
DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1
global id=0 T start=0x
DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start
searching: hash=49678, isACK=0
DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction
matching failed
DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request: no
transaction found
DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1
global id=1 T end=(nil)
DEBUG: core [socket_info.c:583]: grep_sock_info(): grep_sock_info -
checking if host==us: 12==9  [10.10.10.5] == [127.0.0.1]
DEBUG: core [socket_info.c:587]: grep_sock_info(): grep_sock_info -
checking if port 5060 (advertise 0) matches port 5060
DEBUG: core [socket_info.c:583]: grep_sock_info(): grep_sock_info -
checking if host==us: 12==12  [10.10.10.5] == [10.10.10.5]
DEBUG: core [socket_info.c:587]: grep_sock_info(): grep_sock_info -
checking if port 5060 (advertise 0) matches port 5060
DEBUG: registrar [lookup.c:158]: lookup(): '43111223344' Not found in usrloc
DEBUG: tm [t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=1 ,
global msg id=1 , T on entrance=(nil)
DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start
searching: hash=49678, isACK=0
DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction
matching failed
DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request: no
transaction found
DEBUG: tm [t_hooks.c:374]: run_reqin_callbacks_internal(): DBG:
trans=0x7f9ae79e2c10, callback type 1, id 0 entered
DEBUG: tm [t_hooks.c:374]: run_reqin_callbacks_internal(): DBG:
trans=0x7f9ae79e2c10, callback type 1, id 0 entered
DEBUG: core [md5utils.c:67]: MD5StringArray(): DEBUG: MD5 calculated:
60b78f5b572d3477887c1e8305c94b0a
DEBUG: drouting [drouting.c:720]: do_routing(): using dr group 10
DEBUG: drouting [prefix_tree.c:87]: internal_check_rt(): found rgid 10
(rule list 0x7f9ae79e2a58)
DEBUG: drouting [drouting.c:895]: do_routing(): setting attr [] as for ruri
DEBUG: drouting [drouting.c:912]: do_routing(): setting the gw [0] as ruri 
sip:43111223344@10.10.10.9
DEBUG: tm [t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=1 ,
global msg id=1 , T on entrance=0x7f9ae79e2c10
DEBUG: tm [t_lookup.c:1378]: t_newtran(): DEBUG: t_newtran: transaction
already in process 0x7f9ae79e2c10
DEBUG: tm [t_funcs.c:347]: t_relay_to(): SER: new INVITE
DEBUG: core [msg_translator.c:204]: check_via_address():
check_via_address(10.10.5.5, 10.10.5.5, 0)
DEBUG: core [mem/shm_mem.c:111]: _shm_resize(): WARNING:vqm_resize:
resize(0) called
DEBUG: tm [t_reply.c:728]: _reply_light(): DEBUG: reply sent out.
buf=0x7f9afe08a608: SIP/2.0 100 trying -..., shmem=0x7f9ae79e5860: SIP/2.0
100 trying -
DEBUG: tm [t_reply.c:738]: _reply_light(): DEBUG: _reply_light: finished
DEBUG: script: new branch [0] to sip:43111223344@10.10.10.9
DEBUG: core [msg_translator.c:204]: check_via_address():

Re: [SR-Users] Drouting

2014-04-22 Thread Daniel-Constantin Mierla

Hello,

On 22/04/14 18:26, Keith wrote:

Hi,

I am trying to use the drouting module and was wondering if there is a 
wildcard character for the dr_groups table for the user?


My situation is that I want to look at any user from a certain IP 
range (i.e. the carrier).


Any ideas?


Do you want to have a list of users routed by a specific group id 
without inserting all associated usernames?


Maybe you can do the mapping of the username drouting group id with 
another module, like mtree where you can match on prefix or htable, 
matching on source ip.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
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] DRouting, routeid is not triggered

2014-04-22 Thread Daniel-Constantin Mierla

Hello,

can you set debug=3 in kamailio.cfg and then send the syslog messages 
for routing a call matching the drouting rule?


Cheers,
Daniel

On 22/04/14 19:12, Maciej Bylica wrote:

Hello,

I am working on version: kamailio 4.1.2 (x86_64/linux) and heaving 
troubles with drouting module.
The problem i am facing is that kamailio cannot enter routeid that is 
provided inside dr_rule table.


My last try was to use standard script file with placing following 
data before t_relay

if (!do_routing(10)) {
sl_send_reply(403, No route for You);
exit;
}

additionaly i have added route definition
route[1] {
xlog(L_INFO,[INFO] Default route --- fn-$fn, fu-$fu, 
fU-$fU, ru-$ru, rU-$rU, sp-$sp, si-$si, tu-$tu, tU-$tU);

uac_replace_from(sip:$fU@10.10.10.5 mailto:fU@10.10.10.5);

}

My DB contains following data:
++-++-+--+-++--+
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | 
description  |

++-++-+--+-++--+
|  1 | 10  | 43 | |0 | 1   | 1  | test 
rule |

++-++-+--+-++--+

+--+--+---+---++---+-+
| gwid | type | address   | strip | pri_prefix | attrs | description |
+--+--+---+---++---+-+
|1 |   10 | 10.10.10.9 | 0 | NULL   | NULL  | FirstGW|
+--+--+---+---++---+-+

The result is that script is omitting route[1] without any purpose 
(xlog is not shown, $fU is not modified).


Could somebody help me to understand whats going on?

Thanks in advanced,
Mac


___
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


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
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] DROUTING nub question

2012-08-28 Thread Daniel-Constantin Mierla

Hello,

this could be also an workaround for adding some prefix based on length.

But also the length can be used, it should work like:

$rU =  + $(rU{s.len}) + $rU;

(note the empty string) or

pv_printf($rU, $(rU{s.len})$rU);

Cheers,
Daniel


On 8/28/12 7:25 AM, Javi Gallart wrote:

Hi

maybe this would work. You have a mask like  (you choose 
the max length and the content). From the mask you extract as many 
digits as the length of your number with {s.substr,offset,length}, 
being length $(rU{s.len}}. Then you prepend the result to you $rU.


Hope it helps


Javi

On 08/28/2012 02:34 AM, Luis Fernando Urrea wrote:
I see there is a transformation to return the string value of an 
integer but I can't seem to find the opposite one.


{s.int http://s.int}
Return integer value of a string-represented number

On Mon, Aug 27, 2012 at 6:22 PM, Luis Fernando Urrea 
lfur...@simplecs.net mailto:lfur...@simplecs.net wrote:


Thanks Daniel,

That got me started, however, it seems that the return value
from $(rU{s.len}) is actually an integer and therefore could not
be concatenated to $rU string ?

4(18194) ERROR: pv [pv_core.c:1798]: str value required to set
R-URI user
14(18194) ERROR: core [lvalue.c:354]: setting pvar failed
14(18194) ERROR: core [lvalue.c:407]: assignment failed at pos:
(906,8-906,25)
14(18194) ERROR: *** cfgtrace:
c=[/usr/local/etc/kamailio/kamailio.cfg] l=907 a=26 n=xlog
14(18194) ERROR: script: rU is now 8287825573

On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,

one solution is doing following trick:

- get the length of the dialed number via transformation and
prefix it to the number

$rU = $(rU{s.len}) + $rU;

- in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
- for drouting gateways set strip to 1, so the first digit
(the length) is removed before forwarding

Cheers,
Daniel


On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

Yes thank you Daniel,

On my setup I terminate local calls using colocated TDM
equipment, these calls are 8 digit numbers that start with
2,4,6,7 and 8

Then I use a FreeSWITCH box as a gateway for US and
international calls, so I was hoping I could somehow route
based on numbers of digits.

I hope that is clear enough.

Regards,

Luis

On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,


On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

I haven't been able to find the answer in the
documentation.

It seems DROUTING does not take regex in the dr_rules
table to match routable numbers, are there any kind
of wilcards that could be used.

How does one specify different rules for 8 digit
numbers and 10 digit numbers.


drouting uses longest prefix matching to select the rule.

Do you have rules only on length or also on prefix? If
you provide a bit more details about what routing rules
you are looking for, we may be able to provide hints
about how to implement in the config file.

Cheers,
Daniel

-- Daniel-Constantin Mierla - 
http://www.asipto.com

http://twitter.com/#!/miconda
http://twitter.com/#%21/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
http://asipto.com/u/kat




-- O: 2248-2483
C: 6040-3624




-- Daniel-Constantin Mierla -http://www.asipto.com
http://twitter.com/#!/miconda 
http://twitter.com/#%21/miconda -http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 
-http://asipto.com/u/kat





-- O: 2248-2483
C: 6040-3624





--
O: 2248-2483
C: 6040-3624




___
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


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat


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

Re: [SR-Users] DROUTING nub question

2012-08-27 Thread Daniel-Constantin Mierla

Hello,

On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

I haven't been able to find the answer in the documentation.

It seems DROUTING does not take regex in the dr_rules table to match 
routable numbers, are there any kind of wilcards that could be used.


How does one specify different rules for 8 digit numbers and 10 digit 
numbers.




drouting uses longest prefix matching to select the rule.

Do you have rules only on length or also on prefix? If you provide a bit 
more details about what routing rules you are looking for, we may be 
able to provide hints about how to implement in the config file.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat


___
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] DROUTING nub question

2012-08-27 Thread Luis Fernando Urrea
Yes thank you Daniel,

On my setup I terminate local calls using colocated TDM equipment, these
calls are 8 digit numbers that start with 2,4,6,7 and 8

Then I use a FreeSWITCH box as a gateway for US and international calls, so
I was hoping I could somehow route based on numbers of digits.

I hope that is clear enough.

Regards,

Luis

On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla mico...@gmail.com
 wrote:

 Hello,


 On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

 I haven't been able to find the answer in the documentation.

 It seems DROUTING does not take regex in the dr_rules table to match
 routable numbers, are there any kind of wilcards that could be used.

 How does one specify different rules for 8 digit numbers and 10 digit
 numbers.


  drouting uses longest prefix matching to select the rule.

 Do you have rules only on length or also on prefix? If you provide a bit
 more details about what routing rules you are looking for, we may be able
 to provide hints about how to implement in the config file.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda
 Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
 http://asipto.com/u/kat




-- 
O: 2248-2483
C: 6040-3624
___
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] DROUTING nub question

2012-08-27 Thread Daniel-Constantin Mierla

Hello,

one solution is doing following trick:

- get the length of the dialed number via transformation and prefix it 
to the number


$rU = $(rU{s.len}) + $rU;

- in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
- for drouting gateways set strip to 1, so the first digit (the length) 
is removed before forwarding


Cheers,
Daniel

On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

Yes thank you Daniel,

On my setup I terminate local calls using colocated TDM equipment, 
these calls are 8 digit numbers that start with 2,4,6,7 and 8


Then I use a FreeSWITCH box as a gateway for US and international 
calls, so I was hoping I could somehow route based on numbers of digits.


I hope that is clear enough.

Regards,

Luis

On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla 
mico...@gmail.com mailto:mico...@gmail.com wrote:


Hello,


On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

I haven't been able to find the answer in the documentation.

It seems DROUTING does not take regex in the dr_rules table to
match routable numbers, are there any kind of wilcards that
could be used.

How does one specify different rules for 8 digit numbers and
10 digit numbers.


drouting uses longest prefix matching to select the rule.

Do you have rules only on length or also on prefix? If you provide
a bit more details about what routing rules you are looking for,
we may be able to provide hints about how to implement in the
config file.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda http://twitter.com/#%21/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
http://asipto.com/u/kat




--
O: 2248-2483
C: 6040-3624




--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat

___
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] DROUTING nub question

2012-08-27 Thread Luis Fernando Urrea
Thanks Daniel,

That got me started, however, it seems that the return  value
from $(rU{s.len}) is actually an integer and therefore could not be
concatenated to $rU string ?

4(18194) ERROR: pv [pv_core.c:1798]: str value required to set R-URI user
14(18194) ERROR: core [lvalue.c:354]: setting pvar failed
14(18194) ERROR: core [lvalue.c:407]: assignment failed at pos:
(906,8-906,25)
14(18194) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=907 a=26 n=xlog
14(18194) ERROR: script: rU is now 8287825573

On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla mico...@gmail.com
 wrote:

  Hello,

 one solution is doing following trick:

 - get the length of the dialed number via transformation and prefix it to
 the number

 $rU = $(rU{s.len}) + $rU;

 - in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
 - for drouting gateways set strip to 1, so the first digit (the length) is
 removed before forwarding

 Cheers,
 Daniel


 On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

 Yes thank you Daniel,

  On my setup I terminate local calls using colocated TDM equipment, these
 calls are 8 digit numbers that start with 2,4,6,7 and 8

  Then I use a FreeSWITCH box as a gateway for US and international calls,
 so I was hoping I could somehow route based on numbers of digits.

  I hope that is clear enough.

  Regards,

  Luis

 On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

 Hello,


 On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

 I haven't been able to find the answer in the documentation.

 It seems DROUTING does not take regex in the dr_rules table to match
 routable numbers, are there any kind of wilcards that could be used.

 How does one specify different rules for 8 digit numbers and 10 digit
 numbers.


  drouting uses longest prefix matching to select the rule.

 Do you have rules only on length or also on prefix? If you provide a bit
 more details about what routing rules you are looking for, we may be able
 to provide hints about how to implement in the config file.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
 http://asipto.com/u/kat




  --
 O: 2248-2483
 C: 6040-3624



 --
 Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda 
 - http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat




-- 
O: 2248-2483
C: 6040-3624
___
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] DROUTING nub question

2012-08-27 Thread Luis Fernando Urrea
I see there is a transformation to return the string value of an integer
but I can't seem to find the opposite one.

{s.int}
Return integer value of a string-represented number

On Mon, Aug 27, 2012 at 6:22 PM, Luis Fernando Urrea
lfur...@simplecs.netwrote:

 Thanks Daniel,

 That got me started, however, it seems that the return  value
 from $(rU{s.len}) is actually an integer and therefore could not be
 concatenated to $rU string ?

 4(18194) ERROR: pv [pv_core.c:1798]: str value required to set R-URI user
 14(18194) ERROR: core [lvalue.c:354]: setting pvar failed
 14(18194) ERROR: core [lvalue.c:407]: assignment failed at pos:
 (906,8-906,25)
 14(18194) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
 l=907 a=26 n=xlog
 14(18194) ERROR: script: rU is now 8287825573

 On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  Hello,

 one solution is doing following trick:

 - get the length of the dialed number via transformation and prefix it to
 the number

 $rU = $(rU{s.len}) + $rU;

 - in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
 - for drouting gateways set strip to 1, so the first digit (the length)
 is removed before forwarding

 Cheers,
 Daniel


 On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

 Yes thank you Daniel,

  On my setup I terminate local calls using colocated TDM equipment,
 these calls are 8 digit numbers that start with 2,4,6,7 and 8

  Then I use a FreeSWITCH box as a gateway for US and international
 calls, so I was hoping I could somehow route based on numbers of digits.

  I hope that is clear enough.

  Regards,

  Luis

 On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

 Hello,


 On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

 I haven't been able to find the answer in the documentation.

 It seems DROUTING does not take regex in the dr_rules table to match
 routable numbers, are there any kind of wilcards that could be used.

 How does one specify different rules for 8 digit numbers and 10 digit
 numbers.


  drouting uses longest prefix matching to select the rule.

 Do you have rules only on length or also on prefix? If you provide a bit
 more details about what routing rules you are looking for, we may be able
 to provide hints about how to implement in the config file.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
 http://asipto.com/u/kat




  --
 O: 2248-2483
 C: 6040-3624



 --
 Daniel-Constantin Mierla - 
 http://www.asipto.comhttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat




 --
 O: 2248-2483
 C: 6040-3624





-- 
O: 2248-2483
C: 6040-3624
___
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] DROUTING nub question

2012-08-27 Thread Javi Gallart

Hi

maybe this would work. You have a mask like  (you choose 
the max length and the content). From the mask you extract as many 
digits as the length of your number with {s.substr,offset,length}, being 
length $(rU{s.len}}. Then you prepend the result to you $rU.


Hope it helps


Javi

On 08/28/2012 02:34 AM, Luis Fernando Urrea wrote:
I see there is a transformation to return the string value of an 
integer but I can't seem to find the opposite one.


{s.int http://s.int}
Return integer value of a string-represented number

On Mon, Aug 27, 2012 at 6:22 PM, Luis Fernando Urrea 
lfur...@simplecs.net mailto:lfur...@simplecs.net wrote:


Thanks Daniel,

That got me started, however, it seems that the return  value
from $(rU{s.len}) is actually an integer and therefore could not
be concatenated to $rU string ?

4(18194) ERROR: pv [pv_core.c:1798]: str value required to set
R-URI user
14(18194) ERROR: core [lvalue.c:354]: setting pvar failed
14(18194) ERROR: core [lvalue.c:407]: assignment failed at pos:
(906,8-906,25)
14(18194) ERROR: *** cfgtrace:
c=[/usr/local/etc/kamailio/kamailio.cfg] l=907 a=26 n=xlog
14(18194) ERROR: script: rU is now 8287825573

On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,

one solution is doing following trick:

- get the length of the dialed number via transformation and
prefix it to the number

$rU = $(rU{s.len}) + $rU;

- in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
- for drouting gateways set strip to 1, so the first digit
(the length) is removed before forwarding

Cheers,
Daniel


On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

Yes thank you Daniel,

On my setup I terminate local calls using colocated TDM
equipment, these calls are 8 digit numbers that start with
2,4,6,7 and 8

Then I use a FreeSWITCH box as a gateway for US and
international calls, so I was hoping I could somehow route
based on numbers of digits.

I hope that is clear enough.

Regards,

Luis

On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,


On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

I haven't been able to find the answer in the
documentation.

It seems DROUTING does not take regex in the dr_rules
table to match routable numbers, are there any kind
of wilcards that could be used.

How does one specify different rules for 8 digit
numbers and 10 digit numbers.


drouting uses longest prefix matching to select the rule.

Do you have rules only on length or also on prefix? If
you provide a bit more details about what routing rules
you are looking for, we may be able to provide hints
about how to implement in the config file.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda
http://twitter.com/#%21/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
http://asipto.com/u/kat




-- 
O: 2248-2483

C: 6040-3624




-- 
Daniel-Constantin Mierla -http://www.asipto.com

http://twitter.com/#!/miconda  http://twitter.com/#%21/miconda  
-http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 
-http://asipto.com/u/kat




-- 
O: 2248-2483

C: 6040-3624





--
O: 2248-2483
C: 6040-3624




___
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] drouting module: can I use non-digit prefix?

2012-06-14 Thread Yufei Tao
Hi Daniel

I've tried the patch on my 3.2.2 and it doesn't crash now!

Thanks!
Yufei

On 13/06/12 10:55, Daniel-Constantin Mierla wrote:
 Hello,

 can you try with the patch from commit:

 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c737ff95bb2e742981d81088169baa60d4605b85


 It is one line of effective code that you have to change. Let me know
 if goes ok now and I will backport to stable branches.

 Cheers,
 Daniel

 On 6/13/12 11:16 AM, Yufei Tao wrote:
 Hi Daniel

 The version is:

 version: kamailio 3.2.2 (i386/linux)
 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,
 DBG_QM_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: unknown
 compiled on 14:19:11 Mar 1 2012 with gcc 4.4.3


 2 core dump files were created from the same crash (when using MI
 command dr_reload to load the dr_rules talbe with non-digit prefix) and
 the following are results for each of them with bt full under gdb:

 
 1. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6130

 Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
 -P /var/run/kamailio/kamailio.'.
 Program terminated with signal 6, Aborted.
 (gdb) bt full
 #0 0x00780422 in __kernel_vsyscall ()
 No symbol table info available.
 #1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
 No symbol table info available.
 #2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
 No symbol table info available.
 #3 0x081779e2 in qm_free (qm=0xa730a000, p=0xa77b4814,
 file=0x74c751 drouting: prefix_tree.c, func=0x74c81d del_tree,
 line=270)
 at mem/q_malloc.c:458
 f = 0xa77b47fc
 size = value optimised out
 #4 0x0074477f in del_tree (t=0xa77b4814) at prefix_tree.c:270
 j = value optimised out
 __FUNCTION__ = del_tree
 #5 0x0074608c in free_rt_data (rt_data=0xa778f2e8, all=1) at
 routing.c:451
 j = value optimised out
 __FUNCTION__ = free_rt_data
 #6 0x0073b025 in dr_exit () at drouting.c:450
 __FUNCTION__ = dr_exit
 #7 0x0812354c in destroy_modules () at sr_module.c:783
 t = value optimised out
 foo = 0xb734cd54
 __FUNCTION__ = destroy_modules
 #8 0x080a3ebc in cleanup (show_status=1) at main.c:536
 memlog = value optimised out
 __FUNCTION__ = cleanup
 #9 0x080a4c28 in shutdown_children (show_status=1, sig=value optimised
 out) at main.c:678
 No locals.
 #10 0x080a5d24 in handle_sigs () at main.c:769
 chld = 0
 chld_status = 134
 memlog = value optimised out
 #11 0x080a70e8 in main_loop () at main.c:1713
 i = 16
 pid = value optimised out
 si = 0x0
 si_desc = udp receiver child=15
 sock=82.219.14.194:5060\000\067\267\003\000\000\000\357\002{\000`\376
 \023\001\001\000\000\000\000\000\000\000\002\000\000\000\357 \002{\000
 \230#$\b\002\000\000\000\070[+\b\v\212濘y\346\277\000\210q
 \246\360\370;\267\004\000\000\000\031%\037\b\001\000\000\000`[+\b\v \212
 濸y, incomplete sequence \346\277
 #12 0x080a8ae7 in main (argc=13, argv=0xbfe67b04) at main.c:2475
 cfg_stream = 0x93a1008
 c = value optimised out
 r = 0
 tmp = 0xbfe68a30 
 tmp_len = 136192016
 port = value optimised out
 proto = value optimised out
 ret = value optimised out
 seed = 2291282674
 rfd = 0
 debug_save = -1075410421
 debug_flag = 276824064
 n_lst = 0xbfe68a0b

 
 2. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6155

 Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
 -P /var/run/kamailio/kamailio.'.
 Program terminated with signal 6, Aborted.
 #0 0x00780422 in __kernel_vsyscall ()
 (gdb) bt full
 #0 0x00780422 in __kernel_vsyscall ()
 No symbol table info available.
 #1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
 No symbol table info available.
 #2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
 No symbol table info available.
 #3 0x081779e2 in qm_free (qm=0xa730a000, p=0x4, file=0x74c751 drouting:
 prefix_tree.c,
 func=0x74c81d del_tree, line=264) at mem/q_malloc.c:458
 f = 0x74dff4
 size = value optimised out
 #4 0x00744706 in del_tree (t=0xa778f130) at prefix_tree.c:264
 j = value optimised out
 __FUNCTION__ = del_tree
 #5 0x0074608c in free_rt_data (rt_data=0xa778f0e4, all=1) at
 routing.c:451
 j = value optimised out
 __FUNCTION__ = free_rt_data
 #6 0x0073b6d2 in dr_reload_data (cmd_tree=0x0, param=0x0) at
 drouting.c:261
 new_data = value optimised out
 old_data = 0x6
 #7 dr_reload_cmd (cmd_tree=0x0, param=0x0) at drouting.c:487
 No locals.
 #8 0x00edc7a2 in run_mi_cmd (fifo_stream=0x93ee330) at
 ../../lib/kmi/mi.h:77
 No locals.
 #9 mi_fifo_server (fifo_stream=0x93ee330) at 

Re: [SR-Users] drouting module: can I use non-digit prefix?

2012-06-14 Thread Daniel-Constantin Mierla

Hello,

On 6/14/12 11:36 AM, Yufei Tao wrote:

Hi Daniel

I've tried the patch on my 3.2.2 and it doesn't crash now!

thanks for feedback -- I backported the patch to 3.3 and 3.2 branches.

Cheers,
Daniel



Thanks!
Yufei

On 13/06/12 10:55, Daniel-Constantin Mierla wrote:

Hello,

can you try with the patch from commit:

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c737ff95bb2e742981d81088169baa60d4605b85


It is one line of effective code that you have to change. Let me know
if goes ok now and I will backport to stable branches.

Cheers,
Daniel

On 6/13/12 11:16 AM, Yufei Tao wrote:

Hi Daniel

The version is:

version: kamailio 3.2.2 (i386/linux)
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,
DBG_QM_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: unknown
compiled on 14:19:11 Mar 1 2012 with gcc 4.4.3


2 core dump files were created from the same crash (when using MI
command dr_reload to load the dr_rules talbe with non-digit prefix) and
the following are results for each of them with bt full under gdb:


1. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6130

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0xa77b4814,
file=0x74c751 drouting: prefix_tree.c, func=0x74c81d del_tree,
line=270)
at mem/q_malloc.c:458
f = 0xa77b47fc
size = value optimised out
#4 0x0074477f in del_tree (t=0xa77b4814) at prefix_tree.c:270
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f2e8, all=1) at
routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b025 in dr_exit () at drouting.c:450
__FUNCTION__ = dr_exit
#7 0x0812354c in destroy_modules () at sr_module.c:783
t = value optimised out
foo = 0xb734cd54
__FUNCTION__ = destroy_modules
#8 0x080a3ebc in cleanup (show_status=1) at main.c:536
memlog = value optimised out
__FUNCTION__ = cleanup
#9 0x080a4c28 in shutdown_children (show_status=1, sig=value optimised
out) at main.c:678
No locals.
#10 0x080a5d24 in handle_sigs () at main.c:769
chld = 0
chld_status = 134
memlog = value optimised out
#11 0x080a70e8 in main_loop () at main.c:1713
i = 16
pid = value optimised out
si = 0x0
si_desc = udp receiver child=15
sock=82.219.14.194:5060\000\067\267\003\000\000\000\357\002{\000`\376
\023\001\001\000\000\000\000\000\000\000\002\000\000\000\357 \002{\000
\230#$\b\002\000\000\000\070[+\b\v\212濘y\346\277\000\210q
\246\360\370;\267\004\000\000\000\031%\037\b\001\000\000\000`[+\b\v \212
濸y, incomplete sequence \346\277
#12 0x080a8ae7 in main (argc=13, argv=0xbfe67b04) at main.c:2475
cfg_stream = 0x93a1008
c = value optimised out
r = 0
tmp = 0xbfe68a30 
tmp_len = 136192016
port = value optimised out
proto = value optimised out
ret = value optimised out
seed = 2291282674
rfd = 0
debug_save = -1075410421
debug_flag = 276824064
n_lst = 0xbfe68a0b


2. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6155

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
#0 0x00780422 in __kernel_vsyscall ()
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0x4, file=0x74c751 drouting:
prefix_tree.c,
func=0x74c81d del_tree, line=264) at mem/q_malloc.c:458
f = 0x74dff4
size = value optimised out
#4 0x00744706 in del_tree (t=0xa778f130) at prefix_tree.c:264
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f0e4, all=1) at
routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b6d2 in dr_reload_data (cmd_tree=0x0, param=0x0) at
drouting.c:261
new_data = value optimised out
old_data = 0x6
#7 dr_reload_cmd (cmd_tree=0x0, param=0x0) at drouting.c:487
No locals.
#8 0x00edc7a2 in run_mi_cmd (fifo_stream=0x93ee330) at
../../lib/kmi/mi.h:77
No locals.
#9 mi_fifo_server 

Re: [SR-Users] drouting module: can I use non-digit prefix?

2012-06-13 Thread Daniel-Constantin Mierla

Hello,

this situation seems to be caused by the fact there is no valid routing 
rule at all.


Can you get the backtrace? First do:

ulimit -c unlimited

Then run again an a corefile should be generated (in / or in working 
directory) - use gdb to get the backtrace:


gdb /path/to/kamailio /path/to/corefile

bt full

Send the output here.

Also send 'kamailio -V' to know exactly your version.

Cheers,
Daniel


On 6/12/12 4:33 PM, Yufei Tao wrote:

Hi Daniel

Thanks for the reply!

I tried it again and the log seems to suggest it crashed when loading
the dr_rules table that contains non-digit prefix, e.g. prefix bing 'abc.':

1. First crash when doing MI command dr_reload:

Jun 12 15:19:07 myserver2 /usr/sbin/kamailio[2293]: INFO: drouting
[drouting.c:476]: dr_reload MI command received!
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:251]: failed to add prefix route
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:555]: failed to add rule id 1 - skipping
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: WARNING: drouting
[dr_load.c:577]: no valid routing rules - discarding all destinations
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: : core
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: core
[main.c:751]: child process 2293 exited by a signal 11
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: core
[main.c:754]: core was not generated
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: INFO: core
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: INFO: core
[main.c:817]: INFO: signal 15 received
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2356]: INFO: core
[main.c:817]: INFO: signal 15 received
... ...


2. And the second crash on start up (with the bad dr_rules prefix):


Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: WARNING: drouting
[dr_load.c:577]: no valid routing rules - discarding all destinations
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: : core
[mem/q_malloc.c:440]: BUG: qm_free: bad pointer 0x4 (out of memory
block!) - aborting
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: : core
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: core
[main.c:751]: child process 5352 exited by a signal 6
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: core
[tcp_main.c:3555]: DBG: handle_ser_child: dead child 19, pid 5352
(shutting down?)
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: core
[main.c:754]: core was not generated
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: core
[io_wait.h:617]: DBG: io_watch_del (0x825cec0, 30, -1, 0x0) fd_no=65 called
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: INFO: core
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5392]: INFO: core
[main.c:817]: INFO: signal 15 received
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5391]: INFO: core
[main.c:817]: INFO: signal 15 received
... ...


Thanks very much!

Yufei

On 12/06/12 10:53, Daniel-Constantin Mierla wrote:

Hello,

On 6/1/12 4:57 PM, Yufei Tao wrote:

Hi

I'm using drouting module and seems that it only allows digit-only
prefixes. Also all the number of digits to be stripped ('strip' defined
in dr_gateways) must be all digits too. When I used non-digits in these,
Kamailio crashed.

Is there any way in drouting module that I can use prefixes with
alphabet and dots, e.g. gateway1.? Thanks very much!

iirc, drouting accepts only digit based prefixes. Alphanumeric keys
are not suitable for tree structures, like used by drouting, because
there will be soo many children for each node that will use lot of
memory.

Anyhow, it should not crash, do you have a backtrace or a log for it?

Maybe you can combine several modules to get you go, if you want to
use drouting. Like using mtree (it has a way to define the characters
allowed in the prefixes -- still not suitable for all the characters)
or htable to map your alphanumeric key to a digit only key. Then you
can use the result with drouting.


Cheers,
Daniel


Yufei
--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and
intended solely for the addressee. If you are not the intended
addressee please notify the sender by return and delete the message.

You must not disclose, forward or copy this E-mail or attachments to
any third party without the prior consent of the sender.

Red Embedded Design, Company Number 06688253 Registered in England:
The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ

___
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

--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and 

Re: [SR-Users] drouting module: can I use non-digit prefix?

2012-06-13 Thread Yufei Tao
Hi Daniel

The version is:

version: kamailio 3.2.2 (i386/linux)
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,
DBG_QM_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: unknown
compiled on 14:19:11 Mar 1 2012 with gcc 4.4.3


2 core dump files were created from the same crash (when using MI
command dr_reload to load the dr_rules talbe with non-digit prefix) and
the following are results for each of them with bt full under gdb:


1. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6130

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0xa77b4814,
file=0x74c751 drouting: prefix_tree.c, func=0x74c81d del_tree, line=270)
at mem/q_malloc.c:458
f = 0xa77b47fc
size = value optimised out
#4 0x0074477f in del_tree (t=0xa77b4814) at prefix_tree.c:270
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f2e8, all=1) at routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b025 in dr_exit () at drouting.c:450
__FUNCTION__ = dr_exit
#7 0x0812354c in destroy_modules () at sr_module.c:783
t = value optimised out
foo = 0xb734cd54
__FUNCTION__ = destroy_modules
#8 0x080a3ebc in cleanup (show_status=1) at main.c:536
memlog = value optimised out
__FUNCTION__ = cleanup
#9 0x080a4c28 in shutdown_children (show_status=1, sig=value optimised
out) at main.c:678
No locals.
#10 0x080a5d24 in handle_sigs () at main.c:769
chld = 0
chld_status = 134
memlog = value optimised out
#11 0x080a70e8 in main_loop () at main.c:1713
i = 16
pid = value optimised out
si = 0x0
si_desc = udp receiver child=15
sock=82.219.14.194:5060\000\067\267\003\000\000\000\357\002{\000`\376
\023\001\001\000\000\000\000\000\000\000\002\000\000\000\357 \002{\000
\230#$\b\002\000\000\000\070[+\b\v\212濘y\346\277\000\210q
\246\360\370;\267\004\000\000\000\031%\037\b\001\000\000\000`[+\b\v \212
濸y, incomplete sequence \346\277
#12 0x080a8ae7 in main (argc=13, argv=0xbfe67b04) at main.c:2475
cfg_stream = 0x93a1008
c = value optimised out
r = 0
tmp = 0xbfe68a30 
tmp_len = 136192016
port = value optimised out
proto = value optimised out
ret = value optimised out
seed = 2291282674
rfd = 0
debug_save = -1075410421
debug_flag = 276824064
n_lst = 0xbfe68a0b


2. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6155

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
#0 0x00780422 in __kernel_vsyscall ()
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0x4, file=0x74c751 drouting:
prefix_tree.c,
func=0x74c81d del_tree, line=264) at mem/q_malloc.c:458
f = 0x74dff4
size = value optimised out
#4 0x00744706 in del_tree (t=0xa778f130) at prefix_tree.c:264
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f0e4, all=1) at routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b6d2 in dr_reload_data (cmd_tree=0x0, param=0x0) at drouting.c:261
new_data = value optimised out
old_data = 0x6
#7 dr_reload_cmd (cmd_tree=0x0, param=0x0) at drouting.c:487
No locals.
#8 0x00edc7a2 in run_mi_cmd (fifo_stream=0x93ee330) at ../../lib/kmi/mi.h:77
No locals.
#9 mi_fifo_server (fifo_stream=0x93ee330) at fifo_fnc.c:509
mi_cmd = 0x0
mi_rpl = value optimised out
hdl = 0x0
line_len = 1
command = 0xb73eb1ed 
file = value optimised out
f = 0x93d1f44
reply_stream = 0x93f5100
#10 0x00ede820 in fifo_process (rank=1) at mi_fifo.c:247
fifo_stream = 0x93ee330
#11 0x00edeb88 in mi_child_init (rank=0) at mi_fifo.c:211
pid = value optimised out
#12 0x0812294f in init_mod_child (m=0xb734572c, rank=0) at sr_module.c:886
No locals.
#13 0x081228c0 in init_mod_child (m=0xb73458a8, rank=0) at sr_module.c:883
No locals.
#14 0x081228c0 in init_mod_child (m=0xb7345d2c, rank=0) at sr_module.c:883
No locals.
#15 0x081228c0 

Re: [SR-Users] drouting module: can I use non-digit prefix?

2012-06-13 Thread Daniel-Constantin Mierla

Hello,

can you try with the patch from commit:

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c737ff95bb2e742981d81088169baa60d4605b85

It is one line of effective code that you have to change. Let me know if 
goes ok now and I will backport to stable branches.


Cheers,
Daniel

On 6/13/12 11:16 AM, Yufei Tao wrote:

Hi Daniel

The version is:

version: kamailio 3.2.2 (i386/linux)
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,
DBG_QM_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: unknown
compiled on 14:19:11 Mar 1 2012 with gcc 4.4.3


2 core dump files were created from the same crash (when using MI
command dr_reload to load the dr_rules talbe with non-digit prefix) and
the following are results for each of them with bt full under gdb:


1. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6130

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0xa77b4814,
file=0x74c751 drouting: prefix_tree.c, func=0x74c81d del_tree, line=270)
at mem/q_malloc.c:458
f = 0xa77b47fc
size = value optimised out
#4 0x0074477f in del_tree (t=0xa77b4814) at prefix_tree.c:270
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f2e8, all=1) at routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b025 in dr_exit () at drouting.c:450
__FUNCTION__ = dr_exit
#7 0x0812354c in destroy_modules () at sr_module.c:783
t = value optimised out
foo = 0xb734cd54
__FUNCTION__ = destroy_modules
#8 0x080a3ebc in cleanup (show_status=1) at main.c:536
memlog = value optimised out
__FUNCTION__ = cleanup
#9 0x080a4c28 in shutdown_children (show_status=1, sig=value optimised
out) at main.c:678
No locals.
#10 0x080a5d24 in handle_sigs () at main.c:769
chld = 0
chld_status = 134
memlog = value optimised out
#11 0x080a70e8 in main_loop () at main.c:1713
i = 16
pid = value optimised out
si = 0x0
si_desc = udp receiver child=15
sock=82.219.14.194:5060\000\067\267\003\000\000\000\357\002{\000`\376
\023\001\001\000\000\000\000\000\000\000\002\000\000\000\357 \002{\000
\230#$\b\002\000\000\000\070[+\b\v\212濘y\346\277\000\210q
\246\360\370;\267\004\000\000\000\031%\037\b\001\000\000\000`[+\b\v \212
濸y, incomplete sequence \346\277
#12 0x080a8ae7 in main (argc=13, argv=0xbfe67b04) at main.c:2475
cfg_stream = 0x93a1008
c = value optimised out
r = 0
tmp = 0xbfe68a30 
tmp_len = 136192016
port = value optimised out
proto = value optimised out
ret = value optimised out
seed = 2291282674
rfd = 0
debug_save = -1075410421
debug_flag = 276824064
n_lst = 0xbfe68a0b


2. sudo gdb /usr/sbin/kamailio /tmp/corefiles/core.kamailio.sig6.6155

Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg
-P /var/run/kamailio/kamailio.'.
Program terminated with signal 6, Aborted.
#0 0x00780422 in __kernel_vsyscall ()
(gdb) bt full
#0 0x00780422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0013a651 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x0013da82 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0x081779e2 in qm_free (qm=0xa730a000, p=0x4, file=0x74c751 drouting:
prefix_tree.c,
func=0x74c81d del_tree, line=264) at mem/q_malloc.c:458
f = 0x74dff4
size = value optimised out
#4 0x00744706 in del_tree (t=0xa778f130) at prefix_tree.c:264
j = value optimised out
__FUNCTION__ = del_tree
#5 0x0074608c in free_rt_data (rt_data=0xa778f0e4, all=1) at routing.c:451
j = value optimised out
__FUNCTION__ = free_rt_data
#6 0x0073b6d2 in dr_reload_data (cmd_tree=0x0, param=0x0) at drouting.c:261
new_data = value optimised out
old_data = 0x6
#7 dr_reload_cmd (cmd_tree=0x0, param=0x0) at drouting.c:487
No locals.
#8 0x00edc7a2 in run_mi_cmd (fifo_stream=0x93ee330) at ../../lib/kmi/mi.h:77
No locals.
#9 mi_fifo_server (fifo_stream=0x93ee330) at fifo_fnc.c:509
mi_cmd = 0x0
mi_rpl = value optimised out
hdl = 0x0
line_len = 1
command = 0xb73eb1ed 
file = value optimised out
f = 0x93d1f44
reply_stream = 0x93f5100
#10 0x00ede820 in fifo_process (rank=1) at mi_fifo.c:247
fifo_stream = 0x93ee330
#11 

Re: [SR-Users] drouting module: can I use non-digit prefix?

2012-06-12 Thread Daniel-Constantin Mierla

Hello,

On 6/1/12 4:57 PM, Yufei Tao wrote:

Hi

I'm using drouting module and seems that it only allows digit-only
prefixes. Also all the number of digits to be stripped ('strip' defined
in dr_gateways) must be all digits too. When I used non-digits in these,
Kamailio crashed.

Is there any way in drouting module that I can use prefixes with
alphabet and dots, e.g. gateway1.? Thanks very much!
iirc, drouting accepts only digit based prefixes. Alphanumeric keys are 
not suitable for tree structures, like used by drouting, because there 
will be soo many children for each node that will use lot of memory.


Anyhow, it should not crash, do you have a backtrace or a log for it?

Maybe you can combine several modules to get you go, if you want to use 
drouting. Like using mtree (it has a way to define the characters 
allowed in the prefixes -- still not suitable for all the characters) or 
htable to map your alphanumeric key to a digit only key. Then you can 
use the result with drouting.



Cheers,
Daniel



Yufei
--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and intended 
solely for the addressee. If you are not the intended addressee please notify 
the sender by return and delete the message.

You must not disclose, forward or copy this E-mail or attachments to any third 
party without the prior consent of the sender.

Red Embedded Design, Company Number 06688253 Registered in England: The 
Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ

___
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


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - 
http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - 
http://asipto.com/u/kpw




___
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] drouting module: can I use non-digit prefix?

2012-06-12 Thread Yufei Tao
Hi Daniel

Thanks for the reply!

I tried it again and the log seems to suggest it crashed when loading
the dr_rules table that contains non-digit prefix, e.g. prefix bing 'abc.':

1. First crash when doing MI command dr_reload:

Jun 12 15:19:07 myserver2 /usr/sbin/kamailio[2293]: INFO: drouting
[drouting.c:476]: dr_reload MI command received!
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:251]: failed to add prefix route
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:555]: failed to add rule id 1 - skipping
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: WARNING: drouting
[dr_load.c:577]: no valid routing rules - discarding all destinations
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: : core
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: core
[main.c:751]: child process 2293 exited by a signal 11
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: core
[main.c:754]: core was not generated
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: INFO: core
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: INFO: core
[main.c:817]: INFO: signal 15 received
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2356]: INFO: core
[main.c:817]: INFO: signal 15 received
... ...


2. And the second crash on start up (with the bad dr_rules prefix):


Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: WARNING: drouting
[dr_load.c:577]: no valid routing rules - discarding all destinations
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: : core
[mem/q_malloc.c:440]: BUG: qm_free: bad pointer 0x4 (out of memory
block!) - aborting
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: : core
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: core
[main.c:751]: child process 5352 exited by a signal 6
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: core
[tcp_main.c:3555]: DBG: handle_ser_child: dead child 19, pid 5352
(shutting down?)
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: core
[main.c:754]: core was not generated
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: core
[io_wait.h:617]: DBG: io_watch_del (0x825cec0, 30, -1, 0x0) fd_no=65 called
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: INFO: core
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5392]: INFO: core
[main.c:817]: INFO: signal 15 received
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5391]: INFO: core
[main.c:817]: INFO: signal 15 received
... ...


Thanks very much!

Yufei

On 12/06/12 10:53, Daniel-Constantin Mierla wrote:
 Hello,

 On 6/1/12 4:57 PM, Yufei Tao wrote:
 Hi

 I'm using drouting module and seems that it only allows digit-only
 prefixes. Also all the number of digits to be stripped ('strip' defined
 in dr_gateways) must be all digits too. When I used non-digits in these,
 Kamailio crashed.

 Is there any way in drouting module that I can use prefixes with
 alphabet and dots, e.g. gateway1.? Thanks very much!
 iirc, drouting accepts only digit based prefixes. Alphanumeric keys
 are not suitable for tree structures, like used by drouting, because
 there will be soo many children for each node that will use lot of
 memory.

 Anyhow, it should not crash, do you have a backtrace or a log for it?

 Maybe you can combine several modules to get you go, if you want to
 use drouting. Like using mtree (it has a way to define the characters
 allowed in the prefixes -- still not suitable for all the characters)
 or htable to map your alphanumeric key to a digit only key. Then you
 can use the result with drouting.


 Cheers,
 Daniel


 Yufei
 --
 Yufei Tao
 Red Embedded

 This E-mail and any attachments hereto are strictly confidential and
 intended solely for the addressee. If you are not the intended
 addressee please notify the sender by return and delete the message.

 You must not disclose, forward or copy this E-mail or attachments to
 any third party without the prior consent of the sender.

 Red Embedded Design, Company Number 06688253 Registered in England:
 The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ

 ___
 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

--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and intended 
solely for the addressee. If you are not the intended addressee please notify 
the sender by return and delete the message.

You must not disclose, forward or copy this E-mail or attachments to any third 
party without the prior consent of the sender.

Red Embedded Design, Company Number 06688253 Registered in England: The 
Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ


Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-03-19 Thread Fatima Chahrour~Vanrise Support
Hi,

 

Thanks for the reply, it works with no crash now and I can now understand
the reason behind the crash; 

 

Note: After removing 4 from dr_rule table no more crash occurs, yet the call
is still ending with Request Timeout. Shall I add this issue in a new post
or can I continue here? Because I still need help to know why is my call not
successful.

 

Thanks in advance,

F.Chahrour

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Friday, March 16, 2012 7:12 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Fatima Chahrour~Vanrise Support
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

Hello,

finally I had the time to look at the documents you sent. The problem is
that you have recursive execution of do_routing(0) from do_routing(0).

This happens because you have route[4] like:

route[4] {
  if (!do_routing(0)) {
send_reply(503, No Rules matching the URI);
exit;
  }
}

route[4] is executed from request_route. But then, in database dr_routes
table, for the prefix 961 you are using for testing, the routeid value is 4,
meaning that, when do_routing(0) is matching will execute the route[4]
from the config. Which again is calling do_routing(0) that matches again
and executes again route[4] and so on ...

At some point the OS kills kamailio, resulting in a crash reported at random
lines of code -- these were misleading so far, because at some of them was
an impossible code fault crash condition.

So, remove 4 from routeid column in the database dr_rules table.

Cheers,
Daniel

On 3/2/12 9:57 AM, Daniel-Constantin Mierla wrote: 

By the way, in the config you sent in the very first email, you do
do_routing(0), but I could not see rules with id 0. Can you add such rules
or use the id from the rules? Just to see if this is related or not, it
should not crash even if the id is missing.

Daniel

On 3/1/12 3:52 PM, Fatima Chahrour~Vanrise Support wrote: 

Hello,

 

Full version output is:

 

debian:/usr/local/etc/kamailio# /usr/local/sbin/kamailio -V

version: kamailio 3.2.2 (i386/linux) 5fc59c

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,
DBG_QM_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: 5fc59c 

compiled on 06:46:26 Feb 28 2012 with gcc 4.3.2

 

Thanks in advance.

F.Chahrour

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 01, 2012 3:44 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Fatima Chahrour~Vanrise Support
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

Hello,

can you send also the full version - -the output of
'/usr/local/sbin/kamailio -V'

Based on the backtrace, I could not match a valid line in the source code
that could cause a crash.

Also, you haven't sent the output of 'bt full' -- you sent only from 'bt',
first part just limited number of printed line. Do 'bt full' in gdb and sent
the output.

Cheers,
Daniel

On 3/1/12 11:02 AM, Fatima Chahrour~Vanrise Support wrote: 

Hi Daniel,

 

Please find output attached.

Waiting your feedback.

 

Thanks,

F.Chahrour

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 01, 2012 11:34 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Fatima Chahrour~Vanrise Support
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

Hello,

that's the core file, do:

gdb /usr/local/sbin/kamailio /core

The send out the output from the gdb commands:

bt
bt full

Cheers,
Daniel

On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote: 

Dear Daniel,

 

Thanks for your reply..

I'd like to ask you too if my script in my first post that am using in the
routing area is correct?

 

I found file named core in the '/' location as you mentioned. 

When I open it using #cat core, the opened file go crazy and writes strange
characters and it ending with the below:

 

/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//ka
mailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:
3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkr
c:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOC
KET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=
vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix/3188MAIL=/var/mail/rootPA
TH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/DESKTOP_SES
SION=defaultGDM_XSERVER_LOCATION=localPWD=/usr/local/etc/kamailioLANG=en_US.
UTF-8GDM_LANG=en_US.UTF-8GDMSESSION=defaultSHLVL=4HOME

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-03-19 Thread Daniel-Constantin Mierla

Hello,

On 3/19/12 1:28 PM, Fatima Chahrour~Vanrise Support wrote:


Hi,

Thanks for the reply, it works with no crash now and I can now 
understand the reason behind the crash;



welcome.


Note: After removing 4 from dr_rule table no more crash occurs, yet 
the call is still ending with Request Timeout. Shall I add this issue 
in a new post or can I continue here? Because I still need help to 
know why is my call not successful.




Better start a new email thread, with new subject, appropriate to the 
issue you are facing. Attach ngrep traces for such a call.


Cheers,
Daniel


Thanks in advance,

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
*Sent:* Friday, March 16, 2012 7:12 PM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List

*Cc:* Fatima Chahrour~Vanrise Support
*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

finally I had the time to look at the documents you sent. The problem 
is that you have recursive execution of do_routing(0) from 
do_routing(0).


This happens because you have route[4] like:

route[4] {
  if (!do_routing(0)) {
send_reply(503, No Rules matching the URI);
exit;
  }
}

route[4] is executed from request_route. But then, in database 
dr_routes table, for the prefix 961 you are using for testing, the 
routeid value is 4, meaning that, when do_routing(0) is matching 
will execute the route[4] from the config. Which again is calling 
do_routing(0) that matches again and executes again route[4] and so 
on ...


At some point the OS kills kamailio, resulting in a crash reported at 
random lines of code -- these were misleading so far, because at some 
of them was an impossible code fault crash condition.


So, remove 4 from routeid column in the database dr_rules table.

Cheers,
Daniel

On 3/2/12 9:57 AM, Daniel-Constantin Mierla wrote:

By the way, in the config you sent in the very first email, you do 
do_routing(0), but I could not see rules with id 0. Can you add such 
rules or use the id from the rules? Just to see if this is related or 
not, it should not crash even if the id is missing.


Daniel

On 3/1/12 3:52 PM, Fatima Chahrour~Vanrise Support wrote:

Hello,

Full version output is:

debian:/usr/local/etc/kamailio# /usr/local/sbin/kamailio -V

version: kamailio 3.2.2 (i386/linux) 5fc59c

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, DBG_QM_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: 5fc59c

compiled on 06:46:26 Feb 28 2012 with gcc 4.3.2

Thanks in advance.

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
*Sent:* Thursday, March 01, 2012 3:44 PM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List

*Cc:* Fatima Chahrour~Vanrise Support
*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

can you send also the full version - -the output of 
'/usr/local/sbin/kamailio -V'


Based on the backtrace, I could not match a valid line in the source 
code that could cause a crash.


Also, you haven't sent the output of 'bt full' -- you sent only from 
'bt', first part just limited number of printed line. Do 'bt full' in 
gdb and sent the output.


Cheers,
Daniel

On 3/1/12 11:02 AM, Fatima Chahrour~Vanrise Support wrote:

Hi Daniel,

Please find output attached.

Waiting your feedback.

Thanks,

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
*Sent:* Thursday, March 01, 2012 11:34 AM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List

*Cc:* Fatima Chahrour~Vanrise Support
*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

that's the core file, do:

gdb /usr/local/sbin/kamailio /core

The send out the output from the gdb commands:

bt
bt full

Cheers,
Daniel

On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote:

Dear Daniel,

Thanks for your reply..

I'd like to ask you too if my script in my first post that am using in 
the routing area is correct?


I found file named core in the '/' location as you mentioned.

When I open it using #cat core, the opened file go crazy and writes 
strange characters and it ending with the below:


/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//kamailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkrc:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOCKET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-03-16 Thread Daniel-Constantin Mierla

Hello,

finally I had the time to look at the documents you sent. The problem is 
that you have recursive execution of do_routing(0) from do_routing(0).


This happens because you have route[4] like:

route[4] {
  if (!do_routing(0)) {
send_reply(503, No Rules matching the URI);
exit;
  }
}

route[4] is executed from request_route. But then, in database dr_routes 
table, for the prefix 961 you are using for testing, the routeid value 
is 4, meaning that, when do_routing(0) is matching will execute the 
route[4] from the config. Which again is calling do_routing(0) that 
matches again and executes again route[4] and so on ...


At some point the OS kills kamailio, resulting in a crash reported at 
random lines of code -- these were misleading so far, because at some of 
them was an impossible code fault crash condition.


So, remove 4 from routeid column in the database dr_rules table.

Cheers,
Daniel

On 3/2/12 9:57 AM, Daniel-Constantin Mierla wrote:
By the way, in the config you sent in the very first email, you do 
do_routing(0), but I could not see rules with id 0. Can you add such 
rules or use the id from the rules? Just to see if this is related or 
not, it should not crash even if the id is missing.


Daniel

On 3/1/12 3:52 PM, Fatima Chahrour~Vanrise Support wrote:


Hello,

Full version output is:

debian:/usr/local/etc/kamailio# /usr/local/sbin/kamailio -V

version: kamailio 3.2.2 (i386/linux) 5fc59c

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, DBG_QM_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: 5fc59c

compiled on 06:46:26 Feb 28 2012 with gcc 4.3.2

Thanks in advance.

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
*Sent:* Thursday, March 01, 2012 3:44 PM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List

*Cc:* Fatima Chahrour~Vanrise Support
*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

can you send also the full version - -the output of 
'/usr/local/sbin/kamailio -V'


Based on the backtrace, I could not match a valid line in the source 
code that could cause a crash.


Also, you haven't sent the output of 'bt full' -- you sent only from 
'bt', first part just limited number of printed line. Do 'bt full' in 
gdb and sent the output.


Cheers,
Daniel

On 3/1/12 11:02 AM, Fatima Chahrour~Vanrise Support wrote:

Hi Daniel,

Please find output attached.

Waiting your feedback.

Thanks,

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
*Sent:* Thursday, March 01, 2012 11:34 AM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List

*Cc:* Fatima Chahrour~Vanrise Support
*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

that's the core file, do:

gdb /usr/local/sbin/kamailio /core

The send out the output from the gdb commands:

bt
bt full

Cheers,
Daniel

On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote:

Dear Daniel,

Thanks for your reply..

I'd like to ask you too if my script in my first post that am using 
in the routing area is correct?


I found file named core in the '/' location as you mentioned.

When I open it using #cat core, the opened file go crazy and writes 
strange characters and it ending with the below:


/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//kamailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkrc:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOCKET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix/3188MAIL=/var/mail/rootPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/DESKTOP_SESSION=defaultGDM_XSERVER_LOCATION=localPWD=/usr/local/etc/kamailioLANG=en_US.UTF-8GDM_LANG=en_US.UTF-8GDMSESSION=defaultSHLVL=4HOME=/rootGNOME_DESKTOP_SESSION_ID=DefaultLOGNAME=rootDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-sH8atcWdX4,guid=f0dcba443f8fd1d5267161364f4dd99dXDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usrdebian:/# 
62;9;c62;9


Sorry, I've just realized an info that I should mention and would be 
helpful, am running this Kamailio on a debian Lenny VMware as a trial 
before migrating it to its server.


Thank you,

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
mailto:[mailto:mico...@gmail.com]

*Sent:* Thursday, March 01, 2012 10:15 AM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List
*Cc:* Fatima Chahrour~Vanrise

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-03-01 Thread Daniel-Constantin Mierla

Hello,

that's the core file, do:

gdb /usr/local/sbin/kamailio /core

The send out the output from the gdb commands:

bt
bt full

Cheers,
Daniel

On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote:


Dear Daniel,

Thanks for your reply..

I'd like to ask you too if my script in my first post that am using in 
the routing area is correct?


I found file named core in the '/' location as you mentioned.

When I open it using #cat core, the opened file go crazy and writes 
strange characters and it ending with the below:


/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//kamailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkrc:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOCKET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix/3188MAIL=/var/mail/rootPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/DESKTOP_SESSION=defaultGDM_XSERVER_LOCATION=localPWD=/usr/local/etc/kamailioLANG=en_US.UTF-8GDM_LANG=en_US.UTF-8GDMSESSION=defaultSHLVL=4HOME=/rootGNOME_DESKTOP_SESSION_ID=DefaultLOGNAME=rootDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-sH8atcWdX4,guid=f0dcba443f8fd1d5267161364f4dd99dXDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usrdebian:/# 
62;9;c62;9


Sorry, I've just realized an info that I should mention and would be 
helpful, am running this Kamailio on a debian Lenny VMware as a trial 
before migrating it to its server.


Thank you,

F.Chahrour

*From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
mailto:[mailto:mico...@gmail.com]

*Sent:* Thursday, March 01, 2012 10:15 AM
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - 
Users Mailing List
*Cc:* Fatima Chahrour~Vanrise Support; 
sr-users-boun...@lists.sip-router.org 
mailto:sr-users-boun...@lists.sip-router.org

*Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

Hello,

have you found the core file in /var/log/? It is a strange location 
unless you started with -w /var/log. The core file is named usually 
'core' or core.pid (replace pid with same number, like, 'core.1234'). 
The default location in in '/' unless there is a different location 
set via -w or enforced by operating system (e.g., mac os x puts it in 
'/corefiles').


Hope it helps to locate the core file and send the backtrace.

Cheers,
Daniel

On 3/1/12 9:05 AM, Fatima Chahrour~Vanrise Support wrote:

I also tried :  #gdb /usr/local/sbin/kamailio  /var/log/core.file
  (gdb) bt

And got No Stack..

BR,

F.Chahrour



___
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


--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda

___
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] DRouting cause Kamailio 3.2 to stop

2012-03-01 Thread Fatima Chahrour~Vanrise Support
Hi Daniel,

 

Please find output attached.

Waiting your feedback.

 

Thanks,

F.Chahrour

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 01, 2012 11:34 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Fatima Chahrour~Vanrise Support
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

Hello,

that's the core file, do:

gdb /usr/local/sbin/kamailio /core

The send out the output from the gdb commands:

bt
bt full

Cheers,
Daniel

On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote: 

Dear Daniel,

 

Thanks for your reply..

I'd like to ask you too if my script in my first post that am using in the
routing area is correct?

 

I found file named core in the '/' location as you mentioned. 

When I open it using #cat core, the opened file go crazy and writes strange
characters and it ending with the below:

 

/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//ka
mailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:
3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkr
c:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOC
KET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=
vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix/3188MAIL=/var/mail/rootPA
TH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/DESKTOP_SES
SION=defaultGDM_XSERVER_LOCATION=localPWD=/usr/local/etc/kamailioLANG=en_US.
UTF-8GDM_LANG=en_US.UTF-8GDMSESSION=defaultSHLVL=4HOME=/rootGNOME_DESKTOP_SE
SSION_ID=DefaultLOGNAME=rootDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus
-sH8atcWdX4,guid=f0dcba443f8fd1d5267161364f4dd99dXDG_DATA_DIRS=/usr/local/sh
are/:/usr/share/:/usrdebian:/# 62;9;c62;9

 

Sorry, I've just realized an info that I should mention and would be
helpful, am running this Kamailio on a debian Lenny VMware as a trial before
migrating it to its server.

 

Thank you,

F.Chahrour

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 01, 2012 10:15 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Cc: Fatima Chahrour~Vanrise Support; sr-users-boun...@lists.sip-router.org
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

Hello,

have you found the core file in /var/log/? It is a strange location unless
you started with -w /var/log. The core file is named usually 'core' or
core.pid (replace pid with same number, like, 'core.1234'). The default
location in in '/' unless there is a different location set via -w or
enforced by operating system (e.g., mac os x puts it in '/corefiles').

Hope it helps to locate the core file and send the backtrace.

Cheers,
Daniel

On 3/1/12 9:05 AM, Fatima Chahrour~Vanrise Support wrote: 

I also tried : #gdb /usr/local/sbin/kamailio  /var/log/core.file
 (gdb) bt

And got No Stack..

 

BR,

F.Chahrour

 

 






___
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





-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda
Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
/usr/local/etc/kamailio//k'.
Program terminated with signal 11, Segmentation fault.
[New process 5064]
#0  do_routing (msg=0xb7250c8c, drg=0xb72396c8) at drouting.c:658
658 {
(gdb) bt
#0  do_routing (msg=0xb7250c8c, drg=0xb72396c8) at drouting.c:658
#1  0x0805c09e in do_action (h=0xbf5974a8, a=0xb723d78c, msg=0xb7250c8c)
at action.c:1122
#2  0x08062579 in run_actions (h=0xbf5974a8, a=0xb723d78c, msg=0xb7250c8c)
at action.c:1610
#3  0x080628d1 in run_actions_safe (h=0xbf597b18, a=0xb723d78c, msg=0xb7250c8c)
at action.c:1662
#4  0x080f7c8d in rval_get_int (h=0xbf597b18, msg=0xb7250c8c, i=0xbf5977d8, 
rv=0xb723dde4, cache=0x0) at rvalue.c:920
#5  0x080fb8e5 in rval_expr_eval_int (h=0xbf597b18, msg=0xb7250c8c, 
res=0xbf5977d8, rve=0xb723dde0) at rvalue.c:1914
#6  0x080fb9b5 in rval_expr_eval_int (h=0xbf597b18, msg=0xb7250c8c, 
res=0xbf597ab4, rve=0xb723e1fc) at rvalue.c:1922
#7  0x0805b853 in do_action (h=0xbf597b18, a=0xb723e8a4, msg=0xb7250c8c)
at action.c:1092
#8  0x08062579 in run_actions (h=0xbf597b18, a=0xb723e8a4, msg=0xb7250c8c)
at action.c:1610
#9  0x08062854 in run_top_route (a=0xb723e8a4, msg=0xb7250c8c, c=0x0)
at action.c:1683
#10 0xb6d326f5 in do_routing (msg=0xb7250c8c, drg=value optimized out)
at drouting.c:751
#11 0x0805c09e in do_action (h=0xbf598118, a=0xb723d78c, msg=0xb7250c8c)
at action.c:1122
---Type return to continue, or q return to quit---
QUIT
gdb) bt
#0  do_routing (msg=0xb7250c8c, drg=0xb72396c8) at drouting.c:658
#1  0x0805c09e in do_action (h=0xbf5974a8, a=0xb723d78c, msg=0xb7250c8c

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-02-26 Thread Fatima Chahrour~ Vanrise Technical Support
Stayon, start kamailio as root means using kamctrl start?

 

Regards,

Fatima

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Stoyan Mihaylov
Sent: Friday, February 24, 2012 5:05 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

I am working with kamailio from 3 months or so. And we use it only as
registrar and load balance. All routing is done from Asterisks which are
behind kamailio. I only route using ds_select_dst - to select Asterisk
where to forward call.

 

I dont like signal 15 - looks like crash from wrong arguments or something
alike (but same signal you will see if you manually shut down kamailio). I
have no experience with module you use.

Next steps you can do are - to increase debug level, and again to look at
tail, especially in moment of dial - when kamailio crashes. You can check
also core dumps - how you can do it - there is discussion now about it -
important thing is may be you should start kamailio as root.

 

 

On Fri, Feb 24, 2012 at 4:40 PM, Fatima Chahrour~Vanrise Support
fchahr...@vanrise.com wrote:

Hi,

 

Thanks for your reply.

I have checked, and I have one question, from analyzing two points:

 

-  1st point is that before adding the drouting scripts no problem
with kamailio and no crash, but after adding the script in the routing logic
kamailio app dies

-  2nd point if I have have any wrong data in the database and try
to call, I get the  (503, No Rules matching the URI) on the x-lite

 

So both points doesn't mean that the problem lies in the scripts I have in
the routing logic area? (Also please note that I have got these scripts
after checking the kamailio doc and other google doc that applied drouting
scenario using kamailio 1.5.0).

 

Following your advice, I have check the syslog file before and after
performing the call and am getting the below

 

1)When I start kamailio I have the following in syslog :

 

an:/usr/local/etc/kamailio# kamctl start

 

INFO: Starting Kamailio : 

INFO: started (pid: 19296)

debian:/usr/local/etc/kamailio# tail -f /var/lo

local/ lock/  log/   

debian:/usr/local/etc/kamailio# tail -f /var/log/syslog

Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
WARNING: fix_hostname: could not rev. resolve 192.168.111.139

Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
WARNING: fix_hostname: could not rev. resolve 192.168.111.139

Feb 24 05:57:30 debian kamailio: INFO: core [tcp_main.c:4727]: init_tcp:
using epoll_lt as the io watch method (auto detected)

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: usrloc
[hslot.c:53]: locks array size 512

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: drouting
[drouting.c:272]: DRouting - initializing

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

Feb 24 05:57:31 debian /usr/local/sbin/kamailio[19310]: INFO: ctl
[io_listener.c:225]: io_listen_loop:  using epoll_lt io watch method
(config)

 

2) When I do the call from x-lite by dialing 96122, after few seconds I
get Call Failed: Request Timeout on x-lite, and the syslog  shows:

 

an:/usr/local/etc/kamailio# tail -f /var/log/syslog

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19305]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19309]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19310]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19314]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19312]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19316]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19307]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19320]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19318]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19301]: INFO: core
[main.c:817]: INFO: signal 15 received

 

There is no error raised; So, shall I consider this as Kamailio crash and
focus my search on this as you mentioned previously? Or I need

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-02-26 Thread Stoyan Mihaylov
You can start kamailio from prompt directly  - of course logged as root:
kamailio {parameters - including cfg file}
If you are using ubuntu - it is more tricky - first you should create root
user, or may be you can start with:
sudo kamailio {parameters}
I never started kamailio using kamctrl. I am starting it through little
modified init script.


On Sun, Feb 26, 2012 at 1:10 PM, Fatima Chahrour~ Vanrise Technical Support
fchahr...@vanrise.com wrote:

 Stayon, start kamailio as root means using kamctrl start?

 ** **

 Regards,

 Fatima

 *From:* sr-users-boun...@lists.sip-router.org [mailto:
 sr-users-boun...@lists.sip-router.org] *On Behalf Of *Stoyan Mihaylov
 *Sent:* Friday, February 24, 2012 5:05 PM

 *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
 Users Mailing List
 *Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 ** **

 I am working with kamailio from 3 months or so. And we use it only as
 registrar and load balance. All routing is done from Asterisks which are
 behind kamailio. I only route using ds_select_dst - to select Asterisk
 where to forward call.

  

 I dont like signal 15 - looks like crash from wrong arguments or something
 alike (but same signal you will see if you manually shut down kamailio). I
 have no experience with module you use.

 Next steps you can do are - to increase debug level, and again to look at
 tail, especially in moment of dial - when kamailio crashes. You can check
 also core dumps - how you can do it - there is discussion now about it -
 important thing is may be you should start kamailio as root.

 ** **

 ** **

 On Fri, Feb 24, 2012 at 4:40 PM, Fatima Chahrour~Vanrise Support 
 fchahr...@vanrise.com wrote:

 Hi,

  

 Thanks for your reply.

 I have checked, and I have one question, from analyzing two points:

  

 -  1st point is that before adding the drouting scripts no
 problem  with kamailio and no crash, but after adding the script in the
 routing logic kamailio app dies

 -  2nd point if I have have any wrong data in the database and
 try to call, I get the  (503, No Rules matching the URI) on the x-lite
 

  

 So both points doesn’t mean that the problem lies in the scripts I have in
 the routing logic area? (Also please note that I have got these scripts
 after checking the kamailio doc and other google doc that applied drouting
 scenario using kamailio 1.5.0).

  

 Following your advice, I have check the syslog file before and after
 performing the call and am getting the below

  

 1)When I start kamailio I have the following in syslog :

  

 an:/usr/local/etc/kamailio# kamctl start

  

 INFO: Starting Kamailio : 

 INFO: started (pid: 19296)

 debian:/usr/local/etc/kamailio# tail -f /var/lo

 local/ lock/  log/   

 debian:/usr/local/etc/kamailio# tail -f /var/log/syslog

 Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
 WARNING: fix_hostname: could not rev. resolve 192.168.111.139

 Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
 WARNING: fix_hostname: could not rev. resolve 192.168.111.139

 Feb 24 05:57:30 debian kamailio: INFO: core [tcp_main.c:4727]: init_tcp:
 using epoll_lt as the io watch method (auto detected)

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: usrloc
 [hslot.c:53]: locks array size 512

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: drouting
 [drouting.c:272]: DRouting - initializing

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
 [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
 [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
 [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

 Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
 [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

 Feb 24 05:57:31 debian /usr/local/sbin/kamailio[19310]: INFO: ctl
 [io_listener.c:225]: io_listen_loop:  using epoll_lt io watch method
 (config)

  

 2) When I do the call from x-lite by dialing 96122, after few seconds
 I get Call Failed: Request Timeout on x-lite, and the syslog  shows:

  

 an:/usr/local/etc/kamailio# tail -f /var/log/syslog

 Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19305]: INFO: core
 [main.c:817]: INFO: signal 15 received

 Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19309]: INFO: core
 [main.c:817]: INFO: signal 15 received

 Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19310]: INFO: core
 [main.c:817]: INFO: signal 15 received

 Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19314]: INFO: core
 [main.c:817]: INFO: signal 15 received

 Feb 24 06:00:39

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-02-24 Thread Stoyan Mihaylov
I suppose - kamailio crashes. You can run in console on same server:
tail -f /var/log/syslog
or you can tail file where sys logs are stored.
There - you can see some debugs, and you can check discussion about
kamailio crashes and how to get dump file.
This way you will identify problem and then either you will fix your cfg
file, or you can report bug.

On Thu, Feb 23, 2012 at 6:01 PM, Fatima Chahrour~Vanrise Support 
fchahr...@vanrise.com wrote:

 Hi,

 ** **

 I am newly experiencing kamailio 3.2. I have installed kamailio and MySQL
 and tried the test call from 1 PC(x-lite) to another PC(x-lite) and ended
 successfully.

 ** **

 Now moving further, I have configured dynamic routing module and applied
 needed parameters and scripts to finally be able to start kamailio without
 any issue. Also I set a testing scenario in the related database tables***
 *

 BUT my problem is that whenever am trying to call the predefined prefix
 (961) from x-lite am getting a ‘calling’ message on it and then request
 timeout where I find that kamailio has stopped running. I kamctrl start
 again and call 961 then get calling so I wait and kamailio stps again.
 Below is the script used in the routing logic and database record.

 ** **

 Any help to achieve a successful call is highly appreciated.

 ** **

 dr_gatways:   3, 1, '192.168.111.15', 0, '', '', 2, 'PC1'

 ** **

 dr_groups:  2, '.*', '.*', 0, 'Anyone'

 ** **

 dr_gw_lists:   2, '3', 'Test Call'

 ** **

 dr_rules:  2, '0', '961', '', 0, '1', '#2', 'Lebanon Fix'

 ** **

 ** **

 ### Routing Logic 

 # main request routing logic

 route{

 ** **

   if (is_method(INVITE)) {

 setflag(1); # do accounting

 route(4); # Call our dynamic route.

   }

 }

 …

 …

 …

 

 route[4] {

   if (!do_routing(0)) {

 send_reply(503, No Rules matching the URI);

 exit;

   }

   if (is_method(INVITE)) {

 t_on_failure(4);

   }

 route(RELAY);

 }

 ..

 ..

 ..

 failure_route[4] {

 if (use_next_gw()) {

 t_relay();

 exit;

 } else {

 t_reply (503, Service not available);

 exit;

 }

 }

 ** **

 Thanks in Advance,

 F.Chahrour

 ** **

 ___
 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] DRouting cause Kamailio 3.2 to stop

2012-02-24 Thread Fatima Chahrour~Vanrise Support
Hi,

 

Thanks for your reply.

I have checked, and I have one question, from analyzing two points:

 

-  1st point is that before adding the drouting scripts no problem
with kamailio and no crash, but after adding the script in the routing logic
kamailio app dies

-  2nd point if I have have any wrong data in the database and try
to call, I get the  (503, No Rules matching the URI) on the x-lite

 

So both points doesn't mean that the problem lies in the scripts I have in
the routing logic area? (Also please note that I have got these scripts
after checking the kamailio doc and other google doc that applied drouting
scenario using kamailio 1.5.0).

 

Following your advice, I have check the syslog file before and after
performing the call and am getting the below

 

1)When I start kamailio I have the following in syslog :

 

an:/usr/local/etc/kamailio# kamctl start

 

INFO: Starting Kamailio : 

INFO: started (pid: 19296)

debian:/usr/local/etc/kamailio# tail -f /var/lo

local/ lock/  log/   

debian:/usr/local/etc/kamailio# tail -f /var/log/syslog

Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
WARNING: fix_hostname: could not rev. resolve 192.168.111.139

Feb 24 05:57:30 debian kamailio: WARNING: core [socket_info.c:1275]:
WARNING: fix_hostname: could not rev. resolve 192.168.111.139

Feb 24 05:57:30 debian kamailio: INFO: core [tcp_main.c:4727]: init_tcp:
using epoll_lt as the io watch method (auto detected)

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: usrloc
[hslot.c:53]: locks array size 512

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: drouting
[drouting.c:272]: DRouting - initializing

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616

Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: core
[udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142

Feb 24 05:57:31 debian /usr/local/sbin/kamailio[19310]: INFO: ctl
[io_listener.c:225]: io_listen_loop:  using epoll_lt io watch method
(config)

 

2) When I do the call from x-lite by dialing 96122, after few seconds I
get Call Failed: Request Timeout on x-lite, and the syslog  shows:

 

an:/usr/local/etc/kamailio# tail -f /var/log/syslog

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19305]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19309]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19310]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19314]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19312]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19316]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19307]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19320]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19318]: INFO: core
[main.c:817]: INFO: signal 15 received

Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19301]: INFO: core
[main.c:817]: INFO: signal 15 received

 

There is no error raised; So, shall I consider this as Kamailio crash and
focus my search on this as you mentioned previously? Or I need help in
achieving correct route script in the routing logic?

 

Thanks,

F.Chahrour

 

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Stoyan Mihaylov
Sent: Friday, February 24, 2012 2:48 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Subject: Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 

I suppose - kamailio crashes. You can run in console on same server:

tail -f /var/log/syslog

or you can tail file where sys logs are stored.

There - you can see some debugs, and you can check discussion about kamailio
crashes and how to get dump file.

This way you will identify problem and then either you will fix your cfg
file, or you can report bug.

On Thu, Feb 23, 2012 at 6:01 PM, Fatima Chahrour~Vanrise Support
fchahr...@vanrise.com wrote:

Hi,

 

I am newly experiencing kamailio 3.2. I have installed kamailio and MySQL
and tried the test call from 1 PC(x-lite) to another PC(x-lite) and ended
successfully.

 

Now moving further, I have configured dynamic routing module and applied
needed parameters and scripts to finally be able to start kamailio without
any issue. Also I set a testing

Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

2012-02-24 Thread Stoyan Mihaylov
-users-boun...@lists.sip-router.org [mailto:
 sr-users-boun...@lists.sip-router.org] *On Behalf Of *Stoyan Mihaylov
 *Sent:* Friday, February 24, 2012 2:48 PM
 *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
 Users Mailing List
 *Subject:* Re: [SR-Users] DRouting cause Kamailio 3.2 to stop

 ** **

 I suppose - kamailio crashes. You can run in console on same server:

 tail -f /var/log/syslog

 or you can tail file where sys logs are stored.

 There - you can see some debugs, and you can check discussion about
 kamailio crashes and how to get dump file.

 This way you will identify problem and then either you will fix your cfg
 file, or you can report bug.

 On Thu, Feb 23, 2012 at 6:01 PM, Fatima Chahrour~Vanrise Support 
 fchahr...@vanrise.com wrote:

 Hi,

  

 I am newly experiencing kamailio 3.2. I have installed kamailio and MySQL
 and tried the test call from 1 PC(x-lite) to another PC(x-lite) and ended
 successfully.

  

 Now moving further, I have configured dynamic routing module and applied
 needed parameters and scripts to finally be able to start kamailio without
 any issue. Also I set a testing scenario in the related database tables***
 *

 BUT my problem is that whenever am trying to call the predefined prefix
 (961) from x-lite am getting a ‘calling’ message on it and then request
 timeout where I find that kamailio has stopped running. I kamctrl start
 again and call 961 then get calling so I wait and kamailio stps again.
 Below is the script used in the routing logic and database record.

  

 Any help to achieve a successful call is highly appreciated.

  

 dr_gatways:   3, 1, '192.168.111.15', 0, '', '', 2, 'PC1'

  

 dr_groups:  2, '.*', '.*', 0, 'Anyone'

  

 dr_gw_lists:   2, '3', 'Test Call'

  

 dr_rules:  2, '0', '961', '', 0, '1', '#2', 'Lebanon Fix'

  

  

 ### Routing Logic 

 # main request routing logic

 route{

  

   if (is_method(INVITE)) {

 setflag(1); # do accounting

 route(4); # Call our dynamic route.

   }

 }

 …

 …

 …

 

 route[4] {

   if (!do_routing(0)) {

 send_reply(503, No Rules matching the URI);

 exit;

   }

   if (is_method(INVITE)) {

 t_on_failure(4);

   }

 route(RELAY);

 }

 ..

 ..

 ..

 ** **

 failure_route[4] {

 if (use_next_gw()) {

 t_relay();

 exit;

 } else {

 t_reply (503, Service not available);

 exit;

 }

 }

  

 Thanks in Advance,

 F.Chahrour

  


 ___
 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] Drouting usage

2010-10-26 Thread Javier Gallart
Thanks Marius,


that was it.

Regards

Javier

On Mon, Oct 25, 2010 at 10:08 PM, sr-users-requ...@lists.sip-router.orgwrote:

 Send sr-users mailing list submissions to
sr-users@lists.sip-router.org

 To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 or, via email, send a message with subject or body 'help' to
sr-users-requ...@lists.sip-router.org

 You can reach the person managing the list at
sr-users-ow...@lists.sip-router.org

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of sr-users digest...


 Today's Topics:

   1. Drouting usage (Javier Gallart)
   2. PSTN call (michel freiha)
   3. Re: Drouting usage (marius zbihlei)
   4. bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo)
   5. Re: bflag under failure_route (kamailio 1.5)
  (Daniel-Constantin Mierla)
   6. Re: bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo)
   7. Re: bflag under failure_route (kamailio 1.5)
  (Daniel-Constantin Mierla)
   8. Re: bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo)


 --

 Message: 1
 Date: Mon, 25 Oct 2010 15:16:56 +0200
 From: Javier Gallart jgalla...@gmail.com
 Subject: [SR-Users] Drouting usage
 To: sr-users@lists.sip-router.org
 Message-ID:
aanlktik8pwtu9ut1=mpb_zsnztej5khzprevpubgz...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1

 Hello

 sorry if this sounds too newbie. I'm interested in the drouting module.
 The first INVITE is correctly forwarded to the gw foudn in the drouting
 table:
 if (is_method(INVITE)  !has_totag()) {
do_routing(0);
record_route();
}
 However for subsequent messages (ACK, BYE) in the dialog I don't know how
 to
 keep track of the ip resolved by the drouting logic so the messages are
 correctly forwarded to the same gw. I've made some tests using the dialog
 module with no success. Any hint?

 Thanks in advance

 Javier
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/8c5c5a6c/attachment-0001.htm
 

 --

 Message: 2
 Date: Mon, 25 Oct 2010 16:49:24 +0300
 From: michel freiha mich...@gmail.com
 Subject: [SR-Users] PSTN call
 To: us...@lists.kamailio.org
 Message-ID:
aanlktimkdfnxtaarb8gvkdb4haen8ey03wo9mk6mn...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1

 Dear All,

 Can someone help me to connect my kamilio in order to make a PSTN call by
 rewriting host tp PSTN gateway? I changed my config in a manner to do
 that...The line is ringing but as soon as I open the line on other side the
 call will hangup...Please find the piece of code

 # RTPProxy control
 route[RTPPROXY] {
 #!ifdef WITH_NAT
if (is_method(BYE)) {
unforce_rtp_proxy();
} else if (is_method(INVITE)){
 rewritehost(XX.XX.XX.XX);
force_rtp_proxy();
}
if (!has_totag()) add_rr_param(;nat=yes);
 #!endif
return;
 }


 Regards
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/eeae5259/attachment-0001.htm
 

 --

 Message: 3
 Date: Mon, 25 Oct 2010 16:51:32 +0300
 From: marius zbihlei marius.zbih...@1and1.ro
 Subject: Re: [SR-Users] Drouting usage
 To: sr-users@lists.sip-router.org
 Message-ID: 4cc58b64.4040...@1and1.ro
 Content-Type: text/plain; charset=iso-8859-1; Format=flowed

 On 10/25/2010 04:16 PM, Javier Gallart wrote:
  Hello
 
  sorry if this sounds too newbie. I'm interested in the drouting
  module. The first INVITE is correctly forwarded to the gw foudn in the
  drouting table:
  if (is_method(INVITE)  !has_totag()) {
  do_routing(0);
  record_route();
  }
  However for subsequent messages (ACK, BYE) in the dialog I don't know
  how to keep track of the ip resolved by the drouting logic so the
  messages are correctly forwarded to the same gw. I've made some tests
  using the dialog module with no success. Any hint?
 
  Thanks in advance
 
  Javier
 Hello

 You might want to use loose_route() to perform loose routing (defined in
 RFC 3261) of in-dialog requests. (Loose_route also performs strict routing)

 if (has_totag()){
 loose_route();
 t_relay();
 exit;
 }

 Marius

 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/bc0d7d5d/attachment-0001.htm
 

 --

 Message: 4
 Date: Mon, 25 Oct 2010 18:25:17 +0200
 From: I?aki Baz Castillo i...@aliax.net
 Subject: [SR-Users] bflag under failure_route (kamailio 1.5)
 To: SR-Users sr-users@lists.sip-router.org
 Message-ID

Re: [SR-Users] Drouting usage

2010-10-25 Thread marius zbihlei

On 10/25/2010 04:16 PM, Javier Gallart wrote:

Hello

sorry if this sounds too newbie. I'm interested in the drouting 
module. The first INVITE is correctly forwarded to the gw foudn in the 
drouting table:

if (is_method(INVITE)  !has_totag()) {
do_routing(0);
record_route();
}
However for subsequent messages (ACK, BYE) in the dialog I don't know 
how to keep track of the ip resolved by the drouting logic so the 
messages are correctly forwarded to the same gw. I've made some tests 
using the dialog module with no success. Any hint?


Thanks in advance

Javier

Hello

You might want to use loose_route() to perform loose routing (defined in 
RFC 3261) of in-dialog requests. (Loose_route also performs strict routing)


if (has_totag()){
loose_route();
t_relay();
exit;
}

Marius

___
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