Re: [SR-Users] UAC Module

2015-04-29 Thread SamyGo
Hi Jibran,

Here is an old thread as reference:

http://lists.sip-router.org/pipermail/sr-users/2013-August/079336.html

I wouldn't want to do the whole handshake of INVITE,PROXY-AUTH,INVITE with
username/password on a Provider for huge number of calls..imagine sending
thousands of call to that provider and for each call going through the
trouble of exchanging authentication.
Thats why its usually recommended to go with IP-Authentication only. Send
INVITE and Provider says Lets do this call,simple and easy.

>From the configuration perspective this is my idea of still using UAC.

- Call coming from FS on kamailio
- Rewrite the from-uri  (so the provider receives calls from the registered
username)
- modify the to-domain part to contain the IP address of the provider
- set the $du to ip of the provider, and t_relay() the call.
- Most likely the Provider would say Proxy-Auth required..that can be
caught in failure_route[]
- There you can call the uac_auth() function to have username.password
attached to the response of above.
http://kamailio.org/docs/modules/4.3.x/modules/uac.html#uac.f.uac_auth()
- once this function is successful send the INVITE again to the provider.

Last three steps can be the following snippet of code(reference from here
):

failure_route[2] {
 if (t_check_status("40[17]")) {
xlog("got challenged \n");
if (uac_auth()) {
xlog("auth was succesful \n");
t_relay("udp:ip_addr:5060"); //provider's IP_ADDR
}
}



I hope you get IP Auth from the provider, and find the reply useful.

Regards,



On Wed, Apr 29, 2015 at 4:49 PM, Ali Jibran  wrote:

>
> Hi all.
> I have this setup.
> Trunk--->Kamailio>FreeSWITCH
>
> I have a trunk from a sip provided and registered successfully with the
> UAC module. Incoming is working fine. I need to make out going through
> kamailio too.
>
> I have it in the dialplan to forward the invite to kamailio from
> FreeSWITCH. I can see it the logs that it reaches kamailio. Now how do I
> make the call via the trunk?
>
> Basically this is what I'm trying to workout
> FS>kamailio>trunk.
>
>
> Any help will be much appreciated. Thanks.
> AJ
> ___
> 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] UAC Module

2015-04-29 Thread Ali Jibran

Hi all.
I have this setup.
Trunk--->Kamailio>FreeSWITCH

I have a trunk from a sip provided and registered successfully with the UAC 
module. Incoming is working fine. I need to make out going through kamailio too.

I have it in the dialplan to forward the invite to kamailio from FreeSWITCH. I 
can see it the logs that it reaches kamailio. Now how do I make the call via 
the trunk? 

Basically this is what I'm trying to workout
FS>kamailio>trunk.


Any help will be much appreciated. Thanks.
AJ
___
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] issue with TLS and 2 NIC interfaces

2015-04-29 Thread Vik Killa
Hello,
 if i have two interfaces (eth0 and eth0:0)
I set kamailio to listen to the IP on eth0:0
This works great except when I try using TLS, kamailio routes traffic from
eth0:0 to eth0 then to correct destination

It should be just doing eth0:0 -> correct destination

If I use UDP/TCP I am not seeing this behavior.
If I set kamailio to listen to eth0 and remove eth0;0, TLS works fine.

I'm running kamailio compiled from source git master a few days ago.
Is anyone else having this problem?
I'm wondering if it's a bug.
Thanks,
V
___
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] sht_rm_name_re() question

2015-04-29 Thread Yufei Tao
Hi

I've hit a problem with sht_rm_name_re() in htable module. I was calling it
like this:

sht_rm_name_re("Dlg=>$var(callid)::tenant");

But when I used sipp to generate 600 concurrent calls for example, I called
this function when receiving BYE. But it removed more entries than it
should. Seems when removing removing some entry with callid
1-3798@192.168.60.80, it also removed entries for [1-9]1-3798@192.168.60.80.


How do I add '^' in front and '$' at the end of the regexp string when
calling this function please? Here I don't really need regexp in fact, just
want to do an exact match. But I didn't find any other functions for
deleting entries.

Thank you!
Yufei
___
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] Running Kamailio with IMS

2015-04-29 Thread Mihail Dakov

