[SR-Users] SIP Trunk Usage Monitoring

JR Richardson jmr.richardson at gmail.com
Tue May 10 15:41:49 CEST 2011


> 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




More information about the sr-users mailing list