can anybody please help me. This is urgent. There is a continuous problem in using SER. SER is not forwarding the packet correctly to client behind NAT. Please have a look at this problem.
My network scenerio is: 192.168.0.2 +----------+ | ClientA | +----------+ | | | eth1 eth0 | 192.168.0.1 | 172.25.25.83 +-------------|-------------+ | NAT1 | +-------------|-------------+ | | | 172.25.25.84 | +---------------------------+ |SER Proxy\Registrar, | | STUN Server | +---------------------------+ |172.25.25.85 | | | | 172.25.25.88 +----------+ | ClientC | +----------+
172.25.25.X ---- LAN (External Network for client A and C) 192.168.0.X ---- Private Network 1 (Internal Network for Client A)
ClientA and ClientC are sip clients with STUN functionality embedded.
NAT1 is internal LAN NAT. I mean for testing purpose, i have used two machines with two network cards.
-------------------------------------------------------- Here is the problem:
Both clientA and clientB get registered successfully with Registrar. ClientA get registered with NAT1 address 172.25.25.83. When ClientA starts sip session by sending an invite to clientC, all works fine. But, when ClientC starts the session by inviting clientA, Proxy tries to forward the message invite directly to clientA. Although, clientA has already registered with the registrar and has indicated its contact address as of NAT1. My question is why proxy is not taking the contact address and sending invite there. below is the sequence of messages that I captured using ehtereal on Linux Plateform.
source=172.25.25.88:5060 to=172.25.25.84:5060 REGISTER sip:172.25.25.84:5060 SIP/2.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport;branch=z9hG4bK1507969566 From: sip:c@172.25.25.88:5060;tag=1981102178 To: sip:c@172.25.25.88:5060 Call-ID: 1003517860 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:c%94@172.25.25.88:5060 Max-Forwards: 5 User-Agent: eXosip/0.1 Expires: 3600 Supported: 100rel Supported: path Content-Length: 0
source=172.25.25.84:5060 to=172.25.25.88:5060 IP/2.0 200 OK Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1507969566 From: sip:c@172.25.25.88:5060;tag=1981102178 To: sip:c@172.25.25.88:5060;tag=b27e1a1d33761e85846fc98f5f3a7e58.0a43 Call-ID: 1003517860 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:c%94@172.25.25.88:5060;expires=3600 Server: Sip EXpress router (0.9.6 (i386/linux)) Content-Length: 0 Warning: 392 172.25.25.84:5060 "Noisy feedback tells: pid=21679 req_src_ip= 172.25.25.88 req_src_port=5060 in_uri=sip:172.25.25.84:5060 out_uri=sip: 172.25.25.84:5060 via_cnt==1"
source=172.25.25.83:1025 to=172.25.25.84:5060 REGISTER sip:172.25.25.84:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.2:5060;rport;branch=z9hG4bK600315716 From: sip:a@192.168.0.2:5060;tag=658770091 To: sip:a@192.168.0.2:5060 Call-ID: 2091069424 [!at] 192.168.0.2 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:a@172.25.25.83:1026 Max-Forwards: 5 User-Agent: eXosip/0.1 Expires: 3600 Supported: 100rel Supported: path Content-Length: 0
source=172.25.25.83:1025 to=172.25.25.84:5060 REGISTER sip:172.25.25.84:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.2:5060;rport;branch=z9hG4bK600315716 From: sip:a@192.168.0.2:5060;tag=658770091 To: sip:a@192.168.0.2:5060 Call-ID: 2091069424 [!at] 192.168.0.2 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:a@172.25.25.83:1026 Max-Forwards: 5 User-Agent: eXosip/0.1 Expires: 3600 Supported: 100rel Supported: path Content-Length: 0
source=172.25.25.84:5060 to=172.25.25.83:1025 SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.2:5060 ;rport=1025;branch=z9hG4bK600315716;received=172.25.25.83 From: sip:a@192.168.0.2:5060;tag=658770091 To: sip:a@192.168.0.2:5060;tag=b27e1a1d33761e85846fc98f5f3a7e58.b319 Call-ID: 2091069424 [!at] 192.168.0.2 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:a@172.25.25.83:1026;expires=3600, sip:a@172.25.25.83:5060;expires=2868
Server: Sip EXpress router (0.9.6 (i386/linux)) Content-Length: 0 Warning: 392 172.25.25.84:5060 "Noisy feedback tells: pid=21681 req_src_ip= 172.25.25.83 req_src_port=1025 in_uri=sip:172.25.25.84:5060 out_uri=sip: 172.25.25.84:5060 via_cnt==1"
source=172.25.25.84:5060 to=172.25.25.83:1025 SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.2:5060 ;rport=1025;branch=z9hG4bK600315716;received=172.25.25.83 From: sip:a@192.168.0.2:5060;tag=658770091 To: sip:a@192.168.0.2:5060;tag=b27e1a1d33761e85846fc98f5f3a7e58.b319 Call-ID: 2091069424 [!at] 192.168.0.2 (replace the [!at] with a @) CSeq: 1 REGISTER Contact: sip:a@172.25.25.83:1026;expires=3600, sip:a@172.25.25.83:5060;expires=2868
Server: Sip EXpress router (0.9.6 (i386/linux)) Content-Length: 0 Warning: 392 172.25.25.84:5060 "Noisy feedback tells: pid=21682 req_src_ip= 172.25.25.83 req_src_port=1025 in_uri=sip:172.25.25.84:5060 out_uri=sip: 172.25.25.84:5060 via_cnt==1"
source=172.25.25.88:5060 to=172.25.25.84:5060 INVITE sip:172.25.25.84:5060 SIP/2.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport;branch=z9hG4bK1784363542 Route: sip:a@192.168.0.2:5060 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 5 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=172.25.25.88:5060 SIP/2.0 100 trying -- your call is important to us Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Server: Sip EXpress router (0.9.6 (i386/linux)) Content-Length: 0 Warning: 392 172.25.25.84:5060 "Noisy feedback tells: pid=21677 req_src_ip= 172.25.25.88 req_src_port=5060 in_uri=sip:172.25.25.84:5060 out_uri= sip:a@192.168.0.2:5060 via_cnt==1"
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=192.168.0.2:5060 INVITE sip:a@192.168.0.2:5060 SIP/2.0 Record-Route: sip:172.25.25.84;ftag=1669898773;lr=on Via: SIP/2.0/UDP 172.25.25.84;branch=z9hG4bK21ea.9b53c1e3.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060 Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Contact: sip:c@172.25.25.88:5060 Max-Forwards: 4 User-Agent: eXosip/0.1 Subject: hello Expires: 120 Supported: 100rel Allow: INVITE, ACK, UPDATE, INFO, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE Content-Type: application/sdp Content-Length: 264 Route: sip:172.25.25.84:5060 P-hint: rr-enforced
v=0 o=josua 0 0 IN IP4 172.25.25.88 s=conversation c=IN IP4 172.25.25.88 t=0 0 m=audio 5071 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11 a=rtcp:5072 IN IP4 172.25.25.88 a=direction:passive
source=172.25.25.84:5060 to=172.25.25.88:5060 cSIP/2.0 408 Request Timeout Via: SIP/2.0/UDP 172.25.25.88:5060;rport=5060;branch=z9hG4bK1784363542 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060;tag=a6a1c5f60faecf035a1ae5b6e96e979a-cbaa Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 INVITE Server: Sip EXpress router (0.9.6 (i386/linux)) Content-Length: 0 Warning: 392 172.25.25.84:5060 "Noisy feedback tells: pid=21691 req_src_ip= 172.25.25.88 req_src_port=5060 in_uri=sip:172.25.25.84:5060 out_uri= sip:a@192.168.0.2:5060 via_cnt==0"
source=172.25.25.88:5060 to=172.25.25.84:5060 ACK sip:172.25.25.84:5060 SIP/2.0 Via: SIP/2.0/UDP 172.25.25.88:5060;rport;branch=z9hG4bK1784363542 Route: sip:a@192.168.0.2:5060 From: sip:c@172.25.25.88;tag=1669898773 To: sip:a@192.168.0.2:5060;tag=a6a1c5f60faecf035a1ae5b6e96e979a-cbaa Call-ID: 1721341700 [!at] 172.25.25.88 (replace the [!at] with a @) CSeq: 20 ACK Content-Length: 0 ---------------------------------------------------------------------------------------------------------------------------------------------
the SER configuration file is:
----------------------------------------------------------------- # # $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd) #fork=yes #log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode fork=no log_stderror=yes */
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) #port=5060 #children=4 fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database #loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! #loadmodule "/usr/local/lib/ser/modules/auth.so" #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database # for persistent storage and comment the previous line #modparam("usrloc", "db_mode", 2)
# -- auth params -- # Uncomment if you are using auth module # #modparam("auth_db", "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to yes (which true in this config), # uncomment also the following parameter) # #modparam("auth_db", "password_column", "password")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); break; };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); break; };
if (!uri==myself) { # mark routing logic in request append_hf("P-hint: outbound\r\n"); route(1); break; };
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication # if (!www_authorize("iptel.org", "subscriber")) { # www_challenge("iptel.org", "0"); # break; # };
save("location"); break; };
lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; };
# native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; }; append_hf("P-hint: usrloc applied\r\n"); route(1); }
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
---------------------------------------------------------------
Please help me in this regard.
Asif