Hi Abdul,

I followed this tutorial: https://loadmultiplier.com/node/76 and the 
configuration is the same but ips, ports and aliases. Have you tried that?


br,
m.dakov

On 04/29/2015 04:07 PM, Abdul Hakeem wrote:

Mihail,
Are you able to share your configurations for each of the  elements (P-CSCF,
S-CSCF and I-CSCF) ?

Cheers,
Abdul Hakeem

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Mihail Dakov
Sent: Wednesday, April 29, 2015 1:03 PM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Running Kamailio with IMS

Hi All,

I solved the issue by compiling kamailio from src and running different
instances for each component P-CSCF, S-CSCF, and I-CSCF with different
configuration respectively.

Thank you all for the support.

On 04/29/2015 12:04 PM, Daniel-Constantin Mierla wrote:

Hello,

On 29/04/15 10:06, Mihail Dakov wrote:

Hi all,

I am trying to run Kamailio server with IMS modules for which I have
gone through the following tutorials:



http://nil.uniza.sk/ngnims/kamailio-ims/preparing-debian-operating-system-kamail
io-4x-platform



http://www.kamailio.org/wiki/tutorials/ims/installation-howto

The problem I have is that using 'service kamailio start' I can only
run one IMS component, say PCSCF. But I need to run all P/S/I-CSCFs.
How do I proceed to get running P/S/I-CSCF on the same machine with
kamailio?

you can run multiple instances of kamailio on the same system, just use
different ports for each instance. Or, if you can allocate many IP
addresses to the system, you can run one per IP. Just specify the ip and
port to listen on via global parameter:

listen=1.2.3.4:5080

If you questions is about combining all those configs, perhaps is
possible, but not something I can assist with.

Cheers,
Daniel



___
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] Running Kamailio with IMS

2015-04-29 Thread Abdul Hakeem
Mihail,
Are you able to share your configurations for each of the  elements (P-CSCF,
S-CSCF and I-CSCF) ?

Cheers,
Abdul Hakeem

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Mihail Dakov
Sent: Wednesday, April 29, 2015 1:03 PM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Running Kamailio with IMS

Hi All,

I solved the issue by compiling kamailio from src and running different
instances for each component P-CSCF, S-CSCF, and I-CSCF with different
configuration respectively.

Thank you all for the support.

On 04/29/2015 12:04 PM, Daniel-Constantin Mierla wrote:
> Hello,
>
> On 29/04/15 10:06, Mihail Dakov wrote:
>> Hi all,
>>
>> I am trying to run Kamailio server with IMS modules for which I have
>> gone through the following tutorials:
>>
>>
http://nil.uniza.sk/ngnims/kamailio-ims/preparing-debian-operating-system-kamail
io-4x-platform
>>
>>
>> http://www.kamailio.org/wiki/tutorials/ims/installation-howto
>>
>> The problem I have is that using 'service kamailio start' I can only
>> run one IMS component, say PCSCF. But I need to run all P/S/I-CSCFs.
>> How do I proceed to get running P/S/I-CSCF on the same machine with
>> kamailio?
> you can run multiple instances of kamailio on the same system, just use
> different ports for each instance. Or, if you can allocate many IP
> addresses to the system, you can run one per IP. Just specify the ip and
> port to listen on via global parameter:
>
> listen=1.2.3.4:5080
>
> If you questions is about combining all those configs, perhaps is
> possible, but not something I can assist with.
>
> Cheers,
> Daniel
>

___
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] [SR_USers] Authenticate asterisk-kamailio

2015-04-29 Thread Mauricio Tejeda
Hello All.

My English is bad so I hope you can understand.

 

I have been working with Kamailio some time, I following some of Guides of
http://kb.asipto.com, http://saevolgo.blogspot.com and http://nil.uniza.sk.

 

To Authenticate Asterisk sipusers I'm not have problems, but subscriber of
Kamailio  authenticate is my problem.

Autenticate are denied to subscriber Kamailio.

 

In spanish I can explain it better  :-) 

 

best regards

 

 

my Settings:

 

###

# - auth_db params -

#!ifdef WITH_AUTH

modparam("auth_db", "calculate_ha1", yes)

modparam("auth_db", "load_credentials", "")

 

