[Serusers] Ser 0.9.0 and Cisco Voice Gateway

Steve Blair blairs at isc.upenn.edu
Wed Apr 20 15:21:59 CEST 2005


The first thing that caught my attention is the lack of a port in your
pots dial-peer. If this peer is matched where should the call go? Do you
have a VWIC interface in your router?



Ahmad Cheikh-Moussa wrote:

>Hi!
>
>Phone to Phone call functions now properly.
>But I still got problems to make an externall
>call.
>
>Is this configuration right for stateless forwarding ?
>The ip of the gateway is 192.168.254.30.
>
>Here a part of my ser.cfg:
># 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 >=  max_len ) {
>                sl_send_reply("513", "Message too big");
>                break;
>        };
>        
>        if (src_ip==193.175.135.0/24){
>                #force_send_socket(smaug:5080);
>                forward(193.175.135.179);
>                break;
>        }
>
>        #if (uri=~"^sip:0[0-9]*@netuse.de") {
>        #    forward(192.168.254.203);
>        #    break;
>        #}
>        # Default route zu Cisco Gateway
>        if (method == "INVITE" && uri=~"^sip:0") {
>          rewritehostport("192.168.254.203:5060");
>          t_relay_to_udp("192.168.254.203", "5060");
>          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();
>        };
>}
>
>router configuration:
>voice service voip 
> sip
>!
>!
>voice class codec 2
> codec preference 1 g711alaw
>!
>dial-peer voice 1 pots
> description Default-Dial-peer fuer ausgehende Anrufe
> preference 3
> service session
> max-conn 25
> destination-pattern 0T
> progress_ind alert enable 8
> direct-inward-dial
>!
>dial-peer voice 10 voip
> preference 2
> destination-pattern 4..
> session protocol sipv2
> session target sip-server
> dtmf-relay rtp-nte
> codec g711alaw
>!
>sip-ua 
> set sip-status 401 pstn-cause 127
> set sip-status 407 pstn-cause 127
> set sip-status 410 pstn-cause 22
> set sip-status 415 pstn-cause 127
> set sip-status 480 pstn-cause 19
> set sip-status 503 pstn-cause 127
> set sip-status 580 pstn-cause 127
> retry invite 3
> retry register 3
> timers register 150
> registrar ipv4:192.168.254.30 expires 3600
> sip-server ipv4:192.168.254.30
>!
>
>Thanks,
> Ahmad
>
>
>  
>

-- 
  
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104  


voice: 215-573-8396 

       215-746-8001

fax: 215-898-9348    

sip:blairs at upenn.edu




More information about the sr-users mailing list