[Users] Error in Radius Start when attemping write SDP

Dmitry Lyubimkov loft at onego.ru
Tue Mar 14 20:46:24 CET 2006


We use OpenSER 1.0.1
There is this command in config file: 
modparam("acc", "radius_extra", "Sip-UA=$hdr(User-Agent);
Sip-Via=$hdr(Via[*]); Sip-SDP=$rb")

When the call goes from UA to gateway (Cisco AS5350) we receive this SIP
the message (received by tcpdump)

23:37:04.001136 IP 172.16.224.5.5060 > 62.33.22.14.5060: UDP, length 845
E..i....:.......>!.......UU.INVITE sip:78142799111 at voapp.ru:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.224.5:5060;branch=z9hG4bK_0013464F617E_T72405C7F
Session-Expires: 1800;refresher=uas
From: "loftphone"
<sip:loftphone at voapp.ru:5060>;tag=0013464F617E_T195292895
To: <sip:78142799111 at voapp.ru:5060>
Call-ID: CALL_ID17_0013464F617E_T1817335404 at 172.16.224.5
CSeq: 2100902695 INVITE
Contact: <sip:loftphone at 172.16.224.5:5060>
Max-Forwards: 70
Allow:
ACK,BYE,CANCEL,INVITE,NOTIFY,REFER,DO,UPDATE,OPTIONS,SUBSCRIBE,INFO
Supported: timer,replaces
User-Agent: DPH-12001.00.04
Content-Type: application/sdp
Content-Length: 243

v=0
o=loftphone 416452497 416452497 IN IP4 172.16.224.5
s=DPH-12001.00.04
c=IN IP4 172.16.224.5
t=0 0
m=audio 41000 RTP/AVP 8 18 4
a=rtpmap:8 PCMA/8000/1
a=rtpmap:18 G729/8000/1
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000/1
a
        =sendrecv


And in Radius we receive following Start record:

Mon Mar 13 23:37:04 2006
        Acct-Status-Type = Start
        Service-Type = Sip-Session
        Sip-Response-Code = 200
        Sip-Method = 1
        User-Name = "loftphone at voapp.ru"
        Calling-Station-Id = "sip:loftphone at voapp.ru:5060"
        Called-Station-Id = "sip:78142799111 at voapp.ru:5060"
        Sip-Translated-Request-URI = "sip:78142799111 at voapp.ru:5060"
        Acct-Session-Id =
"CALL_ID17_0013464F617E_T1817335404 at 172.16.224.5"
        Sip-To-Tag = "972A1EA0-2615"
        Sip-From-Tag = "0013464F617E_T195292895"
        Sip-Cseq = "2100902696"
        Sip-UA = "DPH-12001.00.04"
        Sip-Via = "SIP/2.0/UDP
172.16.224.5:5060;branch=z9hG4bK_0013464F617E_T00
82E2E0"
        Sip-SDP = "v=0\r\no=loftphone 416452497 416452497 IN IP4
172.16.224.5\r\
ns=DPH-12001.00.04\r\nc=IN IP4 172.16.224.5\r\nt=0 0\r\nm=audio 41000
RTP/AVP 8
18 4\r\na=rtpmap:8 PCMA/8000/1\r\na=rtpmap:18 G729/8000/1\r\na=fmtp:18
annexb=no
\r\na=rtpmap:4 G723/8000/1\r\na=sendrecv\r\n"
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 172.16.2.6
        Client-IP-Address = 172.16.2.6
        Acct-Unique-Session-Id = "20c2ac8753fb6a0d"
        Stripped-User-Name = "loftphone"
        Realm = "voapp.ru"
        Timestamp = 1142282224

But if the call goes from gateway to UA that Start record does not come.
Invite message looks as follows:

23:12:08.997977 IP 62.33.22.11.55068 > 62.33.22.14.5060: UDP, length
1119
E..{.......w>!..>!.......g,.INVITE sip:78142799299 at voapp.ru:5060 SIP/2.0
Via: SIP/2.0/UDP  62.33.22.11:5060;x-route-tag="tgrp:ipphone"
From: <sip:78142760321 at 62.33.22.11>;tag=97134E7C-1EF1
To: <sip:78142799299 at voapp.ru>
Date: Mon, 13 Mar 2006 20:12:09 GMT
Call-ID: 7BF31E00-B20411DA-85D59372-594AF1F at 195.161.136.114
Supported: timer,100rel
Min-SE:  1800
Cisco-Guid: 2079450544-2986611162-2245170034-93630239
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER,
SUBSCRIBE, NOTIFY
, INFO
CSeq: 101 INVITE
Max-Forwards: 6
Remote-Party-ID:
<sip:78142760321 at 62.33.22.11>;party=calling;screen=yes;privacy=
off
Timestamp: 1142280729
Contact: <sip:78142760321 at 62.33.22.11:5060>
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Length: 316


v=0
o=CiscoSystemsSIP-GW-UserAgent 9211 3494 IN IP4 62.33.22.11
s=SIP Call
c=IN IP4 62.33.22.11
t=0 0
m=audio 16624 RTP/AVP 3 18 8 0 4
c=IN IP4 62.33.22.11
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000

        a=fmtp:4 annexa=yes


And openser writes in log:

Mar 13 23:41:27 sip OpenSER[18329]: rc_avpair_assign: bad attribute
length
Mar 13 23:41:27 sip OpenSER[18329]: ERROR: acc_rad_request:
rc_avpaid_add failed
 for (null)

The reason is clear - one attribute is empty.
using command
modparam("acc", "radius_extra", "Sip-UA=$hdr(User-Agent);
Sip-Via=$hdr(Via[*]); Sip-SDP=$rb")
we add 3 attribute.
Easily we find out that the reason in Sip-SDP = $ rb If to remove this
attribute having left only
modparam("acc", "radius_extra", "Sip-UA=$hdr(User-Agent);
Sip-Via=$hdr(Via[*])")
then Start records start to come.
But in fact it is perfectly visible that INVITE from a gateway contains
SDP.
Why pseudo variable $rb does not return value?
In what there can be a reason?

Dmitry







More information about the sr-users mailing list