#!ifdef WITH_ASTERISK

modparam("auth_db", "user_column", "name")

modparam("auth_db", "password_column", "sippasswd")

modparam("auth_db", "db_url", DBASTURL)

modparam("auth_db", "version_table", 0)

#!else

modparam("auth_db", "db_url", DBURL)

modparam("auth_db", "password_column", "password")

modparam("auth_db", "use_domain", MULTIDOMAIN)

#!endif

 



 

#!ifdef WITH_AUTH

 

#!ifdef WITH_ASTERISK

# do not auth traffic from Asterisk - trusted!

if(route(FROMASTERISK))

   return;

#!endif

 

#!ifdef WITH_IPAUTH

if((!is_method("REGISTER")) && allow_source_address())

{

   # source IP allowed

   return;

}

#!endif

 

if (is_method("REGISTER") || from_uri==myself)

{

   # authenticate requests

#!ifdef WITH_ASTERISK

   if (!auth_check("$fd", "sipusers", "1")) {
 Aquí autentifica sin problemas en caso de ser un usuario asterisk

#!else
 Pero hace caso omiso al switch.

   if (!auth_check("$fd", "subscriber", "1")) {
 No autentifica subscriber de la base de datos de kamailio

#!endif

   auth_challenge("$fd", "0");

   exit;

   }

   # user authenticated - remove auth header

   if(!is_method("REGISTER|PUBLISH"))

   consume_credentials();

}

#!endif

return;

}

 

#

 

DEBUG KAMAILIO

 

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:623]: parse_msg(): SIP Request:

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:625]: parse_msg():  method:  

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:627]: parse_msg():  uri: 

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:629]: parse_msg():  version: 

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_addr_spec.c:898]: parse_addr_spec(): end of header reached,
state=10

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field:  [29];
uri=[sip:107@192.168.65.132]

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body
[107#015#012]

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_via.c:1284]: parse_via_param(): Found param type 232, 
= ; state=6

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_via.c:1284]: parse_via_param(): Found param type 235, 
= ; state=17

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_via.c:2672]: parse_via(): end of header reached, state=5

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found,
flags=2

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first
via

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG:  [receive.c:154]:
receive_msg(): After parse_msg...

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG:  [receive.c:197]:
receive_msg(): preparing to run routing scripts...

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq : <1>


Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: maxfwd [mf_funcs.c:85]:
is_maxfwd_present(): value = 70

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:204]: get_hdr_field(): DEBUG: get_hdr_body :
content_length=0

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/msg_parser.c:106]: get_hdr_field(): found end of header

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param:
tag=306ac106

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: 
[parser/parse_addr_spec.c:898]: parse_addr_spec(): end of header reached,
state=29

Apr 29 10:40:48 labkamailio kamailio[11304]: DEBUG: sanity
[mod_san

Re: [SR-Users] Measuring subscriber latency

2015-04-29 Thread Sven Neuhaus
Am 29.04.2015 um 10:21 schrieb Olle E. Johansson:
> On 29 Apr 2015, at 10:04, Daniel-Constantin Mierla  wrote:
>> it looks like you are the first wanting this, or at least the first that
>> has expressed it.
> As Jon said, this is a feature that has been in Asterisk for a very long time 
> and 
> we need in Kamailio. I think many of us has looked for it, but never mailed 
> about
> it since we still have Asterisk in there. Since Kamailio has grown so much and
> we now can build Asterisk-free solutions, I think this would be a valuable 
> feature
> both for dispatcher and for usrloc.

Agreed, this is a nice feature to have.

-Sven




signature.asc
Description: OpenPGP digital signature
___
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 with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov


The Tag column size is 64. If I make this larger in the database, will 
it be truncated once it is loaded into memory?


According to modules source code Tag's max size is hardcoded and will be 
truncated. But this is not a bit problem. You can keep capabilities list 
in htable and only put a key for this htable info to the tag.


Through which list do I need to iterate? You mentioned the data is 
stored in a hash table, what is the name of this hash table?



load_gws() creates a list of gateways and next_gw() fetches them one by one.
After calling load_gws() you can just call next_gw() which puts gateways 
tag to the "tag_avp". If current gateway doesn't have requested 
capabilities just call next_gw() again.


Basically for each call I need to call the load_gws() function, which 
is O(N) * O(M).


What if I take a different approach and call a stored procedure (for 
each call) which does the selection of a gateway based on the supplied 
criteria.


Of course the tables would be optimized with indices for the best 
possible performance.


When comparing load_gws() (O(N) * O(M)) with the stored procedure 
approach, would there be a huge performance loss when taking the 
stored procedure approach?



Who knows.. You can test it and share results with community :)


