[Serusers] I have a problem with SIP-PSTN Gateway.please help me.

黄谦 huangqian at icst.pku.edu.cn
Tue Mar 2 02:33:15 CET 2004


Dear sir:
   I am using a Cisco 3660 router as a SIP-PSTN gateway with my SER server.When I have configure all the thing has the guideline,I meet a problem.If I use a telephone call my MSN Messager or use MSN Messager call the telephone,the receiver could ring,and the MSN Messager could send and receive signal,but the telephone could only receive.In other words,the RTP packages could not send to UA at computers from the router.Does anyone can help me?

This is the configure at SER server:

# ------------------ module loading ---------------------------------- 

 loadmodule "modules/sl/sl.so" 
 loadmodule "modules/tm/tm.so" 
 loadmodule "modules/acc/acc.so" 
 loadmodule "modules/rr/rr.so" 
 loadmodule "modules/maxfwd/maxfwd.so" 
 loadmodule "modules/mysql/mysql.so" 
 loadmodule "modules/auth/auth.so" 
 loadmodule "modules/auth_db/auth_db.so" 
 loadmodule "modules/group/group.so" 
 loadmodule "modules/uri/uri.so" 

 # ----------------- setting module-specific parameters --------------- 

 modparam("auth_db", "db_url","sql://ser:heslo@localhost/ser") 
 modparam("auth_db", "calculate_ha1", yes) 
 modparam("auth_db", "password_column", "password") 

 # -- acc params -- 
 modparam("acc", "log_level", 1) 
 # that is the flag for which we will account -- don't forget to 
 # set the same one :-) 
 modparam("acc", "log_flag", 1 ) 

 # -------------------------  request routing logic ------------------- 

 # main routing logic 

 route{ 

       /* ********* ROUTINE CHECKS  ********************************** */ 

       # filter too old messages 
       if (!mf_process_maxfwd_header("10")) { 
               log("LOG: Too many hops\n"); 
               sl_send_reply("483","Too Many Hops"); 
               break; 
       }; 
       if (len_gt( max_len )) { 
               sl_send_reply("513", "Wow -- Message too large"); 
               break; 
       }; 

       /* ********* RR ********************************** */ 

       /* grant Route routing if route headers present */ 
       if (loose_route()) { t_relay(); break; }; 

       /* record-route INVITEs -- all subsequent requests must visit us */ 
       if (method=="INVITE") { 
               record_route(); 
       }; 

   # now check if it really is a PSTN destination which should be handled 
       # by our gateway; if not, and the request is an invitation, drop it -- 
       # we cannot terminate it in PSTN; relay non-INVITE requests -- it may 
       # be for example BYEs sent by gateway to call originator 
       if (!uri=~"sip:\+?[0-9]+ at .*") { 
               if (method=="INVITE") { 
                       sl_send_reply("403", "Call cannot be served here"); 
               } else { 
                       forward(uri:host, uri:port); 
               }; 
               break; 
       }; 

       # account completed transactions via syslog 
       setflag(1); 

       # free call destinations ... no authentication needed 
       if ( is_user_in("Request-URI", "free-pstn")  /* free destinations */ 
                       | uri=~"sip:[79][0-9][0-9][0-9]@.*" /* local PBX */ 
                       | uri=~"sip:98[0-9][0-9][0-9][0-9]") { 
               log("free call"); 
       } else if (src_ip==192.168.0.10) { 
               # our gateway doesn't support digest authentication; 
               # verify that a request is coming from it by source 
               # address 
               log("gateway-originated request"); 
       } else { 
               # in all other cases, we need to check the request against 
               # access control lists; first of all, verify request 
               # originator's identity 

               if (!proxy_authorize(   "gateway" /* realm */, 
                               "subscriber" /* table name */))  { 
                       proxy_challenge( "gateway" /* realm */, "0" /* no qop */ ); 
                       break; 
               }; 

               # authorize only for INVITEs -- RR/Contact may result in weird 
               # things showing up in d-uri that would break our logic; our 
               # major concern is INVITE which causes PSTN costs 

               if (method=="INVITE") { 

                       # does the authenticated user have a permission for local 
                       # calls (destinations beginning with a single zero)? 
                       # (i.e., is he in the "local" group?) 
                       if (uri=~"sip:0[1-9][0-9]+ at .*") { 
                               if (!is_user_in("credentials", "local")) { 
                                       sl_send_reply("403", "No permission for local calls"); 
                                       break; 
                               }; 
                       # the same for long-distance (destinations begin with two zeros") 
                       } else if (uri=~"sip:00[1-9][0-9]+ at .*") { 
                               if (!is_user_in("credentials", "ld")) { 
                                       sl_send_reply("403", " no permission for LD "); 
                                       break; 
                               }; 
                       # the same for international calls (three zeros) 
                       } else if (uri=~"sip:000[1-9][0-9]+ at .*") { 
                               if (!is_user_in("credentials", "int")) { 
                                       sl_send_reply("403", "International permissions needed"); 
                                       break; 
                               }; 
   # everything else (e.g., interplanetary calls) is denied 
                       } else { 
                               sl_send_reply("403", "Forbidden"); 
                               break; 
                       }; 

               }; # INVITE to authorized PSTN 

       }; # authorized PSTN 

       # if you have passed through all the checks, let your call go to GW! 

       rewritehostport("192.168.0.10:5060"); 

       # forward the request now 
       if (!t_relay()) { 
               sl_reply_error(); 
               break; 
       }; 

 } 



