Hello, Thx already for your first explanation.
I'm going to describe more precisaly what is my purpose and what I need:
About my final project:
On one physical machine, I use 4 virtual machines, which are : one with
kamailio 3.2.3, asterisk 1.6.13, odbc and Siremis 3.2
An other one is a first client in an other virtual subnet as kamailio..
which reprisents the "public network" !
The two others virtual machines are in the same subnet as Kamailio which
represent the "private network"
( like a company and the public network)
So, everything in the private network works well, with TLS, Siremis and
asterisk, perfect communication!
I still need to make the route between the two subnet but this shoud be
easy and
what I need precisly is to make a filter on SDP media managed by Siremis
like:
This is why I need to use the sdpops module of Kamailio, of course.
I need to make the possibilities in Siremis to set things like : this
subnet or this address -> remove this media like application, video , only
audio can be allow !
This is the filter I need to make it work. Of course in Siremis because , I
m simulating calls from public network and into the private network of a
company .
And it as to be user friendly, not spacially for a computer scientist. This
is why, I need to make this simple filter on the media of sdp, and user
friendly in Siremis.
Thank u in advance for your help
Best regards
--
*Grégoire Vandendeurpel, *
*
*
*IT Sector*
Hi,
Where can i find a nice tutorial for routing logic in cfg file for kamailio?
i want help on the basic functions like record_route() , sl_send_reply(),
t_relay() etc...
Regards,
Vineet Menon
Sorry didn't reply to mailing list before. Emails are below.
SHA1 encryption may not encrypt the same way as HA1 (HA1 = MD5 of realm +
username + password), so the problem may be here.
I suggest you store your passwords as clear text in LDAP for testing first.
Reda
On Fri, May 4, 2012 at 11:14 PM, Saul Waizer <saulwaizer(a)gmail.com> wrote:
> with the variations I get different results:
> 4(24126) ERROR: <script>: Password={SHA}v/m3IZiuy+VVizqnt56e2baZsT8=
> 4(24126) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=760 a=17 n=if
> 4(24126) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=756 a=28
> n=pv_www_authenticate
> 4(24126) DEBUG: auth [api.c:95]: auth: digest-algo: MD5 parsed value: 1
> 4(24126) DEBUG: auth [api.c:210]: check_response: Our result =
> '3839aa4cae572f5f8b23601a2bb1178f'
> 4(24126) DEBUG: auth [api.c:220]: check_response: Authorization failed
>
> On Fri, May 4, 2012 at 3:11 PM, Saul Waizer <saulwaizer(a)gmail.com> wrote:
>
>> Also: i used xlog to print out the password and I get the same exact
>> password I have on my LDAP server, so it seems something with the decoding
>>
>>
>> On Fri, May 4, 2012 at 3:01 PM, Saul Waizer <saulwaizer(a)gmail.com> wrote:
>>
>>> Now i got it down to this:
>>>
>>> 2(23003) INFO: <script>: ldap_search: found [1] entries for
>>> (uid=mmiller) 2(23003) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg]
>>> l=759 a=17 n=if
>>> 2(23003) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=755 a=28
>>> n=pv_www_authenticate
>>> 2(23003) DEBUG: auth [api.c:95]: auth: digest-algo: MD5 parsed value: 1
>>> 2(23003) DEBUG: auth [auth_mod.c:455]: HA1 string calculated:
>>> c69622bbd922ec9321ab1293c226b703
>>> 2(23003) DEBUG: auth [api.c:210]: check_response: Our result =
>>> '939676a5591165f1da8ba04562d446b2'
>>> 2(23003) DEBUG: auth [api.c:220]: check_response: Authorization failed
>>> 2(23003) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=756 a=27
>>> n=www_challenge
>>> 2(23003) DEBUG: auth [challenge.c:102]: build_challenge_hf:
>>> realm='23.22.35.43'
>>> 2(23003) DEBUG: auth [challenge.c:244]: auth: 'WWW-Authenticate: Digest
>>> realm="23.22.35.43", nonce="T6Qn/E+kJtAU7IvGh4OLivg7ptLbdida"
>>>
>>> I have changed the values of:
>>>
>>> if (!pv_www_authenticate("$td", "$avp(password)", "0")) {
>>> www_challenge("$td", "0");
>>>
>>> to:
>>>
>>> if (!pv_www_authenticate("$td", "$avp(password)", "1")) {
>>> www_challenge("$td", "0");
>>>
>>> because of the password in LDAP is stored as SHA1, and according to
>>> the docs, it should be 1. I'm so close it seems :)
>>>
>>> *flags* - the value of this parameter can be a bitmask of following:
>>>
>>> -
>>>
>>> *1* - the value of password parameter is HA1 format
>>>
>>>
>>>
>>> On Fri, May 4, 2012 at 2:47 PM, Reda Aouad <reda.aouad(a)gmail.com> wrote:
>>>
>>>> can you also print the avp(s:password) to log to see what its value is?
>>>> use:
>>>> xlog('Password=$avp(s:password)')
>>>> after ldap_search and you'll see its output in the log file
>>>> maybe you're not correctly getting the password from the ldap search
>>>> url, avp(s:password) is then null and you get the error that it can't be
>>>> converted to string
>>>>
>>>> Reda
>>>>
>>>>
>>>>
>>>> On Fri, May 4, 2012 at 8:40 PM, Reda Aouad <reda.aouad(a)gmail.com>wrote:
>>>>
>>>>> in the line
>>>>> if (!pv_www_authenticate("$td", "$avp(password)", "0")) {
>>>>>
>>>>> write avp(s:password) instead of avp(password)
>>>>> not sure it will solve it though.. if it doesn't, maybe others can
>>>>> help you more on this.
>>>>>
>>>>> Reda
>>>>>
>>>>>
>>>>>
>>>>> On Fri, May 4, 2012 at 5:50 PM, Saul Waizer <saulwaizer(a)gmail.com>wrote:
>>>>>
>>>>>> Hello Reda,
>>>>>>
>>>>>> Thank you for your feedback, after some further research and testing
>>>>>> I got the LDAP search working, I am just having one issue with the password
>>>>>> variable:
>>>>>>
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=755
>>>>>> a=28 n=pv_www_authenticate
>>>>>> 3(22487) ERROR: <core> [sr_module.c:1613]: Could not convert PV to
>>>>>> str
>>>>>> 3(22487) ERROR: auth [auth_mod.c:569]: failed to get passwd value
>>>>>>
>>>>>> My relevant configuration:
>>>>>>
>>>>>> route[AUTH] {
>>>>>> #!ifdef WITH_AUTH
>>>>>> if (is_method("REGISTER"))
>>>>>> {
>>>>>> if(is_present_hf("Authorization"))
>>>>>> {
>>>>>> # ldap search
>>>>>>
>>>>>> if
>>>>>> (!ldap_search("ldap://demo/ou=demo,dc=mydomain,dc=com?uid,userPassword?"))
>>>>>>
>>>>>> {
>>>>>> switch ($retcode)
>>>>>> {
>>>>>> case -1:
>>>>>> # no LDAP entry found
>>>>>> sl_send_reply("404", "User Not Found");
>>>>>> exit;
>>>>>> case -2:
>>>>>> # internal error
>>>>>> sl_send_reply("500", "Internal server error");
>>>>>> exit;
>>>>>> default:
>>>>>> exit;
>>>>>> }
>>>>>> }
>>>>>> ldap_result("uid/$avp(s:username)");
>>>>>> ldap_result("userPassword/$avp(s:password)");
>>>>>> xlog("L_INFO", "ldap_search: found [$retcode] entries for
>>>>>> (uid=$fU)");
>>>>>> if (!pv_www_authenticate("$td", "$avp(password)", "0")) {
>>>>>> www_challenge("$td", "1");
>>>>>> exit;
>>>>>> }
>>>>>> sl_send_reply("200", "ok");
>>>>>> exit;
>>>>>> } else {
>>>>>> www_challenge("$td", "1");
>>>>>> exit;
>>>>>> }
>>>>>> } else {
>>>>>>
>>>>>> And the error message:
>>>>>>
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=735
>>>>>> a=26 n=ldap_search
>>>>>> 3(22487) DEBUG: ldap [ldap_api_fn.c:273]: LDAP URL parsed into
>>>>>> session_name [demo], base [ou=demo,dc=mydomain,dc=com], scope [0], filter []
>>>>>> 3(22487) DEBUG: ldap [ldap_api_fn.c:433]: [demo]: performing LDAP
>>>>>> search: dn [ou=demo,dc=mydomain,dc=com], scope [0], filter [(null)],
>>>>>> client_timeout [5000000] usecs
>>>>>> 3(22487) DEBUG: ldap [ldap_api_fn.c:240]: [demo]: [1] LDAP entries
>>>>>> found
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=752
>>>>>> a=26 n=ldap_result
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=753
>>>>>> a=26 n=ldap_result
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=754
>>>>>> a=27 n=xlog
>>>>>> 3(22487) INFO: <script>: ldap_search: found [-1] entries for
>>>>>> (uid=mmiller) 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg]
>>>>>> l=759 a=17 n=if
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=755
>>>>>> a=28 n=pv_www_authenticate
>>>>>> 3(22487) ERROR: <core> [sr_module.c:1613]: Could not convert PV to
>>>>>> str
>>>>>> 3(22487) ERROR: auth [auth_mod.c:569]: failed to get passwd value
>>>>>> 3(22487) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=756
>>>>>> a=27 n=www_challenge
>>>>>> 3(22487) DEBUG: auth [challenge.c:102]: build_challenge_hf:
>>>>>> realm='ip.of.sip.server'
>>>>>> 3(22487) DEBUG: auth [challenge.c:113]: build_challenge_hf:
>>>>>> qop='auth'
>>>>>> 3(22487) DEBUG: auth [challenge.c:244]: auth: 'WWW-Authenticate:
>>>>>> Digest realm="ip.of.sip.server", nonce="T6P5yU+j+J23OE93mPaektZpJszGpt/l",
>>>>>> qop="auth"
>>>>>>
>>>>>> Any help is greatly appreciated!
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, May 3, 2012 at 4:22 PM, Reda Aouad <reda.aouad(a)gmail.com>wrote:
>>>>>>
>>>>>>> Hi Saul,
>>>>>>>
>>>>>>> username_avp_spec was previously a AUTH module parameter to specify
>>>>>>> a variable that was passed to pv_www_authorize implicitly (the function
>>>>>>> doesn't take arguments). Now you should use the new
>>>>>>> pv_www_authenticate and pass to it explicitly the credentials as arguments.
>>>>>>>
>>>>>>> So forget about username_avp_spec since it doesn't exist as module
>>>>>>> param anymore (this is why you are getting the error). Store the result of
>>>>>>> ldap_search in the avps as in the tutorial using ldap_result, and pass them
>>>>>>> to pv_www_authenticate as parameters. pv_www_authenticate takes the
>>>>>>> following arguments:
>>>>>>> - realm: which you can get from "to domain" using $td
>>>>>>> - password: $avp(s:password)
>>>>>>> - flag: set it to 0 as a first test
>>>>>>>
>>>>>>> example:
>>>>>>> pv_www_authorize("$td", "$avp(s:password)", 0)
>>>>>>>
>>>>>>> This function takes the username from the authentication header, so
>>>>>>> no need to pass it anymore as argument.
>>>>>>>
>>>>>>> Reda
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, May 3, 2012 at 8:47 PM, Saul Waizer <saulwaizer(a)gmail.com>wrote:
>>>>>>>
>>>>>>>> Hello List,
>>>>>>>>
>>>>>>>> I am trying to incorporate an existing LDAP directory with our
>>>>>>>> Kamailio installation for SIP authentication. A good friend suggested to
>>>>>>>> checkout this tutorial and adapt it to fit my needs (and current version)
>>>>>>>>
>>>>>>>>
>>>>>>>> http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-auth-ldap
>>>>>>>>
>>>>>>>> It seems like the AUTH module does not contain the function
>>>>>>>> username_spec (which I believe is not used anymore) but the
>>>>>>>> username_avp_spec which is not part of the AUTH module but the H350 module
>>>>>>>> http://kamailio.org/docs/modules/3.2.x/modules_k/h350.html
>>>>>>>>
>>>>>>>> I enabled the h350 module and tried setting the params as described
>>>>>>>> in the documentation:
>>>>>>>>
>>>>>>>> modparam("auth", "username_spec", "$avp(s:username)")
>>>>>>>> modparam("auth", "password_spec", "$avp(s:password)")
>>>>>>>> modparam("auth", "calculate_ha1", 1)
>>>>>>>>
>>>>>>>> I got the following error after checking the configuration:
>>>>>>>>
>>>>>>>> ERROR: <core> [modparam.c:151]: set_mod_param_regex: parameter
>>>>>>>> <username_spec> not found in module <auth>
>>>>>>>>
>>>>>>>> I am running kamailio 3.2.3 (i386/linux) Ubuntu
>>>>>>>>
>>>>>>>> Thank you in advance!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>>>> list
>>>>>>>> sr-users(a)lists.sip-router.org
>>>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Hello,
you have fix_nated_contact() which does an update to contact address:
May 7 15:46:58 localhost /usr/local/sbin/kamailio[15742]: ERROR: ***
cfgtrace: c=[/usr/local/etc/kamailio//kamailio.cfg] l=889 a=25
n=fix_nated_contact
If you want to remove the contact, then do not call that function, or
use the msg_apply_changes() as mentioned previously.
Cheers,
Daniel
On 5/7/12 4:23 PM, Openser Kamailio wrote:
> Hi Daniel,
>
> Please find my log messages in attachments.
> Open my log file with Notepad, it's better.
>
> Thanks!
>
> On Mon, May 7, 2012 at 2:41 PM, Daniel-Constantin Mierla
> <miconda(a)gmail.com <mailto:miconda@gmail.com>> wrote:
>
> Hello,
>
> do you use any other function that updates the address in contact
> header?
>
> If you load debugger module, enable cfgtrace option and send the
> execution log messages over here, we can tell if there is another
> function that may alter contact header.
>
> One option is to use msg_apply_changes() before and after
> remove_hf(), but it is not the optimal way.
>
> Cheers,
> Daniel
>
>
> On 5/7/12 2:13 PM, Openser Kamailio wrote:
>> Hi,
>>
>> I'm currently working with kamailio 3.2. I try to remove the
>> Contact Header field with remove_hf("Contact") through the file
>> named kamailio.cfg.
>> When i apply remove_hf("Contact"), it only removes the word
>> Contact, but the contact address is still present. Let me show you:
>>
>> Without remove_hf:
>> Contact: sip:<20505@sipserver.com:5060
>> <http://20505@sipserver.com:5060>>;.........
>>
>> After remove_hf:
>> sip:<20502@sipserver.com:5060
>> <http://20502@sipserver.com:5060>>;............
>>
>> I want to remove the whole contact address.
>> Thanks for help!
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
>
>
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
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
Hi,
I'm currently working with kamailio 3.2. I try to remove the Contact Header
field with remove_hf("Contact") through the file named kamailio.cfg.
When i apply remove_hf("Contact"), it only removes the word Contact, but
the contact address is still present. Let me show you:
Without remove_hf:
Contact: sip:<20505@sipserver.com:5060>;.........
After remove_hf:
sip:<20502@sipserver.com:5060>;............
I want to remove the whole contact address.
Thanks for help!
I set the PKG_CONFIG_PATH environment variable to /usr/local/lib/pkgconfig
. After that it built fine.
From: Ron McLeod [mailto:ron.kamailio@mcleodnet.com]
Sent: Saturday, May 05, 2012 9:24 PM
To: 'sr-users(a)lists.sip-router.org'
Subject: json and jsonrpc-c
I am trying to build json and jsonrpc-c for kamailio-3.2.3 from a fresh
download of the source tarball but not having success. I modified the
Makefile to include the two modules in the standard package, and remove the
line which excluded them from building. I see the code for the modules in
the source. Also, I have already built and installed the two dependencies
libevent and libjson.
Could someone take a look at the make out and see if there is any indication
of what I might be doing wrong?
http://www.siplabs.net/tracebin/make_and_install_output.txt
Thanks Ron
Hi,
I'm trying to setup Kamailio as a Homer capture server itself.
Kamailio listens on 2 ports : 53 for SIP users, and 9060 for homer SIP
capture.
siptrace module duplicates packets to sipcapture module on port 9060.
I'm getting the following error :
ERROR: siptrace [siptrace.c:1669]: invalid port number; must be in
[1024,65536]
This is my conf
-----------------------
listen=udp:10.238.235.173:53
listen=udp:127.0.0.1:9060
#!ifdef WITH_SIPTRACE
modparam("siptrace", "traced_user_avp", "$avp(s:traced_user)")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", FLD_TRACE)
modparam("siptrace", "duplicate_uri","sip:127.0.0.1:9060")
modparam("siptrace", "hep_mode_on",1);
modparam("siptrace", "trace_to_database", 0);
#!endif
Any help?
Thanks
Reda
I am trying to build json and jsonrpc-c for kamailio-3.2.3 from a fresh
download of the source tarball but not having success. I modified the
Makefile to include the two modules in the standard package, and remove the
line which excluded them from building. I see the code for the modules in
the source. Also, I have already built and installed the two dependencies -
libevent and libjson.
Could someone take a look at the make out and see if there is any indication
of what I might be doing wrong?
http://www.siplabs.net/tracebin/make_and_install_output.txt
Thanks - Ron
I am trying to build json and jsonrpc-c for kamailio-3.2.3 from a fresh
download of the source tarball but not having success. I modified the
Makefile to include the two modules in the standard package, and remove the
line which excluded them from building. I see the code for the modules in
the source. Also, I have already built and installed the two dependencies -
libevent and libjson.
Could someone take a look at the make out and see if there is any indication
of what I might be doing wrong?
http://www.siplabs.net/tracebin/make_and_install_output.txt
Thanks - Ron