I know this approach brings a whole new set of problem with 
availability and the loss of features, but for now I’m only interested 
in the performance aspect of both methods.


Actually going this way you don't need LCR module at all. You can call 
stored procedure, lua/python/perl/... script, or request an external 
system using radius/xmlrpc. But be careful making blocking operations 
from a script or have enough number of kamailio processes.


___
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] Running Kamailio with IMS

2015-04-29 Thread Mihail Dakov

Hi All,

I solved the issue by compiling kamailio from src and running different 
instances for each component P-CSCF, S-CSCF, and I-CSCF with different 
configuration respectively.


Thank you all for the support.

On 04/29/2015 12:04 PM, Daniel-Constantin Mierla wrote:

Hello,

On 29/04/15 10:06, Mihail Dakov wrote:

Hi all,

I am trying to run Kamailio server with IMS modules for which I have
gone through the following tutorials:

http://nil.uniza.sk/ngnims/kamailio-ims/preparing-debian-operating-system-kamailio-4x-platform


http://www.kamailio.org/wiki/tutorials/ims/installation-howto

The problem I have is that using 'service kamailio start' I can only
run one IMS component, say PCSCF. But I need to run all P/S/I-CSCFs.
How do I proceed to get running P/S/I-CSCF on the same machine with
kamailio?

you can run multiple instances of kamailio on the same system, just use
different ports for each instance. Or, if you can allocate many IP
addresses to the system, you can run one per IP. Just specify the ip and
port to listen on via global parameter:

listen=1.2.3.4:5080

If you questions is about combining all those configs, perhaps is
possible, but not something I can assist with.

Cheers,
Daniel



___
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 with gateway capabilities

2015-04-29 Thread Grant Bagdasarian
The Tag column size is 64. If I make this larger in the database, will it be 
truncated once it is loaded into memory?
Through which list do I need to iterate? You mentioned the data is stored in a 
hash table, what is the name of this hash table?

Basically for each call I need to call the load_gws() function, which is O(N) * 
O(M).
What if I take a different approach and call a stored procedure (for each call) 
which does the selection of a gateway based on the supplied criteria.
Of course the tables would be optimized with indices for the best possible 
performance.

When comparing load_gws() (O(N) * O(M)) with the stored procedure approach, 
would there be a huge performance loss when taking the stored procedure 
approach?
I know this approach brings a whole new set of problem with availability and 
the loss of features, but for now I'm only interested in the performance aspect 
of both methods.

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 12:27 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities


On 29/04/15 12:34, Grant Bagdasarian wrote:
That sounds possible! Thanks.

That does this description mean: "Execution time of load_gws() function is O(N) 
* O(M), where N is number of different prefix lengths and M is number of 
collisions for matching prefix(es) in lcr rules hash table of the LCR 
instance."?

Does this mean it loads the data from its internal memory or does it load the 
data from the database again?
load_gws() prepares an ordered list of gateways for current destination. It 
loads data only from internal in-memory gateways db (hash table).

How fast does it select a gateway after load_gws using next_gw()? Is it O(N) 
again?
O(1) since load_gws already prepared ordered (by price) list and next_gw() only 
takes next gw in a list.


What about multiple combinations of capabilities? For example caller id 
spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.
Wouldn't this cause the data to grow exponentially?
It would.

Another idea:
You can also have only one lcr instance and keep gateways capabilities in the 
tag field (serialized somehow). Then you can just iterate through a list 
generated by load_gws() skipping gateways which don't match your criteria and 
in the end a call will be routed to the cheapest gateway with proper 
capabilities.


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 10:36 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different "lcr_id".
The first one can use only gateways with requested capabilities and the second 
one all gateways.
Then you can make a decision about which instance to use during call routing 
process providing this lcr_id to load_gws() function.