And this is the configure at the Cisco 3660:


!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname SIP
!
enable secret 5 $1$Ov6R$SoCYqYuzY7a7spMUSEz2e.
enable password 123456
!
ip subnet-zero
no ip routing
!
!
ip name-server 162.105.170.66
ip name-server 162.105.129.27
!
!
voice rtp send-recv
!
voice service pots 
!
voice class codec 1
 codec preference 1 g729r8
 codec preference 2 g729br8
 codec preference 13 g711ulaw
 codec preference 14 g711alaw
!
voice class codec 13
!
!
!
!
!
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.0.200 255.255.255.0
 no ip route-cache
 no ip mroute-cache
 speed auto
 half-duplex
 no cdp enable
!
interface FastEthernet0/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 duplex auto
 speed auto
 no cdp enable
!
interface Serial3/0
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 serial restart_delay 0
 no cdp enable
!
interface Serial3/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 serial restart_delay 0
 no cdp enable
!
interface Serial3/2
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 serial restart_delay 0
 no cdp enable
!
interface Serial3/3
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 serial restart_delay 0
 no cdp enable
!
interface FastEthernet5/0
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 duplex auto
 speed auto
 no cdp enable
!
interface Serial5/0
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 clockrate 2000000
 no cdp enable
!
interface FastEthernet5/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 duplex auto
 speed auto
 no cdp enable
!
interface Serial5/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 clockrate 2000000
 no cdp enable
!
interface FastEthernet6/0
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 duplex auto
 speed auto
 no cdp enable
!
interface Serial6/0
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 clockrate 2000000
 no cdp enable
!
interface FastEthernet6/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 duplex auto
 speed auto
 no cdp enable
!
interface Serial6/1
 no ip address
 no ip route-cache
 no ip mroute-cache
 shutdown
 clockrate 2000000
 no cdp enable
!
interface Dialer1
 no ip address
!
ip default-gateway 192.168.0.1
ip classless
no ip http server
ip pim bidir-enable
!
!
vc-group 1
!
snmp-server community public RO
!
call rsvp-sync
!
voice-port 1/0/0
 cptone CN
 description 3078
 supervisory disconnect dualtone mid-call
!
voice-port 1/0/1
!
voice-port 1/1/0
 cptone CN
 description 3078
 supervisory disconnect dualtone mid-call
!
voice-port 1/1/1
!
voice-port 2/0/0
!
voice-port 2/0/1
!
voice-port 2/1/0
!
voice-port 2/1/1
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
dial-peer voice 86100 pots
 application session
 destination-pattern 8610T
 port 1/0/0
!
dial-peer voice 1000 voip
 application session
 destination-pattern .T
 session protocol sipv2
 session target sip-server
 session transport udp
 codec g711ulaw
!
dial-peer voice 100 pots
 destination-pattern 010T
 port 1/0/0
!
dial-peer voice 86000 pots
 destination-pattern 8600T
 port 1/1/0
!
sip-ua 
 timers disconnect 200
 sip-server dns:sipproxy.icst.pku.edu.cn
!
!
line con 0
line aux 0
line vty 0 4
 password 123456
 login
!
!
end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ??.vcf
Type: text/x-vcard
Size: 117 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040302/98d3116f/attachment.vcf>


More information about the sr-users mailing list