Re: [SR-Users] How to cleanup unconfirmed dialog in memory?

2013-07-07 Thread Gary Chen
I am unable to recreate the problem. I will keep eye on it. If it happen
again, I will report back here.
gary


On Fri, Jul 5, 2013 at 3:52 AM, Charles Chance 
charles.cha...@sipcentric.com wrote:

 Hi Daniel,

 If someone can try it and confirm is working fine for sl replied dialogs
 as well as for those forwarded, I will backport.


 Seems to work fine for us in our test environment. So far, no unconfirmed
 dialogs stuck in memory for statelessly replied transactions.

 Cheers,

 Charles



 On 3 July 2013 17:25, Charles Chance charles.cha...@sipcentric.comwrote:

 Hi Daniel,

 Sounds perfect! I will try to test here tomorrow and let you know.

 Cheers,

 Charles


 On 2 July 2013 22:44, Daniel-Constantin Mierla mico...@gmail.com wrote:

  Hello,

 I pushed a patch in master that detects when the dialog is created by
 not getting to transaction due to a stateless reply.


 http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=fa0339b1906690f009786fc9ed92c73a8c9e6520;hp=b4682cac2e2f151288a411018da077b6d1526eca

 If someone can try it and confirm is working fine for sl replied dialogs
 as well as for those forwarded, I will backport.

 Cheers,
 Daniel


 On 7/2/13 4:22 PM, Carlos Ruiz Díaz wrote:

  Now that you mention it, it makes perfect sense since this function
 sends BYE to both legs which only makes sense with confirmed dialogs.

  I run out of alternatives. Maybe patching the module is the only
 solution.

  Regards,
 Carlos


 On Tue, Jul 2, 2013 at 10:16 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 That doesn't work I'm afraid. Also from
 http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783:


  *Note: Works only for confirmed dialogs.*


  It's something I've been meaning to look further into for a while,
 but haven't yet had chance. I suspect a small patch will be required 
 though.

  Regards,

  Charles



 On 2 July 2013 15:11, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote:

 Ok, I haven't noticed that, although I can't tell for sure whether it
 will work or not.

  If you can dump the dialogs using xmlrpc or rpc interface, maybe you
 could parse the info and tear down those unconfirmed dialogs using
 dlg_end_dlg:


 http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783


 On Tue, Jul 2, 2013 at 10:02 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 The parameter does not work for us. We have modparam(dialog,
 default_timeout,7200), but it only has an effect on confirmed dialogs. 
 As
 you can see from my previous example, there is not even a timestart 
 value
 on the unconfirmed dialog, so how can Kamailio know when timeout is
 reached?



 On 2 July 2013 14:51, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote:

 There is, but for all dialogs, not only the unconfirmed ones.


 http://www.kamailio.org/docs/modules/3.3.x/modules_k/dialog.html#default-timeout-id


 On Tue, Jul 2, 2013 at 9:49 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 Hmm, I don't think there is even a timeout value set on unconfirmed
 dialogs in memory.

  Example (Kamailio 3.3.3):

  dialog::  hash=1791:10106
  state:: 1
  ref_count:: 1
  timestart:: 0
  timeout:: 0
  ...

  Whereas:

  dialog::  hash=2963:2808
  state:: 4
  ref_count:: 2
  timestart:: 1372772302
  timeout:: 114829207
  ...

  Therefore, the unconfirmed dialogs never get cleared
 automatically, in my experience at least. I hope I'm wrong though :)

  Cheers,

  Charles



 On 2 July 2013 14:31, Henning Westerholt h...@kamailio.org wrote:

 Am Dienstag, 2. Juli 2013, 14:23:25 schrieb Charles Chance:
  I don't think this will help at all, as regardless of DB mode,
 unconfirmed
  dialogs are not stored in DB anyway.
 
  The important thing to remember is that if you are calling
 dialog_manage()
  in your config, to only do it once you are ready to forward the
 request. If
  you call it but then exit for some reason without actually
 forwarding, you
  will probably end up with a stuck dialog.
 
  Maybe someone else can suggest other possible causes?
 
  To my knowledge, there is no existing way to clear these without
 restarting.

  Hello,

 AFAIK these stale dialogs are cleaned up after the dialog timeout.
 There are
 module parameter and also dialog specific parameter to control
 this variable.
 This stale dialogs needs a bit of memory, but are otherwise
 harmless.

 Best regards,

 Henning





 www.sipcentric.com

 Follow us on twitter @sipcentric http://twitter.com/sipcentric

 Sipcentric Ltd. Company registered in England  Wales no. 7365592. 
 Registered
 office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, 
 Birmingham
 B7 4EJ.

 ___
 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




  --
 Carlos
 http://caruizdiaz.com
 +595981146623

 

Re: [SR-Users] Load database table in memory

2013-07-03 Thread Gary Chen
I am using mtree for the same purpose and it works great. It never expire.
I had loaded about 7 millions records in mtree table and there is no
performance issue at all.

Gary


On Wed, Jul 3, 2013 at 7:57 AM, Alex Balashov abalas...@evaristesys.comwrote:

 Sure, you can do it that way.  However, htable and mtree accommodate
 relatively primitive data sets.

 Given sufficient table complexity and/or size, your best bet is to use an
 in-memory storage backend on the database side itself.

 In MySQL, this is called:


 http://dev.mysql.com/doc/**refman/5.7/en/memory-storage-**engine.htmlhttp://dev.mysql.com/doc/refman/5.7/en/memory-storage-engine.html

 -- Alex


 On 07/03/2013 05:41 AM, Grant Bagdasarian wrote:

  Hello,

 I need to query a database for every SIP request coming into Kamailio,
 but I want this to be handled as fast as possible, so I was thinking of
 loading the data I need in memory using the HTABLE or MTREE modules.

 When the SIP request is coming from one of our carriers, the called
 number ($rU) must be used to get the data for this called number.
 Normally, I would query the database, using sqlops, and pass the value
 of $rU as the parameter and get the column values using the $dbr
 variable. Can this be accomplished with HTABLE or MTREE?

 Also, the autoexpire parameter in HTABLE; once expired, will the data be
 reloaded again from the database?

 Thanks,


 Grant



 __**_
 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-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



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

 __**_
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://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] How to cleanup unconfirmed dialog in memory?

