[OpenSIPS-Users] OpenSIPS with FreeRadius
Irina Stanescu
ironmissy at gmail.com
Wed Nov 25 16:50:56 CET 2009
I recommend you to read the documentation of the auth_aaa module
http://www.opensips.org/html/docs/modules/devel/auth_aaa.html because you
are not using the aaa_www_authorize function correctly (the realm parameter
is usually "the domain of the host the server is running on").
To find the cause of the seg fault, i need to have a full backtrace from the
core dump.
Regards,
Irina Stanescu
On Wed, Nov 25, 2009 at 3:45 PM, Saeed Akhtar <saeedakhtar.484 at gmail.com>wrote:
>
> Thank you. Now aaa_radius module is there and I've added it in
> configuration file. But now I have a new error. It says:
> Nov 25 17:41:06 [30313] ERROR:aaa_radius:mod_init: radius configuration
> file not set
> Nov 25 17:41:06 [30313] ERROR:core:init_mod: failed to initialize module
> aaa_radius
> Nov 25 17:41:06 [30313] ERROR:core:main: error while initializing modules
>
> So I added:
> modparam("aaa_radius", "radius_config",
> "/etc/radiusclient-ng/radiusclient.conf")
> (ref: http://www.opensips.org/Resources/DocsTutRadius)
>
> and it removed the error.
>
>
> But another problem now:
> I added
> if (!aaa_www_authorize("opensips.org")) {
> www_challenge("opensips.org", "1");
> };
> in my configuration files. Then I ran freeradius and opensips and used
> xlite sip phone to connect to my test server.
> I can see my freeradius that it authenticated my request but my opensips
> just closed with this messages in end:
>
> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: to body ["testdig"<
>> sip:testdig at 192.168.2.18 <sip%3Atestdig at 192.168.2.18>>
>> ]
>> Nov 25 18:36:43 [6494] DBG:uri:has_totag: no totag
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=4000
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: cseq <CSeq>: <1> <REGISTER>
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: content_length=0
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: found end of header
>> Nov 25 18:36:43 [6494] DBG:auth:pre_auth: credentials with given realm not
>> found
>> Nov 25 18:36:43 [6494] DBG:auth:reserve_nonce_index: second= 22,
>> sec_monit= -1, index= 6
>> Nov 25 18:36:43 [6494] DBG:auth:build_auth_hf: nonce index= 6
>> Nov 25 18:36:43 [6494] DBG:auth:build_auth_hf: 'WWW-Authenticate: Digest
>> realm="opensips.org",
>> nonce="4b0d330900000006867ba8b2cfc8135a697ac20566d6e7e6", qop="auth"
>> '
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=ffffffffffffffff
>> Nov 25 18:36:43 [6494] DBG:core:check_ip_address: params 192.168.2.12,
>> 192.168.2.12, 0
>> Nov 25 18:36:43 [6494] DBG:core:destroy_avp_list: destroying list (nil)
>> Nov 25 18:36:43 [6494] DBG:core:receive_msg: cleaning up
>> Nov 25 18:36:43 [6494] DBG:core:parse_msg: SIP Request:
>> Nov 25 18:36:43 [6494] DBG:core:parse_msg: method: <REGISTER>
>> Nov 25 18:36:43 [6494] DBG:core:parse_msg: uri: <sip:192.168.2.18>
>> Nov 25 18:36:43 [6494] DBG:core:parse_msg: version: <SIP/2.0>
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=2
>> Nov 25 18:36:43 [6494] DBG:core:parse_via_param: found param type 232,
>> <branch> = <z9hG4bK-d8754z-08647909f42cfa04-1---d8754z->; state=6
>> Nov 25 18:36:43 [6494] DBG:core:parse_via_param: found param type 235,
>> <rport> = <n/a>; state=17
>> Nov 25 18:36:43 [6494] DBG:core:parse_via: end of header reached, state=5
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: via found, flags=2
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: this is the first via
>> Nov 25 18:36:43 [6494] DBG:core:receive_msg: After parse_msg...
>> Nov 25 18:36:43 [6494] DBG:core:receive_msg: preparing to run routing
>> scripts...
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=100
>> Nov 25 18:36:43 [6494] DBG:maxfwd:is_maxfwd_present: value = 70
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=8
>> Nov 25 18:36:43 [6494] DBG:core:parse_to: end of header reached, state=10
>> Nov 25 18:36:43 [6494] DBG:core:parse_to: display={"testdig"}, ruri={
>> sip:testdig at 192.168.2.18 <sip%3Atestdig at 192.168.2.18>}
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: <To> [37]; uri=[
>> sip:testdig at 192.168.2.18 <sip%3Atestdig at 192.168.2.18>]
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: to body ["testdig"<
>> sip:testdig at 192.168.2.18 <sip%3Atestdig at 192.168.2.18>>
>> ]
>> Nov 25 18:36:43 [6494] DBG:uri:has_totag: no totag
>> Nov 25 18:36:43 [6494] DBG:core:parse_headers: flags=4000
>> Nov 25 18:36:43 [6494] DBG:core:get_hdr_field: cseq <CSeq>: <2> <REGISTER>
>> Nov 25 18:36:43 [6494] DBG:auth:check_nonce: comparing
>> [4b0d330900000006867ba8b2cfc8135a697ac20566d6e7e6] and
>> [4b0d330900000006867ba8b2cfc8135a697ac20566d6e7e6]
>> Segmentation fault (core dumped)
>>
>>
> 1 thing i didn't include in my freeradius users file is:
>
>> SIP-AVP = "sems:ann-account_locked",
>
> and i didn't include following lines in opensips config file too.
>
>> if (!aaa_proxy_authorize("")) { # Realm and URI user will be
>> auto-generated
>> proxy_challenge("", "1");
>> };
>>
> if (!aaa_proxy_authorize("$pd", "$pU")) { # Realm and URI user are taken
>> proxy_challenge("$pd", "1"); # from P-Preferred-Identity
>> };
>
> because it generated some error. (I can't exactly remember it now).
>
> Please someone tell me what i did wrong.
>
> Regards,
>
> Saeed Akhtar
>
>
>
>
> On Wed, Nov 25, 2009 at 5:24 PM, Irina Stanescu <ironmissy at gmail.com>wrote:
>
>> You have to load the aaa_radius module because it provides an
>> implementation for the aaa api used by several other modules.
>> You did not find the aaa_radius.so because the aaa_radius module is not
>> compiled by default.
>> You have to compile it yourself ( using make modules
>> modules=modules/aaa_radius ).
>>
>>
>> Regards,
>>
>> Irina Stanescu
>>
>>
>> On Wed, Nov 25, 2009 at 2:19 PM, Saeed Akhtar <saeedakhtar.484 at gmail.com>wrote:
>>
>>>
>>> Hi,
>>>
>>> Thanks for your reply. First time I tried to load aaa_radius module. I
>>> used following command:
>>> loadmodule "aaa_radius.so"
>>> and it gave me error:
>>> ERROR:core:yyparse: module 'aaa_radius.so' not found in
>>> '/usr/local/lib/opensips/modules/'
>>>
>>> So i thought that may be aaa_radius module is not exactly a module to
>>> load seperatly in opensips. because i couldn't find aaa_radius.so file in my
>>> modules folder.
>>> Now i think i've done some terribly wrong in installing OpenSIPS with
>>> radius access. Can you please help me out to correct it.
>>>
>>> Regards,
>>>
>>> Saeed Akhtar
>>>
>>>
>>>
>>>
>>> On Wed, Nov 25, 2009 at 5:11 PM, Irina Stanescu <ironmissy at gmail.com>wrote:
>>>
>>>> Hi Saeed,
>>>>
>>>> Did you load the aaa_radius module?
>>>>
>>>> Regards,
>>>> Irina Stanescu
>>>>
>>>> On Wed, Nov 25, 2009 at 1:37 PM, Saeed Akhtar <
>>>> saeedakhtar.484 at gmail.com> wrote:
>>>>
>>>>>
>>>>> hi all,
>>>>>
>>>>> i'm trying to connect OpenSIPS with FreeRadius on Ubuntu Server 9.04.
>>>>> I've installed radius client and free radius server and then opensips. and
>>>>> I've following error lines when i run opensips.
>>>>>
>>>>> DBG:core:find_*mod_*export: <aaa_*bind_*api> in module aaa_radius not
>>>>> found
>>>>>
>>>>> ERROR:core:aaa_prot: <aaa_radius> has no bind api function
>>>>>
>>>>> ERROR:acc:init*acc*aaa: AAA protocol bind failure
>>>>>
>>>>> ERROR:acc:mod_init:failed to init radius
>>>>>
>>>>> ERROR:core:init_mod: failed to initialize module acc
>>>>>
>>>>> ERROR:core:main: error while initializeing modules
>>>>> Can someone please help me to resolve this issue
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Saeed Akhtar
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091125/c1b7f348/attachment-0001.htm
More information about the Users
mailing list