<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>SER gurus:</FONT></DIV>
<DIV><FONT size=2> I am an newbie to SER usuage. At present a
dynamic redirect issue happens to me. But it is very pity for SER not to support
this case!! </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Problem Description:</FONT></DIV>
<DIV><FONT size=2>====================</FONT></DIV>
<DIV><FONT size=2> When configuring SER as only redirect
server, config file regarding redirect routing section is partly writen as
follows:</FONT></DIV>
<DIV><FONT size=2>#-----------------------request routing
logic-------------------------</FONT></DIV>
<DIV><FONT size=2>#main routing logic</FONT></DIV>
<DIV><FONT size=2> if (method=="INVITE") {</FONT></DIV>
<DIV><FONT size=2> #rewrite current URI, which is always part
of destination ser</FONT></DIV>
<DIV><FONT size=2>
rewriteuri("<STRONG><FONT
color=#ff0000>sip:80000000@192.168.0.191:5060</FONT></STRONG>");</FONT></DIV>
<DIV><FONT size=2> #redirect now</FONT></DIV>
<DIV><FONT size=2> sl_send_reply("301",
"Redirect");</FONT></DIV>
<DIV><FONT size=2> break;</FONT></DIV>
<DIV><FONT size=2> }</FONT></DIV>
<DIV><FONT
size=2>#---------------------------------------------------------------------</FONT></DIV>
<DIV><FONT size=2> where, redirecting destination URI is
staticly configed into SER, but dynamic destination URI is what our IP-PBX
product(RTCCP) want to hope. </FONT></DIV>
<DIV><FONT size=2> The following call flow diagram helps to
understand above mentioned scenario.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> GrandStream
HandyTone486
SER
Our B2BUA IP PBX(RTCCP)</FONT></DIV>
<DIV><FONT size=2> IP:
192.168.0.253
IP:
192.168.0.252
IP: 192.168.0.191</FONT></DIV>
<DIV><FONT size=2>+++++++++++++++++++++++++++++++++++++ First
Call+++++++++++++++++++++++++++++++++++++++++++++++++</FONT></DIV>
<DIV><FONT size=2>
|-----------------F1(INVITE)---------->|</FONT></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>
|<-----------------F2(302)------------>|
<DIV><FONT size=2>
|-----------------F3(ACK)------------->|
<DIV><FONT size=2>
|------------------------------------F4(INVITE)------------------------>|</FONT></DIV>
<DIV>
( The subsequent call flow is omitted )</DIV>
<DIV>
<DIV><FONT size=2>+++++++++++++++++++++++++++++++++++++ Second
Call+++++++++++++++++++++++++++++++++++++++++++++++++</FONT></DIV>
<DIV><FONT size=2>
|-----------------F5(INVITE)---------->|</FONT></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>
|<-----------------F6(302)------------>|
<DIV><FONT size=2>
|-----------------F7(ACK)------------->|
<DIV><FONT size=2>
|------------------------------------F8(INVITE)------------------------>|</FONT></DIV>
<DIV>
( The subsequent call flow is omitted
)</FONT></FONT></FONT></DIV></DIV></DIV></DIV></FONT></FONT></FONT></DIV></DIV></DIV></DIV>
<DIV><FONT size=2>F1:</FONT></DIV>
<DIV><FONT size=2>INVITE sip:8000000@192.168.0.252;user=phone SIP/2.0<BR>Via:
SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKb537ec0f1387845f<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=c526ecce44ec6d75<BR>To:
<sip:<STRONG><FONT
color=#0000ff>8000000@192.168.0.252;user=phone</FONT></STRONG>><BR>Contact:
<sip:60000253@192.168.0.233;user=phone><BR>Supported: replaces<BR>Call-ID:
<A
href="mailto:d6169571fe4f59a2@192.168.0.233">d6169571fe4f59a2@192.168.0.233</A><BR>CSeq:
50105 INVITE<BR>User-Agent: Grandstream HT487 1.0.5.16<BR>Max-Forwards:
70<BR>Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE<BR>Content-Type:
application/sdp<BR>Content-Length: 330</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>v=0<BR>o=60000253 0 8000 IN IP4 192.168.0.233<BR>s=SIP
Call<BR>c=IN IP4 192.168.0.233<BR>t=0 0<BR>m=audio 5004 RTP/AVP 0 8 4 18 2 15
99<BR>a=sendrecv<BR>a=rtpmap:0 PCMU/8000<BR>a=rtpmap:8 PCMA/8000<BR>a=rtpmap:4
G723/8000<BR>a=rtpmap:18 G729/8000<BR>a=rtpmap:2 G726-32/8000<BR>a=rtpmap:15
G728/8000<BR>a=rtpmap:99 iLBC/8000<BR>a=fmtp:99
mode=20<BR>a=ptime:20<BR></FONT></DIV>
<DIV><FONT size=2>F2:</FONT></DIV>
<DIV><FONT size=2>SIP/2.0 301 Redirect<BR>Via: SIP/2.0/UDP
192.168.0.233;branch=z9hG4bKb537ec0f1387845f<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=c526ecce44ec6d75<BR>To:
<sip:8000000@192.168.0.252;user=phone>;tag=b27e1a1d33761e85846fc98f5f3a7e58.f9ed<BR>Call-ID:
<A
href="mailto:d6169571fe4f59a2@192.168.0.233">d6169571fe4f59a2@192.168.0.233</A><BR>CSeq:
50105 INVITE<BR>Contact: sip:<STRONG><FONT
color=#0000ff>80000000@192.168.0.191:5060</FONT></STRONG><BR>Server: Sip EXpress
router (0.8.12 (i386/linux))<BR>Content-Length: 0<BR>Warning: 392
192.168.0.252:5060 "Noisy feedback tells: pid=6155
req_src_ip=192.168.0.233 req_src_port=5060
in_uri=sip:8000000@192.168.0.252;user=phone
out_uri=sip:80000000@192.168.0.191:5060 via_cnt==1"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>F4:</FONT></DIV>
<DIV><FONT size=2>INVITE sip:<STRONG><FONT
color=#0000ff>80000000@192.168.0.191:5060</FONT></STRONG> SIP/2.0<BR>Via:
SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKc6905874d1906c58<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=1be4a5d7d169d8f1<BR>To:
<sip:<STRONG><FONT
color=#0000ff>80000000@192.168.0.191:5060</FONT></STRONG>><BR>Contact:
<sip:60000253@192.168.0.233;user=phone><BR>Supported: replaces<BR>Call-ID:
<A
href="mailto:0d325b0e778321ee@192.168.0.233">0d325b0e778321ee@192.168.0.233</A><BR>CSeq:
17809 INVITE<BR>User-Agent: Grandstream HT487 1.0.5.16<BR>Max-Forwards:
70<BR>Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE<BR>Content-Type:
application/sdp<BR>Content-Length: 330</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>v=0<BR>o=60000253 0 8000 IN IP4 192.168.0.233<BR>s=SIP
Call<BR>c=IN IP4 192.168.0.233<BR>t=0 0<BR>m=audio 5004 RTP/AVP 0 8 4 18 2 15
99<BR>a=sendrecv<BR>a=rtpmap:0 PCMU/8000<BR>a=rtpmap:8 PCMA/8000<BR>a=rtpmap:4
G723/8000<BR>a=rtpmap:18 G729/8000<BR>a=rtpmap:2 G726-32/8000<BR>a=rtpmap:15
G728/8000<BR>a=rtpmap:99 iLBC/8000<BR>a=fmtp:99
mode=20<BR>a=ptime:20<BR></FONT></DIV>
<DIV><FONT size=2>F5:</FONT></DIV>
<DIV><FONT size=2>INVITE sip:<STRONG><FONT
color=#ff0000>80000002@192.168.0.252</FONT></STRONG>;user=phone SIP/2.0<BR>Via:
SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKe966424e91ceac8e<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=466d9b06b51ca7b4<BR>To:
<sip:80000002@192.168.0.252;user=phone><BR>Contact:
<sip:60000253@192.168.0.233;user=phone><BR>Supported: replaces<BR>Call-ID:
<A
href="mailto:c755c6b0908a8ce9@192.168.0.233">c755c6b0908a8ce9@192.168.0.233</A><BR>CSeq:
25248 INVITE<BR>User-Agent: Grandstream HT487 1.0.5.16<BR>Max-Forwards:
70<BR>Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE<BR>Content-Type:
application/sdp<BR>Content-Length: 330</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>v=0<BR>o=60000253 0 8000 IN IP4 192.168.0.233<BR>s=SIP
Call<BR>c=IN IP4 192.168.0.233<BR>t=0 0<BR>m=audio 5004 RTP/AVP 0 8 4 18 2 15
99<BR>a=sendrecv<BR>a=rtpmap:0 PCMU/8000<BR>a=rtpmap:8 PCMA/8000<BR>a=rtpmap:4
G723/8000<BR>a=rtpmap:18 G729/8000<BR>a=rtpmap:2 G726-32/8000<BR>a=rtpmap:15
G728/8000<BR>a=rtpmap:99 iLBC/8000<BR>a=fmtp:99
mode=20<BR>a=ptime:20<BR></FONT></DIV>
<DIV><FONT size=2>F6:</FONT></DIV>
<DIV><FONT size=2>SIP/2.0 301 Redirect<BR>Via: SIP/2.0/UDP
192.168.0.233;branch=z9hG4bKe966424e91ceac8e<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=466d9b06b51ca7b4<BR>To:
<sip:80000002@192.168.0.252;user=phone>;tag=b27e1a1d33761e85846fc98f5f3a7e58.7906<BR>Call-ID:
<A
href="mailto:c755c6b0908a8ce9@192.168.0.233">c755c6b0908a8ce9@192.168.0.233</A><BR>CSeq:
25248 INVITE<BR>Contact: sip:<STRONG><FONT
color=#ff0000>80000000@192.168.0.191:5060</FONT></STRONG><BR>Server: Sip EXpress
router (0.8.12 (i386/linux))<BR>Content-Length: 0<BR>Warning: 392
192.168.0.252:5060 "Noisy feedback tells: pid=6151
req_src_ip=192.168.0.233 req_src_port=5060
in_uri=sip:80000002@192.168.0.252;user=phone
out_uri=sip:80000000@192.168.0.191:5060 via_cnt==1"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>F8:</FONT></DIV>
<DIV><FONT size=2>INVITE sip:<STRONG><FONT
color=#ff0000>80000000@192.168.0.191:5060</FONT></STRONG> SIP/2.0<BR>Via:
SIP/2.0/UDP 192.168.0.233;branch=z9hG4bK475fff37270b762d<BR>From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=58a90f4229e70a80<BR>To:
<sip:<STRONG><FONT
color=#ff0000>80000000@192.168.0.191:5060</FONT></STRONG>><BR>Contact:
<sip:60000253@192.168.0.233;user=phone><BR>Supported: replaces<BR>Call-ID:
<A
href="mailto:2a79d9ac84e2f72e@192.168.0.233">2a79d9ac84e2f72e@192.168.0.233</A><BR>CSeq:
62121 INVITE<BR>User-Agent: Grandstream HT487 1.0.5.16<BR>Max-Forwards:
70<BR>Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE<BR>Content-Type:
application/sdp<BR>Content-Length: 330</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>v=0<BR>o=60000253 0 8000 IN IP4 192.168.0.233<BR>s=SIP
Call<BR>c=IN IP4 192.168.0.233<BR>t=0 0<BR>m=audio 5004 RTP/AVP 0 8 4 18 2 15
99<BR>a=sendrecv<BR>a=rtpmap:0 PCMU/8000<BR>a=rtpmap:8 PCMA/8000<BR>a=rtpmap:4
G723/8000<BR>a=rtpmap:18 G729/8000<BR>a=rtpmap:2 G726-32/8000<BR>a=rtpmap:15
G728/8000<BR>a=rtpmap:99 iLBC/8000<BR>a=fmtp:99
mode=20<BR>a=ptime:20<BR></FONT></DIV>
<DIV><FONT size=2> In fact, I think SER should retrieve user
portion of header "to" URI of Invite message(for above example it should be
80000000 for first call,whereas 80000002 for second call) to construct
userinfo of destination redirect uri for header contact of 3xx response(but
hostinfo maybe get from SER config file). Meanwhile I study into sl_send_reply
source code, but no progress to issue.</FONT></DIV>
<DIV><FONT size=2> So any suggestions or solutions are
appreciated!!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks in advance!!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT
size=2>
George Lee(ShenZhen, CHINA)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> </DIV></FONT></BODY></HTML>