[Freeswitch-dev] mod_radiusclient

Tuyan Özipek tuyanozipek at gmail.com
Fri Jul 20 05:20:30 EDT 2007

Hi all,

Here is a small piece of log from the radius auth module that i wrote.
Just by curiosity, i patched mod_sofia to handle incoming registration
requests with radius.I used freeradius-client library like the
mod_radius_cdr module.Almost all the client configuration is in

I hope i am not duplicating someone else's work.I am planning to
release it after adding a few more features..If someone has a better
idea, some thoughts about a cool feature or anything, i will be happy
to hear that..


freeswitch at gitt> 2007-07-20 04:46:32 [DEBUG] sofia_reg.c:430
sofia_reg_handle_register() Requesting Registration from:
[tuyan at]
2007-07-20 04:46:32 [DEBUG] mod_fradiusclient.c:216
radius_accrequest_digest_function() Sending Digest Request
2007-07-20 04:46:32 [DEBUG] sofia_reg.c:465
sofia_reg_handle_register() Register:
From:    [tuyan at]
Contact: [tuyan <sip:tuyan at>]
Expires: [89]

and from freeradius

rad_recv: Access-Request packet from host port 33676, id=81,
        User-Name = "tuyan"
        Digest-Response = "dded20ab037e670932e15104cd91ec98"
        Digest-Attributes = 0x010a31302e302e302e31
        Digest-Attributes =
        Digest-Attributes = 0x030a5245474953544552
        Digest-Attributes = 0x040e7369703a31302e302e302e31
        Digest-Attributes = 0x06054d4435
        Digest-Attributes = 0x0a07747579616e
        Digest-Attributes = 0x050661757468
        Digest-Attributes = 0x080962353632663666
        Digest-Attributes = 0x090a3030303030303031
        NAS-Port = 0
        NAS-IP-Address =

    rlm_digest: Converting Digest-Attributes to something sane...
        Digest-Realm = ""
        Digest-Nonce = "5cf6d9fe-36a1-11dc-bc0e-97d5ee015bdf"
        Digest-Method = "REGISTER"
        Digest-URI = "sip:"
        Digest-Algorithm = "MD5"
        Digest-User-Name = "tuyan"
        Digest-QOP = "auth"
        Digest-CNonce = "b562f6f"
        Digest-Nonce-Count = "00000001"
A1 = tuyan:
A2 = REGISTER:sip:
H(A1) = 7eeee22e4515abd8631075ce5f548eb9
H(A2) = bde0744e720053a66f505221cfc7202f
KD = 7eeee22e4515abd8631075ce5f548eb9:5cf6d9fe-36a1-11dc-bc0e-97d5ee015bdf:00000001:b562f6f:auth:bde0744e720053a66f505221cfc7202f
EXPECTED dded20ab037e670932e15104cd91ec98
RECEIVED dded20ab037e670932e15104cd91ec98
++[digest] returns ok
Sending Access-Accept of id 81 to port 33676

And the configuration file
<configuration name="radiusclient.conf" description="Radius Client
    <param name="auth_order" value="radius"/>
    <param name="login_tries" value="3"/>
    <param name="dictionary" value="/opt/radiusclient/etc/dictionary.tuyan"/>
    <param name="seqfile" value="/var/run/radius.seq"/>

    <param name="authserver" value=""/>
    <param name="acctserver" value="localhost:1813:testing1234"/>
    <!--<param name="servers"

    <!--<param name="default_realm" value=""/>-->

    <param name="radius_timeout" value="2"/>
    <param name="radius_retries" value="3"/>
    <param name="bindaddr" value=""/>


More information about the Freeswitch-dev mailing list