Do pjsua/pjsip follow redirection to other servers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I'm testing handling of redirection with pjsua but it is not working. I have
this scenario:
pjsua make a call to a redirect server at 192.168.2.105. The call is
redirected to 192.168.2.5, but pjsua sends the request again to
192.168.2.105 instead of sending it to the redirection target.
I start pjsua with this:
 ./pjsua-i686-pc-linux-gnu --accept-redirect=1 --null-audio

And the redirect server (192.168.2.105) response is this:

SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport=5060;branch=z9hG4bKPjd6af4146-0458-4264-9f86-91a6bcb1b4f8
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
;tag=30730317344f3b33472c94a860aa4381.f2d9
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24548 INVITE
Contact: sip:10001111 at 192.168.2.5 <sip%3A10001111 at 192.168.2.5>
Server: kamailio (3.1.1 (x86_64/linux))
Content-Length: 0

The above reply looks OK to me.
So, does pjsip follow redirect targets (different server) or it only sends
the call to the initial UAS?

regards,
takeshi


Obs, for reference, here's the complete log of a test with pjsua:

You have 0 active call
>>> m
(You currently have 0 calls)
Buddy list:
 -none-

Choices:
   0         For current dialog.
  -1         All 0 buddies in buddy list
  [1 - 0]    Select from buddy list
  URL        An URL
  <Enter>    Empty input (or 'q') to cancel
Make call: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
 11:33:11.152   pjsua_call.c  Making call with acc #1 to
sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
 11:33:11.152  pjsua_media.c  Media index 0 selected for call 0
 11:33:11.153   pjsua_core.c  TX 1097 bytes Request msg INVITE/cseq=24548
(tdta0xc651640) to UDP 192.168.2.105:5060:
INVITE sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105> SIP/2.0
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport;branch=z9hG4bKPjd6af4146-0458-4264-9f86-91a6bcb1b4f8
Max-Forwards: 70
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
Contact: <sip:192.168.2.125:5060;ob>
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24548 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER,
MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: PJSUA v1.8.10-trunk/i686-pc-linux-gnu
Content-Type: application/sdp
Content-Length:   453

v=0
o=- 3503442791 3503442791 IN IP4 192.168.2.125
s=pjmedia
c=IN IP4 192.168.2.125
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96
a=rtcp:4001 IN IP4 192.168.2.125
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=sendrecv
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15

--end msg--
 11:33:11.153    pjsua_app.c  Call 0 state changed to CALLING
>>>  11:33:11.154   pjsua_core.c  RX 438 bytes Response msg
302/INVITE/cseq=24548 (rdata0xc6405ec) from UDP 192.168.2.105:5060:
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport=5060;branch=z9hG4bKPjd6af4146-0458-4264-9f86-91a6bcb1b4f8
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
;tag=30730317344f3b33472c94a860aa4381.f2d9
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24548 INVITE
Contact: sip:10001111 at 192.168.2.5 <sip%3A10001111 at 192.168.2.5>
Server: kamailio (3.1.1 (x86_64/linux))
Content-Length: 0


--end msg--
 11:33:11.154   pjsua_core.c  TX 382 bytes Request msg ACK/cseq=24548
(tdta0xc655d40) to UDP 192.168.2.105:5060:
ACK sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105> SIP/2.0
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport;branch=z9hG4bKPjd6af4146-0458-4264-9f86-91a6bcb1b4f8
Max-Forwards: 70
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
;tag=30730317344f3b33472c94a860aa4381.f2d9
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24548 ACK
Content-Length:  0


--end msg--
 11:33:11.154   pjsua_core.c  TX 1095 bytes Request msg INVITE/cseq=24549
(tdta0xc651640) to UDP 192.168.2.105:5060:
INVITE sip:10001111 at 192.168.2.5 <sip%3A10001111 at 192.168.2.5> SIP/2.0
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport;branch=z9hG4bKPj1cf70418-4b78-4fa6-91f7-2ea90d2b615b
Max-Forwards: 70
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
Contact: <sip:192.168.2.125:5060;ob>
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24549 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER,
MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: PJSUA v1.8.10-trunk/i686-pc-linux-gnu
Content-Type: application/sdp
Content-Length:   453

v=0
o=- 3503442791 3503442791 IN IP4 192.168.2.125
s=pjmedia
c=IN IP4 192.168.2.125
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96
a=rtcp:4001 IN IP4 192.168.2.125
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=sendrecv
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15

--end msg--
 11:33:11.154    pjsua_app.c  Call 0 state changed to CALLING
 11:33:11.155   pjsua_core.c  RX 438 bytes Response msg
302/INVITE/cseq=24549 (rdata0xc6405ec) from UDP 192.168.2.105:5060:
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport=5060;branch=z9hG4bKPj1cf70418-4b78-4fa6-91f7-2ea90d2b615b
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
;tag=30730317344f3b33472c94a860aa4381.15c3
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24549 INVITE
Contact: sip:10001111 at 192.168.2.5 <sip%3A10001111 at 192.168.2.5>
Server: kamailio (3.1.1 (x86_64/linux))
Content-Length: 0


--end msg--
 11:33:11.155   pjsua_core.c  TX 380 bytes Request msg ACK/cseq=24549
(tdta0xc659498) to UDP 192.168.2.105:5060:
ACK sip:10001111 at 192.168.2.5 <sip%3A10001111 at 192.168.2.5> SIP/2.0
Via: SIP/2.0/UDP 192.168.2.125:5060
;rport;branch=z9hG4bKPj1cf70418-4b78-4fa6-91f7-2ea90d2b615b
Max-Forwards: 70
From: <sip:192.168.2.125>;tag=c445b877-0020-4787-878c-5bda1c5f81c4
To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
;tag=30730317344f3b33472c94a860aa4381.15c3
Call-ID: d5d2902d-474b-4aa2-bd0d-55d15916e2fe
CSeq: 24549 ACK
Content-Length:  0


--end msg--
 11:33:11.155    pjsua_app.c  Call 0 is DISCONNECTED [reason=302 (Moved
Temporarily)]
 11:33:11.155    pjsua_app.c
  [DISCONNCTD] To: sip:10001111 at 192.168.2.105 <sip%3A10001111 at 192.168.2.105>
    Call time: 00h:00m:00s, 1st res in 3 ms, conn in 0ms
    SRTP status: Not active Crypto-suite: (null)
 11:33:12.155  pjsua_media.c  Closing sound device after idle for 1 seconds
 11:33:12.155  pjsua_media.c  Closing null sound device..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110108/02e64e4c/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux