[Serusers] Problem in SER+SEMS conference with NAT

Ravic Costa ravic.costa at gmail.com
Thu Nov 3 15:43:15 CET 2005


Hello,

We have configured SER 0.9.4 and SEMS last cvs version in order to 
implement a conference funcionallity.
Everything is working fine when the clients are using public IPs. When a 
client starts a conference,
he listens a message that in on a wav file. When a client is behind NAT, 
when he tries to start a
conference, he doen's listen to any message and in the soft phone 
(X-Lite) it appears a message saying
"connected". We have captured the traffic with tcpdump, on the machine 
that ser and sems is running,
and we've noticed that the RTP packets that the client behind NAT send 
are well received, however,
there is only one RTP packet sent by the SER to the Client, and the 
Client does not get that message,
maybe because he is behind NAT. Any ideia?

In the ser.cfg file, to the conference funcionallity we have :
_________________________________________________________
route[1] {

    # -----------------------------------------------------------------
    # Default Message Handler
    # -----------------------------------------------------------------

    t_on_reply("1");

    if (!t_relay()) {
        if (method=="INVITE" && isflagset(6)) {
            unforce_rtp_proxy();
        };
        sl_reply_error();
    };
}


route[4] {

    # -----------------------------------------------------------------
    # NAT Traversal Section
    # -----------------------------------------------------------------

    if (isflagset(6)) {
        force_rport();
        fix_nated_contact();
        force_rtp_proxy();
    };
}


route[5] {

# select messages to redirect:
      if ( method=="ACK" || method=="INVITE" || method=="BYE" ||
           method=="CANCEL" ){

       # switch to stateful mode:
       if (!t_newtran()){
        sl_send_reply("500","could not create transaction");
        break;
       };

       # prevent timeout on the other side:
       t_reply("100","Trying - just wait a minute !");
       
       # actively absorb ACKs
       if (method == "ACK") {
         t_relay();
         break;
       }

       if (method=="INVITE"){

      if (nat_uac_test("19")) {
                   setflag(6);
        }

        # redirect the call to the 'conference' plug-in
        # if the URI begin with 100
        if (uri=~"sip:100.*@") {

  # assumes that Sems configuration parameter 'socket_name='
           # has been set to /tmp/am_sock
           if(!t_write_req("/tmp/am_fifo","conference")) {
              t_reply("500","error contacting sems");
           };
           break;
            
            route(4);
            route(1);
        };

       }
       else if (method=="BYE" || method=="CANCEL") {

        # Sems should already know which plug-in is handling that
                # call. "bye" is no plug-in name. It is a reserved name 
which
        # tells Sems to terminate the call.

        if(!t_write_req("/tmp/am_fifo","bye")) {
            t_reply("500","error contacting sems");
        };
       };
      };

}

_______________________________________________________

Best regards,

Ravic Costa




More information about the sr-users mailing list