2013-07-03 Thread Gary Chen
We need also have a way to timeout all the dead unconfirmed dialog. I have
a situation that the SIP message was perfect fine with Bye signal, yet the
dialog is still hang with state 1.

Gary


On Wed, Jul 3, 2013 at 12:25 PM, Charles Chance 
charles.cha...@sipcentric.com wrote:

 Hi Daniel,

 Sounds perfect! I will try to test here tomorrow and let you know.

 Cheers,

 Charles


 On 2 July 2013 22:44, Daniel-Constantin Mierla mico...@gmail.com wrote:

  Hello,

 I pushed a patch in master that detects when the dialog is created by not
 getting to transaction due to a stateless reply.


 http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=fa0339b1906690f009786fc9ed92c73a8c9e6520;hp=b4682cac2e2f151288a411018da077b6d1526eca

 If someone can try it and confirm is working fine for sl replied dialogs
 as well as for those forwarded, I will backport.

 Cheers,
 Daniel


 On 7/2/13 4:22 PM, Carlos Ruiz Díaz wrote:

  Now that you mention it, it makes perfect sense since this function
 sends BYE to both legs which only makes sense with confirmed dialogs.

  I run out of alternatives. Maybe patching the module is the only
 solution.

  Regards,
 Carlos


 On Tue, Jul 2, 2013 at 10:16 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 That doesn't work I'm afraid. Also from
 http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783:


  *Note: Works only for confirmed dialogs.*


  It's something I've been meaning to look further into for a while, but
 haven't yet had chance. I suspect a small patch will be required though.

  Regards,

  Charles



 On 2 July 2013 15:11, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote:

 Ok, I haven't noticed that, although I can't tell for sure whether it
 will work or not.

  If you can dump the dialogs using xmlrpc or rpc interface, maybe you
 could parse the info and tear down those unconfirmed dialogs using
 dlg_end_dlg:


 http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783


 On Tue, Jul 2, 2013 at 10:02 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 The parameter does not work for us. We have modparam(dialog,
 default_timeout,7200), but it only has an effect on confirmed dialogs. 
 As
 you can see from my previous example, there is not even a timestart 
 value
 on the unconfirmed dialog, so how can Kamailio know when timeout is
 reached?



 On 2 July 2013 14:51, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote:

 There is, but for all dialogs, not only the unconfirmed ones.


 http://www.kamailio.org/docs/modules/3.3.x/modules_k/dialog.html#default-timeout-id


 On Tue, Jul 2, 2013 at 9:49 AM, Charles Chance 
 charles.cha...@sipcentric.com wrote:

 Hmm, I don't think there is even a timeout value set on unconfirmed
 dialogs in memory.

  Example (Kamailio 3.3.3):

  dialog::  hash=1791:10106
  state:: 1
  ref_count:: 1
  timestart:: 0
  timeout:: 0
  ...

  Whereas:

  dialog::  hash=2963:2808
  state:: 4
  ref_count:: 2
  timestart:: 1372772302
  timeout:: 114829207
  ...

  Therefore, the unconfirmed dialogs never get cleared
 automatically, in my experience at least. I hope I'm wrong though :)

  Cheers,

  Charles



 On 2 July 2013 14:31, Henning Westerholt h...@kamailio.org wrote:

 Am Dienstag, 2. Juli 2013, 14:23:25 schrieb Charles Chance:
  I don't think this will help at all, as regardless of DB mode,
 unconfirmed
  dialogs are not stored in DB anyway.
 
  The important thing to remember is that if you are calling
 dialog_manage()
  in your config, to only do it once you are ready to forward the
 request. If
  you call it but then exit for some reason without actually
 forwarding, you
  will probably end up with a stuck dialog.
 
  Maybe someone else can suggest other possible causes?
 
  To my knowledge, there is no existing way to clear these without
 restarting.

  Hello,

 AFAIK these stale dialogs are cleaned up after the dialog timeout.
 There are
 module parameter and also dialog specific parameter to control this
 variable.
 This stale dialogs needs a bit of memory, but are otherwise
 harmless.

 Best regards,

 Henning





 www.sipcentric.com

 Follow us on twitter @sipcentric http://twitter.com/sipcentric

 Sipcentric Ltd. Company registered in England  Wales no. 7365592. 
 Registered
 office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, 
 Birmingham
 B7 4EJ.

 ___
 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




  --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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




  --
  *Charles Chance*
 Managing Director

  t. 0121 285 4400m. 07932 063 891

 www.sipcentric.com

 Follow us 

Re: [SR-Users] How to cleanup unconfirmed dialog in memory?

2013-07-02 Thread Gary Chen
Thanks for suggestion. I will give it try.
Since every call will have to check database, will this effect the
performance of Kamailio for high volume server?

Gary


On Tue, Jul 2, 2013 at 8:55 AM, I.Pavlov i...@izhnet.ru wrote:

 Hi, Gary. I had same problem. Try to use “db_mode” parameter of dialog
 module with 1 value.

 ** **

 *1 - REALTIME* - any dialog information changes will be reflected into
 the database immediatly.

 ** **

 Then you can kill the dead dialogs through database.

 ** **

 *From:* sr-users-boun...@lists.sip-router.org [mailto:
 sr-users-boun...@lists.sip-router.org] *On Behalf Of *Gary Chen
 *Sent:* Tuesday, July 02, 2013 4:14 PM
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] How to cleanup unconfirmed dialog in memory?

 ** **

 ** **

 Kamailio 3.3.3

 I am using dialog module to do the concurrent call limit. Once a while I
 got a dead unconfirmed dialog hung in memory. The only way I know to
 cleanup this is to restart kamailio. So my questions are:
 1) Does anybody know a better way to cleanup the dead dialog without
 having to restart the kamailio server? This is a production server. I
 really really hate to restart the server.

 2) How easy to modify the source code to timeout the dead unconfirmed
 dialog in memory? 

 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


___
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] LCR in Kamailio 4.0

