Hi Ovidiu,

Thank you for reply.

This is from my dictionary file:

ATTRIBUTE       Source-Port            215     string


I convert to string in route where I do some other transformations

$avp(s:testport)  = $sp;

Modified in accounting: Source-IP=$avp(s:testport); \

It still throws the error in the log..

So just for kicks I changed in my dictionary:

ATTRIBUTE       Source-Port            215     integer

Now it writes 5060 into radacct but the error still appears in the log:

Thu Mar 25 06:55:29 2010 : Error: rlm_radutmp: NAS OpenSER port 5060 unknown packet type 15)

Very very odd.

I tried to use avp to convert to integer 
$avp(i:testport)  = $sp;

Source-IP=(i:testport)
but I think I do this incorrectly. Kamailio wouldn't start:

Mar 25 06:28:10 [9972] ERROR:core:parse_avp_name: invalid ID <testport> not a number
Mar 25 06:28:10 [9972] ERROR:pv:pv_parse_avp_name: bad avp name [testport]
Mar 25 06:28:10 [9972] ERROR:core:pv_parse_spec: pvar "avp" has an invalid name param [testport]
Mar 25 06:28:10 [9972] ERROR:core:pv_parse_spec: wrong char [)/41] in [$avp(i:testport)] at [15 (5)]
Mar 25 06:28:10 [9972] CRITICAL:core:yyerror: parse error in config file, line 564, column 22-38: unknown script variable
Mar 25 06:28:10 [9972] ERROR:core:main: bad config file (1 errors)



Thanks,
Stephen.

On 24 March 2010 21:08, Ovidiu Sas <osas@voipembedded.com> wrote:
It seems to be a type mismatch.  You are trying to push an int into a
a string or viceversa.
Try to use transformations (to  translate from int into a str) and see
if that works out ok.


Regards,
Ovidiu Sas

On Wed, Mar 24, 2010 at 4:50 PM, dotnetdub <dotnetdub@gmail.com> wrote:
> Hi,
> I'm using Kamailio - posted this to the opensips list as I thought I may get
> support from the ag guys but nothing..
> Has anyone else experienced this or have an idea as to what it may be?
>
>
>
> Having a very small but annoying issue with Radius Accounting.
> Everything is getting written fine except for 'Source-Port'
> This appears in radius.log everytime a record is written/updated. - Error:
> rlm_radutmp: NAS OpenSER port 5060 unknown packet type 15
> It's writing this into the text files and value to the radacct table:
> Source-Port = "\304\023"
> All other information is being written correctly.
> CDRTool version: 7.0
> Freeradius version: 1.1.7-4
> mediaproxy version: 2.3.10
> Kamailio Version: 1.5.3
> Using the dictionary files that ship with CDRTool
> From accounting:
> modparam("acc", "db_url", "mysql://openser:XXXXXXXXXXXX@localhost/openser")
> modparam("acc", "db_flag", 2)
> modparam("acc", "log_flag", 2)
> modparam("acc", "db_missed_flag", 3)
> modparam("acc", "radius_config", "/etc/radiusclient-ng/radiusclient.conf")
> modparam("acc", "radius_flag", 2)
> modparam("acc", "radius_missed_flag", 3)
> modparam("acc", "radius_extra", "User-Name=$Au; \
>                 Calling-Station-Id=$from; \
>                 Called-Station-Id=$to; \
>                 Sip-Translated-Request-URI=$avp(s:translated_uri); \
>                 Sip-RPid=$avp(s:rpid); \
>                 Source-IP=$si; \
>                 Source-Port=$sp; \
>                 Canonical-URI=$avp(s:can_uri); \
>                 Billing-Party=$avp(s:billing_party); \
>                 Divert-Reason=$avp(s:divert_reason); \
>                 X-RTP-Stat=$hdr(X-RTP-Stat); \
>                 Contact=$hdr(contact); \
>                 Event=$hdr(event); \
>                 SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>                 ENUM-TLD=$avp(s:enum_tld)")
>
> Obviously it's not a show stopper but it's just bugging the hell out of me
> :)
> If any more info is required please let me know and I will provide ASAP.
> TIA,
> Stephen
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users@lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>