Hello,

>From what I understand about the LCR module is that the rules have to be 
>prioritized by the admin, be it manually or automatically by an application.

Let's say the LCR database has 10 gateways, each with their own rules etc.
4 of these gateways support caller id spoofing and the others don't.
But the other 6 are cheaper and Kamailio has to route a call using a gateway 
which support caller id spoofing and is the cheapest of the 4.

Would it be possible to tell the LCR module to select a gateway based on 
certain capabilities and is the cheapest of the ones which support a certain 
capability?







___

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] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov



On 29/04/15 12:34, Grant Bagdasarian wrote:


That sounds possible! Thanks.

That does this description mean: “Execution time of load_gws() 
function is O(N) * O(M), where N is number of different prefix lengths 
and M is number of collisions for matching prefix(es) in lcr rules 
hash table of the LCR instance.”?


Does this mean it loads the data from its internal memory or does it 
load the data from the database again?


load_gws() prepares an ordered list of gateways for current destination. 
It loads data only from internal in-memory gateways db (hash table).


How fast does it select a gateway after load_gws using next_gw()? Is 
it O(N) again?


O(1) since load_gws already prepared ordered (by price) list and 
next_gw() only takes next gw in a list.


What about multiple combinations of capabilities? For example caller 
id spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.


Wouldn’t this cause the data to grow exponentially?


It would.

Another idea:
You can also have only one lcr instance and keep gateways capabilities 
in the tag field (serialized somehow). Then you can just iterate through 
a list generated by load_gws() skipping gateways which don't match your 
criteria and in the end a call will be routed to the cheapest gateway 
with proper capabilities.


*From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
Behalf Of *Vitaliy Aleksandrov

*Sent:* Wednesday, April 29, 2015 10:36 AM
*To:* sr-users@lists.sip-router.org
*Subject:* Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different "lcr_id".
The first one can use only gateways with requested capabilities and 
the second one all gateways.
Then you can make a decision about which instance to use during call 
routing process providing this lcr_id to load_gws() function.



Hello,

From what I understand about the LCR module is that the rules have
to be prioritized by the admin, be it manually or automatically by
an application.

Let’s say the LCR database has 10 gateways, each with their own
rules etc.

4 of these gateways support caller id spoofing and the others don’t.

But the other 6 are cheaper and Kamailio has to route a call using
a gateway which support caller id spoofing and is the cheapest of
the 4.

Would it be possible to tell the LCR module to select a gateway
based on certain capabilities and is the cheapest of the ones
which support a certain capability?




___

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] Running Kamailio with IMS

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

On 29/04/15 10:06, Mihail Dakov wrote:
> Hi all,
>
> I am trying to run Kamailio server with IMS modules for which I have
> gone through the following tutorials:
>
> http://nil.uniza.sk/ngnims/kamailio-ims/preparing-debian-operating-system-kamailio-4x-platform
>
>
> http://www.kamailio.org/wiki/tutorials/ims/installation-howto
>
> The problem I have is that using 'service kamailio start' I can only
> run one IMS component, say PCSCF. But I need to run all P/S/I-CSCFs.
> How do I proceed to get running P/S/I-CSCF on the same machine with
> kamailio?
you can run multiple instances of kamailio on the same system, just use
different ports for each instance. Or, if you can allocate many IP
addresses to the system, you can run one per IP. Just specify the ip and
port to listen on via global parameter:

listen=1.2.3.4:5080

If you questions is about combining all those configs, perhaps is
possible, but not something I can assist with.

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] LCR with gateway capabilities

2015-04-29 Thread Grant Bagdasarian
That sounds possible! Thanks.

That does this description mean: "Execution time of load_gws() function is O(N) 
* O(M), where N is number of different prefix lengths and M is number of 
collisions for matching prefix(es) in lcr rules hash table of the LCR 
instance."?

Does this mean it loads the data from its internal memory or does it load the 
data from the database again?
How fast does it select a gateway after load_gws using next_gw()? Is it O(N) 
again?

