> On 09.05.2011 22:44, JR Richardson wrote: > > Would there be any usage examples of dialog module? I'm not sure if I > > really need profiles and [values] and when to set and unset. A push > > in the right direction would be helpful. > > Hi, > here is an example I've used for incoming and outgoing calls tracking, > just tune it for your purposes: > > loadmodule "dialog.so" > modparam("dialog", "dlg_flag", 4) > modparam("dialog", "db_mode", 1) > modparam("dialog", "profiles_with_value", "carrierin;carrierout") > ... > create_dialog(); > if(is_from_gw()) > { > # Monitor number of incoming calls > get_profile_size("carrierin","$si","$avp(s:cnt)"); > xlog("L_INFO", "----- currently, the carrier $si has > $avp(s:cnt) active outgoing calls\n"); > set_dlg_profile("carrierin","$si"); > } else { > # Monitor number of outgoing calls > get_profile_size("carrierout","$rd","$avp(s:cnt)"); > xlog("L_INFO", "----- currently, the carrier $rd has > $avp(s:cnt) active outgoing calls\n"); > set_dlg_profile("carrierout","$rd"); > } > > -- > Sincerely, > Andrew Pogrebennyk
Thanks Andrew, very nice example, this will definitely help. Have a great day. JR _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users