2013-06-28 Thread Gary Chen
First thing to remember that lcr_id field is the one to link all three
tables together. Let's say that you want to create a lcr to route
international call starting with 011:
1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP etc.
2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix =
011
3) Then create a row in lcr_rule_target table to glue the gateway and
prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
fields like priority etc.

Hope this help.

Gary



On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about how
 the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

 ___
 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] LCR in Kamailio 4.0

2013-06-28 Thread Gary Chen
lcr_rule_target is like a glue to link lcr_gw and lcr_rule tables together
through rule_id and gw_id as well as lcr_id.
In this case if you have several sets of lcr_id, you will end up with
several duplicate gateway and rulls. It is not the best design and is hard
to use.

To reload lcr you do this: sercmd lcr.reload

Gary Chen


On Fri, Jun 28, 2013 at 6:50 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 What is the value of the target table?  Previously the lcr rule table
 was directly tied to the gateway.  Is this simply to enable N:1
 relationships between lcr rules and gateways.

 Also - any idea how to reload the LCR configuration without restarting
 kamailio?  I previously issued kamctl fifo lcr_reload, but that doesn't
 appear to work any longer.

 Thanks!


 On Fri, Jun 28, 2013 at 4:44 PM, Gary Chen gchen3...@gmail.com wrote:

 First thing to remember that lcr_id field is the one to link all three
 tables together. Let's say that you want to create a lcr to route
 international call starting with 011:
 1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP
 etc.
 2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix
 = 011
 3) Then create a row in lcr_rule_target table to glue the gateway and
 prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
 table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
 fields like priority etc.

 Hope this help.

 Gary



 On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about
 how the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

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



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



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


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


[SR-Users] lcr.dump_gws problem

2012-07-24 Thread Gary Chen
Kamailio 3.2.0

When testing Kamailio 3.2.0, I notice that lcr.dump_gws command does not 
display ip_addr correctly. Here is my output:
lcr_id: 3
gw_id: 15
gw_index: 2
gw_name: gateway_1
scheme: sip
ip_addr: 1273060816.0.0.0
hostname:
port: 5060
params:
strip: 0
prefix:
tag:
flags: 0
defunct_until: 0

LCR is still working correctly. It just does not display IP in the right form. 
Does any body also has the same problem?

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] lcr.dump_gws problem

2012-07-24 Thread Gary Chen
Sorry, it should be Kamailio 3.3.0 not 3.2.0.

From: sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Gary Chen
Sent: Tuesday, July 24, 2012 3:39 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: [SR-Users] lcr.dump_gws problem

Kamailio 3.2.0

When testing Kamailio 3.2.0, I notice that lcr.dump_gws command does not 
display ip_addr correctly. Here is my output:
lcr_id: 3
gw_id: 15
gw_index: 2
gw_name: gateway_1
scheme: sip
ip_addr: 1273060816.0.0.0
hostname:
port: 5060
params:
strip: 0
prefix:
tag:
flags: 0
defunct_until: 0

LCR is still working correctly. It just does not display IP in the right form. 
Does any body also has the same problem?

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


[SR-Users] How to use regular expression for $var ?

2012-07-16 Thread Gary Chen
Kamailio 3.3.0

I have a variable  $var(s:dst). It can store either a number or IP.
How do I check to determine whether it is a number of IP?
I tried the following and it did not work:

If ($var(s:dst) =~ ^\d+\.\d+\.\d+\.\d+$){

It is a IP.

}else{

It is a Number

}





Thanks



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] ACK and BYE messages uses wrong socket.

2012-07-05 Thread Gary Chen
Yes, it is available when kamailio started. I tried the latest version (3.2.3) 
and it did the same thing.
If I removed listen=udp:x.x.130.34:5060  (primary IP on the NIC) from 
configuration file, it will report error when trying to relay() the message 
like this:
ERROR: core [forward.c:220]: ERROR: get_out_socket: no socket found
It seems that kamailio does not populate default socket with secondary IP 
(floating IP) and you have to use force_send_socket() to send the message.

Gary

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Tuesday, July 03, 2012 12:23 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Cc: Gary Chen
Subject: Re: [SR-Users] ACK and BYE messages uses wrong socket.

Hello,

is .36 address available on the network interface when kamailio is started?

Also, use at least v3.2.3 (the latest in 3.2 series) to be sure you get all the 
fixes since 3.2.0 and this is not related to some issue already fixed.

Cheers,
Daniel
On 7/3/12 4:52 PM, Gary Chen wrote:
Yes, I did the same thing as you mentioned and it still doing the same thing. 
Here is my setup:
mhomed=1
listen=udp:x.x.130.36:5060 # external IP
listen=udp:x.x.130.34:5060 # external IP
listen=udp:10.200.1.31:5060 # internal IP

If I removed .130.34, I got error saying no socket found.