What about multiple combinations of capabilities? For example caller id 
spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.
Wouldn't this cause the data to grow exponentially?

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 10:36 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different "lcr_id".
The first one can use only gateways with requested capabilities and the second 
one all gateways.
Then you can make a decision about which instance to use during call routing 
process providing this lcr_id to load_gws() function.


Hello,

>From what I understand about the LCR module is that the rules have to be 
>prioritized by the admin, be it manually or automatically by an application.

Let's say the LCR database has 10 gateways, each with their own rules etc.
4 of these gateways support caller id spoofing and the others don't.
But the other 6 are cheaper and Kamailio has to route a call using a gateway 
which support caller id spoofing and is the cheapest of the 4.

Would it be possible to tell the LCR module to select a gateway based on 
certain capabilities and is the cheapest of the ones which support a certain 
capability?






___

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 with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov

What about configuring two LCR instances with different "lcr_id".
The first one can use only gateways with requested capabilities and the 
second one all gateways.
Then you can make a decision about which instance to use during call 
routing process providing this lcr_id to load_gws() function.



Hello,

From what I understand about the LCR module is that the rules have to 
be prioritized by the admin, be it manually or automatically by an 
application.


Let’s say the LCR database has 10 gateways, each with their own rules 
etc.


4 of these gateways support caller id spoofing and the others don’t.

But the other 6 are cheaper and Kamailio has to route a call using a 
gateway which support caller id spoofing and is the cheapest of the 4.


Would it be possible to tell the LCR module to select a gateway based 
on certain capabilities and is the cheapest of the ones which support 
a certain capability?




___
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] Measuring subscriber latency

2015-04-29 Thread Olle E. Johansson

On 29 Apr 2015, at 10:04, Daniel-Constantin Mierla  wrote:

> Hello,
> 
> On 28/04/15 20:42, Jon Bonilla (Manwe) wrote:
>> Hi all
>> 
>> I'm replacing an Asterisk based system with a kamailio based one. One of the
>> features the legacy system has is showing the subscriber the latency obtained
>> from the qualify option of sip.conf
>> 
>> Now, I'd like to measure the latency but I'm not sure how to do it. AFAIK
>> nathelper module sends the OPTIONS keepalive messages stateless mode and
>> there's no information there. 
>> 
>> I was thinking on triggering a route send_options via the timer module, save
>> the timestamp of the relay and the timestamp of the response in onreply_route
>> but it doesn't look elegant. Creating my own daemon in an external server and
>> reading the info from the location module seems to be another option.
>> 
>> I guess I'm not the first one with this need so I wonder if there's an 
>> already
>> existing solution or an elegant way of dealing with it. 
>> 
>> 
>> any ideas?
>> 
> it looks like you are the first wanting this, or at least the first that
> has expressed it.
As Jon said, this is a feature that has been in Asterisk for a very long time 
and 
we need in Kamailio. I think many of us has looked for it, but never mailed 
about
it since we still have Asterisk in there. Since Kamailio has grown so much and
we now can build Asterisk-free solutions, I think this would be a valuable 
feature
both for dispatcher and for usrloc.

/O
> 
> It might not be hard to code it in c, it will require to extend the
> usrloc structure to have with two timestamps, one to be set when sending
> the options and one when receiving the reply. At this moment there is
> only one timestamp when the reply is received, see the function
> ul_refresh_keepalive() from usrloc, the field in ucontact_t structure is
> last_keepalive. So half is done more or less.
> 
> You can open a feature request on tracker and probably will get into
> 4.4. The development for 4.3 is frozen.
> 
> 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


___
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 with gateway capabilities

2015-04-29 Thread Grant Bagdasarian
Hello,

>From what I understand about the LCR module is that the rules have to be 
>prioritized by the admin, be it manually or automatically by an application.

Let's say the LCR database has 10 gateways, each with their own rules etc.
4 of these gateways support caller id spoofing and the others don't.
But the other 6 are cheaper and Kamailio has to route a call using a gateway 
which support caller id spoofing and is the cheapest of the 4.

Would it be possible to tell the LCR module to select a gateway based on 
certain capabilities and is the cheapest of the ones which support a certain 
capability?


___
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] Running Kamailio with IMS

2015-04-29 Thread Mihail Dakov

Hi all,

I am trying to run Kamailio server with IMS modules for which I have 
gone through the following tutorials:


