[SR-Users] Kamailio as a UAC

Ricardo Martinez rmartinez at redvoiss.net
Tue May 18 17:28:22 CEST 2010


I'm using the exact same script.. I even have a log line in the
uac_auth(). So is catching the 401.
But Kamailio is not sending the new INVITE with the credentials..
What else I'm missing...??

I also have defined :

modparam("uac","credential","username:domain:password")
modparam("uac","auth_realm_avp","$avp(i:10)")
modparam("uac","auth_username_avp","$avp(i:11)")
modparam("uac","auth_password_avp","$avp(i:12)")


This is the debug..
10.0.0.207 : GW
10.0.0.212 : Kamailio
10.0.0.197 : Asterisk

U 10.0.0.207:5060 -> 10.0.0.212:5060
INVITE sip:5501234567 at 10.0.0.212 SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 INVITE.
Supported: timer, replaces.
Min-SE: 1800.
Date: Tue, 18 May 2010 13:10:42 GMT.
User-Agent: AddPac AP2520 8.30V.
Contact: <sip:2408100 at 10.0.0.207>.
Accept: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY, INFO.
Content-Type: application/sdp.
Content-Length: 286.
Max-Forwards: 70.
.
v=0.
o=2408100 1274188242 1274188242 IN IP4 10.0.0.207.
s=AddPac Gateway SDP.
c=IN IP4 10.0.0.207.
t=1274188242 0.
m=audio 23032 RTP/AVP 0 8 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:20.


U 10.0.0.212:5060 -> 10.0.0.207:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 INVITE.
Server: kamailio (3.0.1 (i386/linux)).
Content-Length: 0.
.


U 10.0.0.212:5060 -> 10.0.0.197:5060
INVITE sip:5501234567 at 10.0.0.197 SIP/2.0.
Record-Route: <sip:10.0.0.212;lr=on;ftag=d24b5e47a4;did=c3a.e176f9e4>.
Via: SIP/2.0/UDP 10.0.0.212;branch=z9hG4bK8a9d.47d682e.0.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 INVITE.
Supported: timer, replaces.
Min-SE: 1800.
Date: Tue, 18 May 2010 13:10:42 GMT.
User-Agent: AddPac AP2520 8.30V.
Contact: <sip:2408100 at 10.0.0.207>.
Accept: application/sdp.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY, INFO.
Content-Type: application/sdp.
Content-Length: 286.
Max-Forwards: 69.
P-hint: outbound->inbound .
.
v=0.
o=2408100 1274188242 1274188242 IN IP4 10.0.0.207.
s=AddPac Gateway SDP.
c=IN IP4 10.0.0.207.
t=1274188242 0.
m=audio 23032 RTP/AVP 0 8 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:20.


U 10.0.0.197:5060 -> 10.0.0.212:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
10.0.0.212;branch=z9hG4bK8a9d.47d682e.0;received=10.0.0.212.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>;tag=as6f2d46d3.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 INVITE.
Server: Asterisk PBX 1.6.1.19.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO.
Supported: replaces, timer.
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="66243944".
Content-Length: 0.
.


U 10.0.0.212:5060 -> 10.0.0.197:5060
ACK sip:5501234567 at 10.0.0.197 SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.212;branch=z9hG4bK8a9d.47d682e.0.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>;tag=as6f2d46d3.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 ACK.
Content-Length: 0.
Max-Forwards: 69.
.


U 10.0.0.212:5060 -> 10.0.0.207:5060
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>;tag=as6f2d46d3.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 INVITE.
Server: Asterisk PBX 1.6.1.19.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO.
Supported: replaces, timer.
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="66243944".
Content-Length: 0.
.


U 10.0.0.207:5060 -> 10.0.0.212:5060
ACK sip:5501234567 at 10.0.0.212 SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.207:5060;branch=z9hG4bKd24b5e47a416.
From: <sip:2408100 at 10.0.0.207>;tag=d24b5e47a4.
To: <sip:5501234567 at 10.0.0.212>;tag=as6f2d46d3.
Call-ID: d291f24b-58b6-5e54-8047-0002a4005672 at 10.0.0.207.
CSeq: 16 ACK.
Content-Length: 0.
Max-Forwards: 70.
.

Ricardo.-



More information about the sr-users mailing list