Gary Chen
From: 
sr-users-boun...@lists.sip-router.orgmailto:sr-users-boun...@lists.sip-router.org
 [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Vitaliy Aleksandrov
Sent: Tuesday, July 03, 2012 10:27 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: Re: [SR-Users] ACK and BYE messages uses wrong socket.

Have you specified interfaces with listen command ?
I had a problem as you described and have fixed it by moving a listen directive 
with a floating ip to the top of the list.
So you can try to specify interfaces you will use for SIP and set a virtual 
ip at the top of that list.



Kamailio 3.2.0
I am trying to setup kamailio to do the sip trunking. It  receive the sip 
traffic from customer and then send it to carrier.
I have two NIC interface's assigned with three IP's:
Interface 1: ( Public IP's)
x.x.130.34
x.x.130.36  floating IP
interface 2: (private IP's)
10.10.1.31

.36 is a floating IP  assigned by Linux-HA (heartbeat/pacemaker).

I only want to use .36 to receive and send sip traffic.
I uses  force_send_socket() to send INVITE with .36 IP.  But the ACK message 
always want to use .34 IP even the Route header has .36 in it unless I force it 
with force_send_socket() .

How can I fix this problem?
See below for the SIP messages: (x.x.128.205 is customer IP, x.x.129.200 is 
PSTN gateway IP)
U x.x.128.205:51694 - x.x.130.36:5060
  INVITE sip:5033441174@x.x.130.36:5060mailto:sip:5033441174@x.x.130.36:5060 
SIP/2.0..Via: SIP/2.0/UDP  x.x.128.205:5060;branch=z9hG
  4bK1D3CD1..From: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;tag=24513088-D59..To:
 sip:5033441174@x.x.130.3mailto:sip:5033441174@x.x.130.3
  6..Date: Tue, 03 Jul 2012 13:37:41 GMT..Call-ID: 
1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20mailto:1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20
  5..Supported: 100rel,timer,replaces..Min-SE:  1800..Cisco-Guid: 
411443261-3293254113-3191264919-256
  0877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, 
CANCEL, ACK, PRACK, CO
  MET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER..CSeq: 101 
INVITE..Max-Forwards: 70..Remote-P
  arty-ID: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;party=calling;screen=no;privacy=off..Timestamp:
 1341322661
  ..Contact: 
sip:5024427578@x.x.128.205:5060mailto:sip:5024427578@x.x.128.205:5060..Expires:
 180..Allow-Events: telephone-event..Conte
  nt-Type: application/sdp..Content-Length: 
366v=0..o=CiscoSystemsSIP-GW-UserAgent 9094 579 IN IP
  4 x.x.128.205..s=SIP Call..c=IN IP4 x.x.128.205..t=0 0..m=audio 19312 RTP/AVP 
125 0 18 100 10
  1..c=IN IP4 x.x.128.205..a=rtpmap:125 X-CCD/8000..a=rtpmap:0 
PCMU/8000..a=rtpmap:18 G729/8000..a
  =fmtp:18 annexb=yes..a=rtpmap:100 X-NSE/8000..a=fmtp:100 
192-194..a=rtpmap:101 telephone-event/8000
  ..a=fmtp:101 0-16..
#
U x.x.130.36:5060 - x.x.128.205:51694
  SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP  
x.x.128.205:5060;branch=z9
  hG4bK1D3CD1;rport=51694..From: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;tag=24513088-D59..To:
 sip:502244117
  4@x.x.130.36mailto:4@x.x.130.36..Call-ID: 
1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseqmailto:1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseq:
 101 INVITE..Se
  rver: LVS Proxy 1.0..Content-Length: 0
#
U x.x.130.36:5060 - x.x.129.200:5060
  INVITE 
sip:15033441174@x.x.129.200:5060mailto:sip:15033441174@x.x.129.200:5060 
SIP/2.0..Record-Route: sip:x.x.130.36;lr=on..Via: S
  IP/2.0/UDP x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0..Via: SIP/2.0/UDP  
x.x.128.205:5060;rport
  =51694;branch=z9hG4bK1D3CD1

[SR-Users] ACK and BYE messages uses wrong socket.

2012-07-03 Thread Gary Chen
Kamailio 3.2.0
I am trying to setup kamailio to do the sip trunking. It  receive the sip 
traffic from customer and then send it to carrier.
I have two NIC interface's assigned with three IP's:
Interface 1: ( Public IP's)
x.x.130.34
x.x.130.36  floating IP
interface 2: (private IP's)
10.10.1.31

.36 is a floating IP  assigned by Linux-HA (heartbeat/pacemaker).

I only want to use .36 to receive and send sip traffic.
I uses  force_send_socket() to send INVITE with .36 IP.  But the ACK message 
always want to use .34 IP even the Route header has .36 in it unless I force it 
with force_send_socket() .

How can I fix this problem?
See below for the SIP messages: (x.x.128.205 is customer IP, x.x.129.200 is 
PSTN gateway IP)
U x.x.128.205:51694 - x.x.130.36:5060
  INVITE sip:5033441174@x.x.130.36:5060 SIP/2.0..Via: SIP/2.0/UDP  
x.x.128.205:5060;branch=z9hG
  4bK1D3CD1..From: sip:5024427578@x.x.128.205;tag=24513088-D59..To: 
sip:5033441174@x.x.130.3
  6..Date: Tue, 03 Jul 2012 13:37:41 GMT..Call-ID: 
1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20
  5..Supported: 100rel,timer,replaces..Min-SE:  1800..Cisco-Guid: 
411443261-3293254113-3191264919-256
  0877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, 
CANCEL, ACK, PRACK, CO
  MET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER..CSeq: 101 
INVITE..Max-Forwards: 70..Remote-P
  arty-ID: 
sip:5024427578@x.x.128.205;party=calling;screen=no;privacy=off..Timestamp: 
1341322661
  ..Contact: sip:5024427578@x.x.128.205:5060..Expires: 180..Allow-Events: 
telephone-event..Conte
  nt-Type: application/sdp..Content-Length: 
366v=0..o=CiscoSystemsSIP-GW-UserAgent 9094 579 IN IP
  4 x.x.128.205..s=SIP Call..c=IN IP4 x.x.128.205..t=0 0..m=audio 19312 RTP/AVP 
125 0 18 100 10
  1..c=IN IP4 x.x.128.205..a=rtpmap:125 X-CCD/8000..a=rtpmap:0 
PCMU/8000..a=rtpmap:18 G729/8000..a
  =fmtp:18 annexb=yes..a=rtpmap:100 X-NSE/8000..a=fmtp:100 
192-194..a=rtpmap:101 telephone-event/8000
  ..a=fmtp:101 0-16..
#
U x.x.130.36:5060 - x.x.128.205:51694
  SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP  
x.x.128.205:5060;branch=z9
  hG4bK1D3CD1;rport=51694..From: 
sip:5024427578@x.x.128.205;tag=24513088-D59..To: sip:502244117
  4@x.x.130.36..Call-ID: 
1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseq: 101 INVITE..Se
  rver: LVS Proxy 1.0..Content-Length: 0
#
U x.x.130.36:5060 - x.x.129.200:5060
  INVITE sip:15033441174@x.x.129.200:5060 SIP/2.0..Record-Route: 
sip:x.x.130.36;lr=on..Via: S
  IP/2.0/UDP x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0..Via: SIP/2.0/UDP  
x.x.128.205:5060;rport
  =51694;branch=z9hG4bK1D3CD1..From: 
sip:5024427578@x.x.128.205;tag=24513088-D59..To: sip:50224
  41174@x.x.130.36..Date: Tue, 03 Jul 2012 13:37:41 GMT..Call-ID: 
1887588D-C44B11E1-BE38D697-98A3
  E39A@x.x.128.205..Supported: 100rel,timer,replaces..Min-SE:  
1800..Cisco-Guid: 411443261-3293254
  113-3191264919-2560877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: 
INVITE, OPTIONS, BYE, CANC
  EL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, 
REGISTER..CSeq: 101 INVITE..Max-Forw
  ards: 69..Remote-Party-ID: 
sip:5024427578@x.x.128.205;party=calling;screen=no;privacy=off..Tim
  estamp: 1341322661..Contact: sip:5024427578@x.x.128.205:51694..Expires: 
180..Allow-Events: tel
  ephone-event..Content-Type: application/sdp..Content-Length: 
375v=0..o=CiscoSystemsSIP-GW-UserA
  gent 9094 579 IN IP4 10.200.1.51..s=SIP Call..c=IN IP4 10.200.1.51..t=0 
0..m=audio 20464 RTP/AVP 12
  5 0 18 100 101..c=IN IP4 10.200.1.51..a=rtpmap:125 X-CCD/8000..a=rtpmap:0 
PCMU/8000..a=rtpmap:18 G7
  29/8000..a=fmtp:18 annexb=yes..a=rtpmap:100 X-NSE/8000..a=fmtp:100 
192-194..a=rtpmap:101 telephone-
  event/8000..a=fmtp:101 0-16..a=nortpproxy:yes..
U x.x.129.200:5060 - x.x.130.36:5060
  SIP/2.0 100 Trying..Via: SIP/2.0/UDP 
x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0,SIP/2.0/UDP  216.4
  9.128.205:5060;rport=51694;branch=z9hG4bK1D3CD1..From: 
sip:5024427578@x.x.128.205;tag=24513088
  -D59..To: sip:5033441174@x.x.130.36;tag=F0695368-74F..Date: Tue, 03 Jul 
2012 13:37:41 GMT..Cal
  l-ID: 1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.205..Timestamp: 
1341322661..Server: Cisco-SIPG
  ateway/IOS-12.x..CSeq: 101 INVITE..Allow-Events: 
telephone-event..Content-Length: 0
#
U x.x.129.200:5060 - x.x.130.36:5060
  SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP 
x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0,SIP/2.0/
  UDP  x.x.128.205:5060;rport=51694;branch=z9hG4bK1D3CD1..From: 
sip:5024427578@x.x.128.205;ta
  g=24513088-D59..To: sip:5033441174@x.x.130.36;tag=F0695368-74F..Date: Tue, 
03 Jul 2012 13:37:4
  1 GMT..Call-ID: 1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.205..Timestamp: 
1341322661..Server:
  Cisco-SIPGateway/IOS-12.x..CSeq: 101 INVITE..Require: 100rel..RSeq: 
6708..Allow: INVITE, OPTIONS, B
  YE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, 
REGISTER..Allow-Events: tele
  phone-event..Contact: sip:15033441174@x.x.129.200:5060..Record-Route: 

Re: [SR-Users] ACK and BYE messages uses wrong socket.

2012-07-03 Thread Gary Chen
Yes, I did the same thing as you mentioned and it still doing the same thing. 
Here is my setup:
mhomed=1
listen=udp:x.x.130.36:5060 # external IP
listen=udp:x.x.130.34:5060 # external IP
listen=udp:10.200.1.31:5060 # internal IP

If I removed .130.34, I got error saying no socket found.

Gary Chen
From: sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Vitaliy Aleksandrov
Sent: Tuesday, July 03, 2012 10:27 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: Re: [SR-Users] ACK and BYE messages uses wrong socket.

Have you specified interfaces with listen command ?
I had a problem as you described and have fixed it by moving a listen directive 
with a floating ip to the top of the list.
So you can try to specify interfaces you will use for SIP and set a virtual 
ip at the top of that list.


Kamailio 3.2.0
I am trying to setup kamailio to do the sip trunking. It  receive the sip 
traffic from customer and then send it to carrier.
I have two NIC interface's assigned with three IP's:
Interface 1: ( Public IP's)
x.x.130.34
x.x.130.36  floating IP
interface 2: (private IP's)
10.10.1.31

.36 is a floating IP  assigned by Linux-HA (heartbeat/pacemaker).

I only want to use .36 to receive and send sip traffic.
I uses  force_send_socket() to send INVITE with .36 IP.  But the ACK message 
always want to use .34 IP even the Route header has .36 in it unless I force it 
with force_send_socket() .

How can I fix this problem?
See below for the SIP messages: (x.x.128.205 is customer IP, x.x.129.200 is 
PSTN gateway IP)
U x.x.128.205:51694 - x.x.130.36:5060
  INVITE sip:5033441174@x.x.130.36:5060mailto:sip:5033441174@x.x.130.36:5060 
SIP/2.0..Via: SIP/2.0/UDP  x.x.128.205:5060;branch=z9hG
  4bK1D3CD1..From: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;tag=24513088-D59..To:
 sip:5033441174@x.x.130.3mailto:sip:5033441174@x.x.130.3
  6..Date: Tue, 03 Jul 2012 13:37:41 GMT..Call-ID: 
1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20mailto:1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20
  5..Supported: 100rel,timer,replaces..Min-SE:  1800..Cisco-Guid: 
411443261-3293254113-3191264919-256
  0877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, 
CANCEL, ACK, PRACK, CO
  MET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER..CSeq: 101 
INVITE..Max-Forwards: 70..Remote-P
  arty-ID: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;party=calling;screen=no;privacy=off..Timestamp:
 1341322661
  ..Contact: 
sip:5024427578@x.x.128.205:5060mailto:sip:5024427578@x.x.128.205:5060..Expires:
 180..Allow-Events: telephone-event..Conte
  nt-Type: application/sdp..Content-Length: 
366v=0..o=CiscoSystemsSIP-GW-UserAgent 9094 579 IN IP
  4 x.x.128.205..s=SIP Call..c=IN IP4 x.x.128.205..t=0 0..m=audio 19312 RTP/AVP 
125 0 18 100 10
  1..c=IN IP4 x.x.128.205..a=rtpmap:125 X-CCD/8000..a=rtpmap:0 
PCMU/8000..a=rtpmap:18 G729/8000..a
  =fmtp:18 annexb=yes..a=rtpmap:100 X-NSE/8000..a=fmtp:100 
192-194..a=rtpmap:101 telephone-event/8000
  ..a=fmtp:101 0-16..
#
U x.x.130.36:5060 - x.x.128.205:51694
  SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP  
x.x.128.205:5060;branch=z9
  hG4bK1D3CD1;rport=51694..From: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;tag=24513088-D59..To:
 sip:502244117
  4@x.x.130.36mailto:4@x.x.130.36..Call-ID: 
1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseqmailto:1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseq:
 101 INVITE..Se
  rver: LVS Proxy 1.0..Content-Length: 0
#
U x.x.130.36:5060 - x.x.129.200:5060
  INVITE 
sip:15033441174@x.x.129.200:5060mailto:sip:15033441174@x.x.129.200:5060 
SIP/2.0..Record-Route: sip:x.x.130.36;lr=on..Via: S
  IP/2.0/UDP x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0..Via: SIP/2.0/UDP  
x.x.128.205:5060;rport
  =51694;branch=z9hG4bK1D3CD1..From: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;tag=24513088-D59..To:
 sip:50224
  41174@x.x.130.36mailto:41174@x.x.130.36..Date: Tue, 03 Jul 2012 13:37:41 
GMT..Call-ID: 1887588D-C44B11E1-BE38D697-98A3
  E39A@x.x.128.205..Supportedmailto:E39A@x.x.128.205..Supported: 
100rel,timer,replaces..Min-SE:  1800..Cisco-Guid: 411443261-3293254
  113-3191264919-2560877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: 
INVITE, OPTIONS, BYE, CANC
  EL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, 
REGISTER..CSeq: 101 INVITE..Max-Forw
  ards: 69..Remote-Party-ID: 
sip:5024427578@x.x.128.205mailto:sip:5024427578@x.x.128.205;party=calling;screen=no;privacy=off..Tim
  estamp: 1341322661..Contact: 
sip:5024427578@x.x.128.205:51694mailto:sip:5024427578@x.x.128.205:51694..Expires:
 180..Allow-Events: tel
  ephone-event..Content-Type: application/sdp..Content-Length: 
375v=0..o=CiscoSystemsSIP-GW-UserA
  gent 9094 579 IN IP4 10.200.1.51..s=SIP Call..c=IN IP4 10.200.1.51..t=0 
0..m=audio 20464 RTP/AVP 12
  5 0 18 100 101..c=IN IP4 10.200.1.51..a=rtpmap:125 X

[SR-Users] Question about using LCR wit multiple gateways

2012-05-09 Thread Gary Chen
Kamilio 3.2.0

I'd like to use one gateway as primary gateway and the another gateway as 
backup for failover.

I could not make it to work. Here is my table entries:
Lcr_gw:
+++-+-+--+--+++---+---++--+---+-+
| id | lcr_id | gw_name | ip_addr   | hostname | port | 
params | uri_scheme | transport | strip | prefix | tag  | flags | defunct |
+++-+-+--+--+++---+---++--+---+-+
|  1 |  2 | gateway1 | 10.10.1.1  | NULL  | 
5060 | NULL |  1 | 0 |  NULL | NULL   | 
NULL | 0 |NULL |
|  2 |  2 | gateway2 | 10.10.1.2  | NULL  | 
5060 | NULL |  1 | 0 |  NULL | NULL   | 
NULL | 0 |NULL |

Lcr_rule:

+---+++--+-+-
| id| lcr_id | prefix | from_uri | stopper | enabled
+---+++--+-+
| 1 |  2 | 1  | NULL |   0 |   1
| 2 |  2 | 011| NULL |   0 |   1
+---+++--+-+

Lcr_rule_target:
+---++-+---+--++
| id| lcr_id | rule_id | gw_id | priority | weight |
+---++-+---+--++
| 1 |  2 |   1| 1 |9 |  1 |
| 2 |  2 |   1 | 2 |8 |  1 |
| 3 |  2 |   2 | 1 |9 |  1 |
| 4 |  2 |   2 | 2 |8 |  1 |

When making call , it only uses the first gateway. If first gateway failed, it 
could not find second gateway.
What is the correct table entry for this to work?

Thanks.

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


[SR-Users] Problem with adding extra field in acc table.

2012-05-04 Thread Gary Chen
I using Mysql DB.
I need to add extra fields in acc table. The field having problem is the last 
one 'account'

Here is my code in kamailio.cfg:
...
modparam(acc,
db_extra,
src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;user_agent=$hdr(User-Agent);account=$var(s:account_number))
...

route {



dp_translate(3, $fU/$avp(s:dst))
$v(s:account_number) = $avp(s:dst);


}

By
looking at the xlog message, $v(s:account_number) has correct value.
But the value in acc table is not always correct. Sometime account field
populated with 0 and sometime it populated with wrong account number.
It seems that $v(s:account_number) sometime corrupted.

Am I doing something wrong?

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


[SR-Users] What is the valid values for flags field in dispatcher table?

2012-02-08 Thread Gary Chen
Trying to figure out the values for flags field. 
where can I find the meaning of flags for each value like: 

flags 1 = ? 
flags 2 = ? 
flags 3 = ? 
flags 4 = ? 
flags 5 = ? 

flags 6 = ? 
flags 7 = ? 
flags 8 = ? 

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


[SR-Users] Download Kamailio Debian package problem.

2011-12-09 Thread Gary Chen
I am trying to download GPG key as following and got connection timeout: 
wget http://deb.kamailio.org/kamailiodebkey.gpg 


It seems that the server is down. 


Where else can I download this same Debian package? 


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


[SR-Users] Questino about dialplan module

2011-06-03 Thread Gary Chen
Kamailio 3.1.2 


I am testing out dialplan module. Every time when I issue 'kamctl dialplan 
show', it shows what is in the database even if I have not yet issue kamctl 
dialplan reload' after I changed data in database. I thought that dialplan is 
stored in the memory and you have to issue the reload before you can see the 
change. Why the ' kamctl dialplan show' display the data directly from mysql 
database? Does that mean that dialplan data is not stored in the memory? 


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] Questino about dialplan module

2011-06-03 Thread Gary Chen
), 1 (str:int), 

2 (int:str), 3 (int:int)) 

- sip-id must be an AoR (username@domain) 

- uuid must be a string but not AoR 




-- command 'alias_db' - manage database aliases 




alias_db show alias .. show alias details 

alias_db list sip-id . list aliases for uri 

alias_db add alias sip-id .. add an alias (*) 

alias_db rm alias  remove an alias (*) 

alias_db help .. help message 

- alias must be an AoR (username@domain) 

- sip-id must be an AoR (username@domain) 




-- command 'domain' - manage local domains 




domain reload ... reload domains from disk 

domain show . show current domains in memory 

domain showdb ... show domains in the database 

domain add domain . add the domain to the database 

domain rm domain .. delete the domain from the database 




-- command 'cisco_restart' - restart CISCO phone (NOTIFY) 




cisco_restart uri  restart phone configured for uri 




-- command 'online' - dump online users from memory 




online . display online users 




-- command 'monitor' - show internal status 




monitor  show server's internal status 




-- command 'ping' - ping a SIP URI (OPTIONS) 




ping uri . ping uri with SIP OPTIONS 




-- command 'ul|alias' - manage user location or aliases 




ul show [username] show in-RAM online users 

ul show --brief. show in-RAM online users in short format 

ul rm username [contact URI] delete user's usrloc entries 

ul add username uri  introduce a permanent usrloc entry 

ul add username uri expires .. introduce a temporary usrloc entry 




-- command 'fifo' 




fifo ... send raw FIFO command 




-- command 'cisco_restart' - restart CISCO phone (NOTIFY) 




cisco_restart uri  restart phone configured for uri 




-- command 'online' - dump online users from memory 




online . display online users 




-- command 'monitor' - show internal status 




monitor  show server's internal status 




-- command 'ping' - ping a SIP URI (OPTIONS) 




ping uri . ping uri with SIP OPTIONS 




-- command 'ul|alias' - manage user location or aliases 




ul show [username] show in-RAM online users 

ul show --brief. show in-RAM online users in short format 

ul rm username [contact URI] delete user's usrloc entries 

ul add username uri  introduce a permanent usrloc entry 

ul add username uri expires .. introduce a temporary usrloc entry 




-Original Message- 
From: sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Juha Heinanen 
Sent: Friday, June 03, 2011 3:50 PM 
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing 
List 
Subject: [SR-Users] Questino about dialplan module 



Gary Chen writes: 



 I am testing out dialplan module. Every time when I issue 'kamctl 

 dialplan show', it shows what is in the database even if I have not 

 yet issue kamctl dialplan reload' after I changed data in database. I 

 thought that dialplan is stored in the memory and you have to issue 

 the reload before you can see the change. Why the ' kamctl dialplan 

 show' display the data directly from mysql database? Does that mean 

 that dialplan data is not stored in the memory? 



there is no mi function to show dialplan rules in memory. i have no 

idea, what 'show' does. please read readme of dialplan module before 

asking questions about the module. 



-- juha 



___ 

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

sr-users@lists.sip-router.org 

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


[SR-Users] Problem using dispatcher.

2011-06-02 Thread Gary Chen
-2c94..Call-ID: 
00082166-efcb0013-692f44d9-6760a...@10.10.1.144..cseq: 101 
INVITE..Server: kamailio (3.1.2 (x86_64/linux))..Content-Length: 0 
# 
U 10.10.1.144:51030 - 10.10.1.230:5060 
ACK sip:1...@fs2000.testnet.net;user=phone SIP/2.0..Via: SIP/2.0/UDP 
10.10.1.144:5060;branch=z9hG4bK116d554d..From 
: Line1 
sip:5022441...@fs2000.testnet.net;tag=00082166efcb002153bc0a31-20004ffd..To: 
sip:1...@fs2000.testnet.ne 
t;user=phone;tag=a6a1c5f60faecf035a1ae5b6e96e979a-2c94..Call-ID: 
00082166-efcb0013-692f44d9-6760a891@10.10.1.144..D 
ate: Thu, 02 Jun 2011 19:14:14 GMT..CSeq: 101 ACK..Content-Length: 0 




Gary Chen ___
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] Problem using dispatcher.

2011-06-02 Thread Gary Chen


Thanks for the quick reply. 

How can I fix this? 

We are using Kamailio as single point of entry for all our phones. Our phones 
all registered with Freeswitch. Kamailio only route the SIP traffic. Is there 
any way I can make Kamailio not treat 407 as failure? 

I also have the same problem with REGISTER messages when Freeswitch reply with 
'401 Unauthorized'. I end up using Forward() instead of t_relay() to make the 
phone1 register with Freeswitch. 




Any suggestion? 



-Original Message- 
From: sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Alex Balashov 
Sent: Thursday, June 02, 2011 3:30 PM 
To: sr-users@lists.sip-router.org 
Subject: Re: [SR-Users] Problem using dispatcher. 



On 06/02/2011 03:26 PM, Gary Chen wrote: 



 the dispatcher always get into FAILURE route although the log shows 

 that kamailio did send INVITE to 10.10.1.222 and received '407 - 

 Proxy Authentication Required' from Freexwitch1 and then dispatcher 

 send INVITE to 10.10.1.223 and also received '407 - Proxy 

 Authentication Required' from Freexwitch2 and eventually failed. 



That's because any reply = 300 is considered a failure. 



-- 

Alex Balashov - Principal 

Evariste Systems LLC 

260 Peachtree Street NW 

Suite 2200 

Atlanta, GA 30303 

Tel: +1-678-954-0670 

Fax: +1-404-961-1892 

Web: http://www.evaristesys.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 ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How to get rid of this error message.

2011-04-29 Thread Gary Chen
I am using  prefix2domain(2) in PDT module like this:
$var(found) = prefix2domain(2);
and I got this error:
ERROR: core [lvalue.c:411]: assignment failed at pos: (701,56-701,56)
Apparently when prefix2domain(2) returns an value to $var(found), it does not 
like it. But it still work.
The $var(found) still contains the return value (-1) if no prefix found. And 
all my configuration is working. It just generate a lot of this kind of error 
in my log file. Am I doing something wrong? How can I fix it?

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] How to get rid of this error message.

2011-04-29 Thread Gary Chen
Thanks.  This fixed error.

Is $rc the same as $retcode ?



Gary

-Original Message-

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

Sent: Friday, April 29, 2011 1:01 PM

To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List

Cc: Gary Chen

Subject: Re: [SR-Users] How to get rid of this error message.



Hello,



On 4/29/11 4:32 PM, Gary Chen wrote:

 I am using  prefix2domain(2) in PDT module like this:

 $var(found) = prefix2domain(2);

 and I got this error:

 ERROR: core [lvalue.c:411]: assignment failed at pos: 

 (701,56-701,56) Apparently when prefix2domain(2) returns an value to 

 $var(found), it does not like it. But it still work.

 The $var(found) still contains the return value (-1) if no prefix 

 found. And all my configuration is working. It just generate a lot of 

 this kind of error in my log file. Am I doing something wrong? How can 

 I fix it?

I will look at it, it might be that the -1 return code is usually 
associated with an error case. Meanwhile try to replace that line with 
the following:



prefix2domain(2);

$var(found) = $rc;



Cheers,

Daniel



--

Daniel-Constantin Mierla

http://www.asipto.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


[SR-Users] Error when using dispatcher module

2011-03-25 Thread Gary Chen
Kamailio 3.1.2
I am using Kamailio in front of Freeswitch as simple sip router. To do 
multi-tenant in Freeswitch I created SIP domain (fs2000.ly.net) and used as sip 
domain inside my sip phone. This domain does not map to any real IP and no 
entry in our DNS server. If I sent the call directly to Freeswitch, it works 
fine and registered with Freeswitch. When I tried to go through Kamailio using 
dispatcher to route the call to freeswitch, I got this error:
ERROR: core [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve 
hostname: fs2000.ly.net

The strange thing is that sometime the call did go through kamailio and 
registered with freeswitch. 
Whenever I restart Kamailio, I got above error and then the error went away by 
itself. Sometime took a minute and sometime took several hours. And sometime 
the error come back without restart.

Does anybody know why? Why dispatcher want to resolve the hostname when it only 
lookup dispatcher for destination IP?

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


[SR-Users] ERROR: failover functions used, but AVPs paraamters required are NULL

2011-02-17 Thread Gary Chen
kamailio version 3.1.2

I am trying to setup dispatcher to use its failover feature. Here is dispatcher 
part of configure file:

loadmodule dispatcher.so

modparam(dispatcher, db_url, DBURL)
modparam(dispatcher, table_name, dispatcher)
modparam(dispatcher, ds_ping_interval, 30)
modparam(dispatcher, ds_probing_threshhold, 10)
modparam(dispatcher, ds_ping_reply_codes, class=2;class=4)
modparam(dispatcher, ds_probing_mode, 1)
modparam(dispatcher, ds_ping_from, sip:lb1 at m-lab-ca805-sig.kd-lab.de)
modparam(dispatcher, dst_avp, $avp(dsdst))
modparam(dispatcher, grp_avp, $avp(dsgrp))
modparam(dispatcher, cnt_avp, $avp(dscnt))
modparam(dispatcher, attrs_avp, $avp(dsattrs))
modparam(dispatcher, dstid_avp, $avp(dsdstid))
modparam(dispatcher, flags, 2)

But it is still give the following error:
0(1917) ERROR: dispatcher [dispatcher.c:624]: failover functions used, but AVPs 
paraamters required are NULL -- feature disabled

Does anybody know why?

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] ERROR: failover functions used, but AVPs paraamters required are NULL

2011-02-17 Thread Gary Chen
Never mind. I used wrong kamailio.cfg file.

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, February 17, 2011 8:51 AM
To: Gary Chen
Cc: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] ERROR: failover functions used, but AVPs paraamters 
required are NULL

 

Hello,

can you send all log messages printed by:

kamailio -E -ddd

Thanks,
Daniel

On 2/17/11 2:42 PM, Gary Chen wrote:

kamailio version 3.1.2

 

I am trying to setup dispatcher to use its failover feature. Here is dispatcher 
part of configure file:

 

loadmodule dispatcher.so

 

modparam(dispatcher, db_url, DBURL)

modparam(dispatcher, table_name, dispatcher)

modparam(dispatcher, ds_ping_interval, 30)

modparam(dispatcher, ds_probing_threshhold, 10)

modparam(dispatcher, ds_ping_reply_codes, class=2;class=4)

modparam(dispatcher, ds_probing_mode, 1)

modparam(dispatcher, ds_ping_from, sip:lb1 at m-lab-ca805-sig.kd-lab.de)

modparam(dispatcher, dst_avp, $avp(dsdst))

modparam(dispatcher, grp_avp, $avp(dsgrp))

modparam(dispatcher, cnt_avp, $avp(dscnt))

modparam(dispatcher, attrs_avp, $avp(dsattrs))

modparam(dispatcher, dstid_avp, $avp(dsdstid))

modparam(dispatcher, flags, 2)

 

But it is still give the following error:

0(1917) ERROR: dispatcher [dispatcher.c:624]: failover functions used, but AVPs 
paraamters required are NULL -- feature disabled

 

Does anybody know why?

 

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



-- 
Daniel-Constantin Mierla
http://www.asipto.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


[SR-Users] Error when tring to load lcr module.

2011-02-15 Thread Gary Chen
I am using Kamailio 3.1.2.
I added lcr module in my kamailio.cfg file. 
After run this: ./kamctl -E I got this error:
 0(23744) ERROR: lcr [lcr_mod.c:1235]: lcr_gw params at row 0 does not start 
with ';' 0
 
I have set up some gateway information in lcr_gw , lcr_rule and 
lcr_rule_target.  From log it seems retrieve all the information but then got 
above error.

Here is my lcr part of config:

loadmodule lcr.so
modparam(lcr, db_url, DBURL)
modparam(lcr, gw_uri_avp, $avp(i:709))
modparam(lcr, ruri_user_avp, $avp(i:500))
modparam(lcr, flags_avp, $avp(i:712))

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