http://nil.uniza.sk/ngnims/kamailio-ims/preparing-debian-operating-system-kamailio-4x-platform

http://www.kamailio.org/wiki/tutorials/ims/installation-howto

The problem I have is that using 'service kamailio start' I can only run 
one IMS component, say PCSCF. But I need to run all P/S/I-CSCFs. How do 
I proceed to get running P/S/I-CSCF on the same machine with kamailio?


br,

m.dakov

___
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] Measuring subscriber latency

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

On 28/04/15 20:42, Jon Bonilla (Manwe) wrote:
> Hi all
>
> I'm replacing an Asterisk based system with a kamailio based one. One of the
> features the legacy system has is showing the subscriber the latency obtained
> from the qualify option of sip.conf
>
> Now, I'd like to measure the latency but I'm not sure how to do it. AFAIK
> nathelper module sends the OPTIONS keepalive messages stateless mode and
> there's no information there. 
>
> I was thinking on triggering a route send_options via the timer module, save
> the timestamp of the relay and the timestamp of the response in onreply_route
> but it doesn't look elegant. Creating my own daemon in an external server and
> reading the info from the location module seems to be another option.
>
> I guess I'm not the first one with this need so I wonder if there's an already
> existing solution or an elegant way of dealing with it. 
>
>
> any ideas?
>
it looks like you are the first wanting this, or at least the first that
has expressed it.

It might not be hard to code it in c, it will require to extend the
usrloc structure to have with two timestamps, one to be set when sending
the options and one when receiving the reply. At this moment there is
only one timestamp when the reply is received, see the function
ul_refresh_keepalive() from usrloc, the field in ucontact_t structure is
last_keepalive. So half is done more or less.

You can open a feature request on tracker and probably will get into
4.4. The development for 4.3 is frozen.

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] 2 phones behind same NAT, Kamailio on Pub IP One Way Audio

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

if both phones are behind same nat and no nat processing enabled in
kamailio.cfg, the audio should work fine. Be sure there is no ALG in
your nat router or firewall. The best is to look at singaling, on the
server you can use:

ngrep -d any -qt -W byline "sip" port 5060

If the phones are behind nat, you need to enable nat traversal in
kamailio config by defining WITH_NAT, install it and configure to listen
for control commands on the socket specified to rtpproxy kamailio module
parameters (see the comments at the top of default kamailio.cfg).


Cheers,
Daniel

On 29/04/15 05:03, Todd R. wrote:
> This is my first go round' with Kamailio but I have been messing with
> it off and on for a few weeks.
>
> Running latest version on latest CentOS 7.x.
>
> Kamailio installed on VM with public IP in one location, 2 SIP phones
> behind same NAT, both registered to Kamailio fine.
>
> I can call one phone to the other and it rings and I can answer it but
> get one way audio most of the time, sometimes no audio at all.
>
> I just did a standard install with MySQL and no other modules.
>
> What am I missing, do I need RTPPROXY? Will Kamailio allow extension
> to extension calls from/to phones behind NATS without any additional
> modules?
>
> I tried installing it with yum, it installed but it won't start. If I
> need it, I will remove the YUM version and install from source or GIT
> or some other method.
>
> I do NOT want any media passing through this server, that's one big
> reason I am learning something OTHER than Asterisk which I am very
> familiar with.
>
> I see all these RTP modules, music on hold etc but I specifically
> don't want to install anything that causes media to pass through the box.
>
> Finding the learning curve much steeper than Asterisk back in the day
> and a REALLY tough time find step by step examples to get started,
> especially on CentOS.
>
> I bought the draft of the book and it will be a great resource but at
> the moment, it's not helping me get started or get my first instance
> up and running.
>
> I need to add SIP trunks to originate and terminate calls but I can't
> even think about that since I can't even get audio on extension to
> extension calls yet.
>
> I also see that Kamailio fails to startup at boot because it can't
> connect to MySQL, when I restart Kamailio it starts fine. I think the
> issue is that Kamailio is trying to start before MySQL is up and
> running, I guess I can do a delayed start of Kamailio to fix that later.
>
> Any help would be appreciate by this NEWB.
>
> Thanks in advance for any assistance.
>
>
> ___
> 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://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