[asterisk-users] dialog module count

Chandrakant Solanki solanki.chandrakant at gmail.com
Thu Jul 22 05:53:25 CDT 2010


Hello

I need *count* for number of active calls on kamailio server. I have done
following configuration in my kamailio.cfg file

...
loadmodule "dialog.so"
modparam("dialog","profiles_with_value","caller")
modparam("dialog", "dlg_flag", 4)
....

route[0] {
         ...
         if(is_method("INVITE"))
         {
                  get_profile_size("caller", "$fu", "$var(SIZE)");
                  xlog("L_INFO", "========== $var(SIZE) \n");

                   if( $var(SIZE) < 1 ){
                           set_dlg_profile("caller","$fu");
                           xlog("L_INFO", "M IN server1 ONLY \n");
                           use_media_proxy();
                            record_route();
                            rewritehostport("server.pbx.com:5060");
                            route(8);
                  }
                  else {
                             set_dlg_profile("caller","$fu");
                             xlog("L_INFO", "M GOING TO SERVER2");
                             sl_send_reply("100", "Trying");
                            ds_select_domain("1", "4");
                            forward();
                  }
              xlog("L_INFO", "+++++++++++ ========== $var(SIZE) \n");
              exit;
          }

         ...
}

Is anything missing in above configuration or something goes wrong.?

-- 
Regards,

Chandrakant Solanki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100722/1ff4f337/attachment.htm 


More information about the asterisk-users mailing list