Hello Jan :
In fact, I need SER to implement a speific request-redirect routing logic that
currently not supported by SER. At present, we can call this logic "ip pbx redirect
logic" described as follows in detail:
=============================================================================
When incoming "Invite" request arrives, SER extracts username of
"To" header field of "Invite" request as username of
"Contact" header field in 3xx response whereas hostname or hostip of
"Contact" header is retrieved from external configuration such as ser.cfg file.
Simply speaking:
redirect-generated "Contact" = [username of "To" header field of
"Invite" request]@[hostname or hostip get from
external configuration such as
ser.cfg file]
Thanks a Lot!
George Lee
----- Original Message -----
From: "Jan Janak" <jan(a)iptel.org>
To: "George Lee" <jlsnmp(a)126.com>
Cc: <serusers(a)iptel.org>rg>; <serdev(a)iptel.org>
Sent: Thursday, February 03, 2005 9:05 PM
Subject: Re: [Serdev] Dynamic Redirect Issue about SER!
> I am not sure if I understand the question. If you want to redirect the
> INVITE, then you need to get the new destination from somewhere --
> either configure it statically in the configuration as you have done, or
> use the user location database.
>
> To use the user location database, call lookup("location") and then 3xx
> back using sl_send reply:
>
> lookup("location");
> sl_send_reply("301", "Redirect");
>
> That way SER would put the real destinations (registered by the called
> user agent) into Contact and send it back to the calling user agent.
>
> Jan.
>
> On 03-02 15:14, George Lee wrote:
> > SER gurus:
> > 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!!
> >
> > Problem Description:
> > ====================
> > When configuring SER as only redirect server, config file regarding redirect
routing section is partly writen as follows:
> > #-----------------------request routing logic-------------------------
> > #main routing logic
> > if (method=="INVITE") {
> > #rewrite current URI, which is always part of destination ser
> > rewriteuri("sip:80000000@192.168.0.191:5060");
> > #redirect now
> > sl_send_reply("301", "Redirect");
> > break;
> > }
> > #---------------------------------------------------------------------
> > where, redirecting destination URI is staticly configed into SER, but
dynamic destination URI is what our IP-PBX product(RTCCP) want to hope.
> > The following call flow diagram helps to understand above mentioned
scenario.
> >
> > GrandStream HandyTone486 SER Our
B2BUA IP PBX(RTCCP)
> > IP: 192.168.0.253 IP: 192.168.0.252 IP:
192.168.0.191
> > +++++++++++++++++++++++++++++++++++++ First
Call+++++++++++++++++++++++++++++++++++++++++++++++++
> > |-----------------F1(INVITE)---------->|
> > |<-----------------F2(302)------------>|
> > |-----------------F3(ACK)------------->|
> >
|------------------------------------F4(INVITE)------------------------>|
> > ( The subsequent call flow is omitted )
> > +++++++++++++++++++++++++++++++++++++ Second
Call+++++++++++++++++++++++++++++++++++++++++++++++++
> > |-----------------F5(INVITE)---------->|
> > |<-----------------F6(302)------------>|
> > |-----------------F7(ACK)------------->|
> >
|------------------------------------F8(INVITE)------------------------>|
> > ( The subsequent call flow is omitted )
> > F1:
> > INVITE sip:8000000@192.168.0.252;user=phone SIP/2.0
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKb537ec0f1387845f
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=c526ecce44ec6d75
> > To: <sip:8000000@192.168.0.252;user=phone>
> > Contact: <sip:60000253@192.168.0.233;user=phone>
> > Supported: replaces
> > Call-ID: d6169571fe4f59a2(a)192.168.0.233
> > CSeq: 50105 INVITE
> > User-Agent: Grandstream HT487 1.0.5.16
> > Max-Forwards: 70
> > Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
> > Content-Type: application/sdp
> > Content-Length: 330
> >
> > v=0
> > o=60000253 0 8000 IN IP4 192.168.0.233
> > s=SIP Call
> > c=IN IP4 192.168.0.233
> > t=0 0
> > m=audio 5004 RTP/AVP 0 8 4 18 2 15 99
> > a=sendrecv
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:4 G723/8000
> > a=rtpmap:18 G729/8000
> > a=rtpmap:2 G726-32/8000
> > a=rtpmap:15 G728/8000
> > a=rtpmap:99 iLBC/8000
> > a=fmtp:99 mode=20
> > a=ptime:20
> >
> > F2:
> > SIP/2.0 301 Redirect
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKb537ec0f1387845f
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=c526ecce44ec6d75
> > To:
<sip:8000000@192.168.0.252;user=phone>;tag=b27e1a1d33761e85846fc98f5f3a7e58.f9ed
> > Call-ID: d6169571fe4f59a2(a)192.168.0.233
> > CSeq: 50105 INVITE
> > Contact: sip:80000000@192.168.0.191:5060
> > Server: Sip EXpress router (0.8.12 (i386/linux))
> > Content-Length: 0
> > 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"
> >
> > F4:
> > INVITE sip:80000000@192.168.0.191:5060 SIP/2.0
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKc6905874d1906c58
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=1be4a5d7d169d8f1
> > To: <sip:80000000@192.168.0.191:5060>
> > Contact: <sip:60000253@192.168.0.233;user=phone>
> > Supported: replaces
> > Call-ID: 0d325b0e778321ee(a)192.168.0.233
> > CSeq: 17809 INVITE
> > User-Agent: Grandstream HT487 1.0.5.16
> > Max-Forwards: 70
> > Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
> > Content-Type: application/sdp
> > Content-Length: 330
> >
> > v=0
> > o=60000253 0 8000 IN IP4 192.168.0.233
> > s=SIP Call
> > c=IN IP4 192.168.0.233
> > t=0 0
> > m=audio 5004 RTP/AVP 0 8 4 18 2 15 99
> > a=sendrecv
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:4 G723/8000
> > a=rtpmap:18 G729/8000
> > a=rtpmap:2 G726-32/8000
> > a=rtpmap:15 G728/8000
> > a=rtpmap:99 iLBC/8000
> > a=fmtp:99 mode=20
> > a=ptime:20
> >
> > F5:
> > INVITE sip:80000002@192.168.0.252;user=phone SIP/2.0
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKe966424e91ceac8e
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=466d9b06b51ca7b4
> > To: <sip:80000002@192.168.0.252;user=phone>
> > Contact: <sip:60000253@192.168.0.233;user=phone>
> > Supported: replaces
> > Call-ID: c755c6b0908a8ce9(a)192.168.0.233
> > CSeq: 25248 INVITE
> > User-Agent: Grandstream HT487 1.0.5.16
> > Max-Forwards: 70
> > Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
> > Content-Type: application/sdp
> > Content-Length: 330
> >
> > v=0
> > o=60000253 0 8000 IN IP4 192.168.0.233
> > s=SIP Call
> > c=IN IP4 192.168.0.233
> > t=0 0
> > m=audio 5004 RTP/AVP 0 8 4 18 2 15 99
> > a=sendrecv
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:4 G723/8000
> > a=rtpmap:18 G729/8000
> > a=rtpmap:2 G726-32/8000
> > a=rtpmap:15 G728/8000
> > a=rtpmap:99 iLBC/8000
> > a=fmtp:99 mode=20
> > a=ptime:20
> >
> > F6:
> > SIP/2.0 301 Redirect
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bKe966424e91ceac8e
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=466d9b06b51ca7b4
> > To:
<sip:80000002@192.168.0.252;user=phone>;tag=b27e1a1d33761e85846fc98f5f3a7e58.7906
> > Call-ID: c755c6b0908a8ce9(a)192.168.0.233
> > CSeq: 25248 INVITE
> > Contact: sip:80000000@192.168.0.191:5060
> > Server: Sip EXpress router (0.8.12 (i386/linux))
> > Content-Length: 0
> > 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"
> >
> > F8:
> > INVITE sip:80000000@192.168.0.191:5060 SIP/2.0
> > Via: SIP/2.0/UDP 192.168.0.233;branch=z9hG4bK475fff37270b762d
> > From: "60000253"
<sip:60000253@192.168.0.252;user=phone>;tag=58a90f4229e70a80
> > To: <sip:80000000@192.168.0.191:5060>
> > Contact: <sip:60000253@192.168.0.233;user=phone>
> > Supported: replaces
> > Call-ID: 2a79d9ac84e2f72e(a)192.168.0.233
> > CSeq: 62121 INVITE
> > User-Agent: Grandstream HT487 1.0.5.16
> > Max-Forwards: 70
> > Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
> > Content-Type: application/sdp
> > Content-Length: 330
> >
> > v=0
> > o=60000253 0 8000 IN IP4 192.168.0.233
> > s=SIP Call
> > c=IN IP4 192.168.0.233
> > t=0 0
> > m=audio 5004 RTP/AVP 0 8 4 18 2 15 99
> > a=sendrecv
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:8 PCMA/8000
> > a=rtpmap:4 G723/8000
> > a=rtpmap:18 G729/8000
> > a=rtpmap:2 G726-32/8000
> > a=rtpmap:15 G728/8000
> > a=rtpmap:99 iLBC/8000
> > a=fmtp:99 mode=20
> > a=ptime:20
> >
> > 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.
> > So any suggestions or solutions are appreciated!!
> >
> > Thanks in advance!!
> >
> >
> > George
Lee(ShenZhen, CHINA)
> >
>
> > _______________________________________________
> > Serdev mailing list
> > Serdev(a)iptel.org
> >
http://mail.iptel.org/mailman/listinfo/serdev
>
>
>