[OpenSIPS-Users] cdr and Dialog on opensips-cp
Engineer voip
forvoip4 at gmail.com
Sat Aug 25 12:44:12 CEST 2012
Hi,
I had a problem with the script "opensips_cdrs.mysql" as cdr_id fields
is already exists in the table acc, so I commented the line that adds
cdr_id to the table acc in the script generate.mysql
and I configured the acc module in opensips.cfg as follows:
loadmodule "acc.so"
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 0)
modparam("acc", "detect_direction", 0)
modparam("acc", "failed_transaction_flag", 24)
modparam("acc", "db_flag", 2)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_table_missed_calls", "missed_calls")
modparam("acc", "cdr_flag",1)
modparam("acc", "db_table_acc", "acc")
modparam("acc", "db_url","mysql://opensips:opensipsrw@localhost/opensips")
Also i changed this ligne "mysql -h $HOSTNAME -u $USER -p$PASS -e
"call opensips_cdrs_1.6(); " $DATABASE"
in generate_cdrs.mysql to "mysql -h $HOSTNAME -u $USER -p$PASS -e
"call opensips_cdrs(); " $DATABASE"
Thank you All
2012/8/25, Ali Pey <alipey at gmail.com>:
> What was the problem? How did you fix it?
>
> It's good to mention your problems and solutions for people that might
> experience the same problem in the future.
>
> Regards,
> Ali Pey
>
> On Fri, Aug 24, 2012 at 7:10 PM, Engineer voip <forvoip4 at gmail.com> wrote:
>
>> Hello,
>> It's good, i can to get CDRs and Dialog information using OCP.
>> Thank you to all those who helped me.
>>
>> Best Regards
>>
>> 2012/8/24, Binan AL Halabi <binanalhalabi at yahoo.com>:
>> > Hi,
>> >
>> > restart DB
>> > restart opensips
>> > reload apache (service httpd reload)
>> >
>> > //Binan
>> >
>> > --- On Fri, 8/24/12, Ali Pey <alipey at gmail.com> wrote:
>> >
>> > From: Ali Pey <alipey at gmail.com>
>> > Subject: Re: [OpenSIPS-Users] cdr and Dialog on opensips-cp
>> > To: "Engineer voip" <forvoip4 at gmail.com>
>> > Cc: "OpenSIPS users mailling list" <users at lists.opensips.org>
>> > Date: Friday, August 24, 2012, 8:37 AM
>> >
>> > Did you get an error for the dlg_list command? Did you try to make some
>> > calls and try the dialog list command?
>> > Basically this means your fifo is working but you don't either have
>> dialog
>> > module loaded or your opensips-cp is not working. Look at your
>> opensipsctl
>> > config file in your config directory and see where it's pointing for
>> > the
>> > fifo file. Make sure it matches your opensips-cp configuration.
>> >
>> > Regards,Ali Pey
>> > On Fri, Aug 24, 2012 at 9:45 AM, Engineer voip <forvoip4 at gmail.com>
>> wrote:
>> >
>> > Hello,
>> >
>> >
>> >
>> > ** The result of opensipsctl fifo arg is:
>> >
>> >
>> >
>> > root at Poste-810:/usr/local/sbin# opensipsctl fifo arg
>> >
>> > /usr/local/sbin/opensips
>> >
>> > -P
>> >
>> > /var/run/opensips/opensips.pid
>> >
>> > -m
>> >
>> > 64
>> >
>> > -M
>> >
>> > 4
>> >
>> > -u
>> >
>> > opensips
>> >
>> > -g
>> >
>> > opensips
>> >
>> >
>> >
>> > ** But no resultat for opensipsctl fifo dlg_list
>> >
>> > 2012/8/24, Ali Pey <alipey at gmail.com>:
>> >
>> >> Try these commands:
>> >
>> >>
>> >
>> >> opensipsctl fifo arg
>> >
>> >> opensipsctl fifo dlg_list
>> >
>> >>
>> >
>> >> and post the results here. This should give you a pretty good clue.
>> >
>> >>
>> >
>> >> Regards,
>> >
>> >> Ali Pey
>> >
>> >>
>> >
>> >> On Fri, Aug 24, 2012 at 8:47 AM, Engineer voip <forvoip4 at gmail.com>
>> >> wrote:
>> >
>> >>
>> >
>> >>> Hello,
>> >
>> >>>
>> >
>> >>> ** how can i verify that MI connector points to the server?
>> >
>> >>>
>> >
>> >>> ** I have loadid the dialog module in my opensips.cfg like that:
>> >
>> >>>
>> >
>> >>> loadmodule "dialog.so"
>> >
>> >>> modparam("dialog", "dlg_match_mode", 1)
>> >
>> >>> modparam("dialog", "default_timeout", 21600) # 6 hours timeout
>> >
>> >>> modparam("dialog", "db_mode", 1)
>> >
>> >>> modparam("dialog", "db_update_period", 30)
>> >
>> >>> modparam("dialog", "table_name", "dialog")
>> >
>> >>> modparam("dialog",
>> >
>> >>> "db_url","mysql://opensips:opensipsrw@localhost/opensips") #
>> >>> CUSTOMIZE
>> >
>> >>> ME
>> >
>> >>> modparam("dialog", "call_id_column", "callid")
>> >
>> >>> modparam("dialog", "from_uri_column", "from_uri")
>> >
>> >>> modparam("dialog", "from_tag_column", "from_tag")
>> >
>> >>> modparam("dialog", "to_uri_column", "to_uri")
>> >
>> >>> modparam("dialog", "to_tag_column", "to_tag")
>> >
>> >>> modparam("dialog", "from_cseq_column", "caller_cseq")
>> >
>> >>> modparam("dialog", "to_cseq_column", "callee_cseq")
>> >
>> >>> modparam("dialog", "state_column", "state")
>> >
>> >>> modparam("dialog", "start_time_column", "start_time")
>> >
>> >>>
>> >
>> >>> ** For information in my acc table the cdr_id value is empty and i
>> >
>> >>> don't know how i do to have it, any idea please??
>> >
>> >>>
>> >
>> >>>
>> >
>> >>> Regards
>> >
>> >>>
>> >
>> >>> 2012/8/24, Bogdan-Andrei Iancu <bogdan at opensips.org>:
>> >
>> >>> > Hi,
>> >
>> >>> >
>> >
>> >>> > Are you 100% sure that the MI connector you put in CP
>> >
>> >>> > ("/tmp/opensips_fifo") points to the server you actually want to
>> >
>> >>> > interrogate for dialogs ?
>> >
>> >>> >
>> >
>> >>> > As I see the MI communication works (as you get the "command
>> >>> > dlg_list
>> >
>> >>> > is
>> >
>> >>> > not available" reply), but it seems you talk from CP with an
>> >>> > opensips
>> >
>> >>> > which does not have dialog module loaded.
>> >
>> >>> >
>> >
>> >>> > I leads to 2 options: either you talk to wrong opensips instance,
>> >
>> >>> > either
>> >
>> >>> > your opensips (if only one) loads a different cfg file than you
>> >>> > think
>> >
>> >>> > (maybe uses the default one instead the one you listed here).
>> >
>> >>> >
>> >
>> >>> > Regards,
>> >
>> >>> >
>> >
>> >>> > Bogdan-Andrei Iancu
>> >
>> >>> > OpenSIPS Founder and Developer
>> >
>> >>> > http://www.opensips-solutions.com
>> >
>> >>> >
>> >
>> >>> >
>> >
>> >>> > On 08/24/2012 01:30 PM, Engineer voip wrote:
>> >
>> >>> >> Hello,
>> >
>> >>> >>
>> >
>> >>> >> yes i have configured them like:
>> >
>> >>> >>
>> >
>> >>> >> db.inc.php configuration is:
>> >
>> >>> >>
>> >
>> >>> >> $config->db_driver = "mysql";
>> >
>> >>> >>
>> >
>> >>> >> //database host
>> >
>> >>> >> $config->db_host = "localhost";
>> >
>> >>> >>
>> >
>> >>> >> //database port - leave empty for default
>> >
>> >>> >> $config->db_port = "";
>> >
>> >>> >>
>> >
>> >>> >> //database connection user
>> >
>> >>> >> $config->db_user = "root";
>> >
>> >>> >>
>> >
>> >>> >> //database connection password
>> >
>> >>> >> $config->db_pass = "1234";
>> >
>> >>> >>
>> >
>> >>> >> //database name
>> >
>> >>> >> $config->db_name = "opensips";
>> >
>> >>> >>
>> >
>> >>> >> if (!empty($config->db_port) ) $config->db_host =
>> >>> >> $config->db_host
>> >>> >> .
>> >
>> >>> >> ":" . $config->db_port;
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>>
>> --------------------------------------------------------------------------------------------------------------------------------------
>> >
>> >>> >> boxes.global.inc.php configuration:
>> >
>> >>> >>
>> >
>> >>> >> $box_id=0;
>> >
>> >>> >>
>> >
>> >>> >> // mi host:port pair || fifo_file
>> >
>> >>> >> //$boxes[$box_id]['mi']['conn']="127.0.0.1:8000";
>> >
>> >>> >> $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
>> >
>> >>> >>
>> >
>> >>> >> // monit host:port
>> >
>> >>> >> //$boxes[$box_id]['monit']['conn']="192.168.1.7:2812";
>> >
>> >>> >> //$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
>> >
>> >>> >> $boxes[$box_id]['monit']['user']="admin";
>> >
>> >>> >> $boxes[$box_id]['monit']['pass']="admin";
>> >
>> >>> >> $boxes[$box_id]['monit']['has_ssl']=0;
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >> // description (appears in mi , monit )
>> >
>> >>> >> $boxes[$box_id]['desc']="SIP server";
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >> $boxes[$box_id]['assoc_id']=1;
>> >
>> >>> >>
>> >
>> >>> >> // enable local smonitor charts on this box : 0=disabled 1=enabled
>> >
>> >>> >> // (cron)
>> >
>> >>> >> $boxes[$box_id]['smonitor']['charts']=1;
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >> Thanks
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >>
>> >
>> >>> >> 2012/8/24, Binan AL Halabi<binanalhalabi at yahoo.com>:
>> >
>> >>> >>> Hi,
>> >
>> >>> >>>
>> >
>> >>> >>> have you configured files "db.inc.php" and
>> >
>> >>> >>> "boxes.global.inc.php" ?
>> >
>> >>> >>>
>> >
>> >>> >>> --- On Thu, 8/23/12, Engineer voip<forvoip4 at gmail.com> wrote:
>> >
>> >>> >>>
>> >
>> >>> >>> From: Engineer voip<forvoip4 at gmail.com>
>> >
>> >>> >>> Subject: Re: [OpenSIPS-Users] cdr and Dialog on opensips-cp
>> >
>> >>> >>> To: "OpenSIPS users mailling list"<users at lists.opensips.org>
>> >
>> >>> >>> Date: Thursday, August 23, 2012, 3:00 PM
>> >
>> >>> >>>
>> >
>> >>> >>> Hi,
>> >
>> >>> >>> someone can help me please !!
>> >
>> >>> >>>
>> >
>> >>> >>> 2012/8/23, Engineer voip<forvoip4 at gmail.com>:
>> >
>> >>> >>>> Hello,
>> >
>> >>> >>>> I did all this procedures but don't work
>> >
>> >>> >>>>
>> >
>> >>> >>>> my dialog configuration is:
>> >
>> >>> >>>>
>> >
>> >>> >>>> ### dialog module ####
>> >
>> >>> >>>> loadmodule "dialog.so"
>> >
>> >>> >>>> modparam("dialog", "dlg_match_mode", 1)
>> >
>> >>> >>>> modparam("dialog", "default_timeout", 21600) # 6 hours timeout
>> >
>> >>> >>>> modparam("dialog", "db_mode", 1)
>> >
>> >>> >>>> modparam("dialog", "db_update_period", 30)
>> >
>> >>> >>>> modparam("dialog", "table_name", "dialog")
>> >
>> >>> >>>> modparam("dialog",
>> >
>> >>> >>>> "db_url","mysql://opensips:opensipsrw@localhost/opensips")
>> >
>> >>> >>>> modparam("dialog", "call_id_column", "callid")
>> >
>> >>> >>>> modparam("dialog", "from_uri_column", "from_uri")
>> >
>> >>> >>>> modparam("dialog", "from_tag_column", "from_tag")
>> >
>> >>> >>>> modparam("dialog", "to_uri_column", "to_uri")
>> >
>> >>> >>>> modparam("dialog", "to_tag_column", "to_tag")
>> >
>> >>> >>>> modparam("dialog", "from_cseq_column", "caller_cseq")
>> >
>> >>> >>>> modparam("dialog", "to_cseq_column", "callee_cseq")
>> >
>> >>> >>>> modparam("dialog", "state_column", "state")
>> >
>> >>> >>>> modparam("dialog", "start_time_column", "start_time")
>> >
>> >>> >>>>
>> >
>> >>> >>>>
>> >
>> >>> >>>> Thank you for your help.
>> >
>> >>> >>>>
>> >
>> >>> >>>> Regards
>> >
>> >>> >>>>
>> >
>> >>> >>>> 2012/8/23, Binan AL Halabi<binanalhalabi at yahoo.com>:
>> >
>> >>> >>>>> Hi ,
>> >
>> >>> >>>>> 1- for Dialog : you have to load& configure the
>> >
>> >>> >>>>> module "dialog" in OpenSIPS script.
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> 2- for CDR viewer :
>> >
>> >>> >>>>> - add table *cdrs.mysql* and stored procedure
>> >
>> >>> *opensips_cdrs.mysql*
>> >
>> >>> >>>>> to OPENSIPS database
>> >
>> >>> >>>>> - edit the cron_job/generate-cdrs_mysql.sh file and change
>> >>> >>>>> the
>> >
>> >>> >>>>> mysql
>> >
>> >>> >>>>> connection data (hostname,username,password and database)
>> >
>> >>> >>>>> - call the script from the cron
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> check the opensips-cp INSTALL file for this.
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> //Binan
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> --- On Thu, 8/23/12, Engineer voip<forvoip4 at gmail.com> wrote:
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> From: Engineer voip<forvoip4 at gmail.com>
>> >
>> >>> >>>>> Subject: Re: [OpenSIPS-Users] cdr and Dialog on opensips-cp
>> >
>> >>> >>>>> To: "OpenSIPS users mailling list"<users at lists.opensips.org>
>> >
>> >>> >>>>> Date: Thursday, August 23, 2012, 6:15 AM
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> hello,
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> when i click "dialog" i get the message "
>> >
>> >>> >>>>> ERROR:mi_fifo:mi_fifo_server: command dlg_list is not available
>> >>> >>>>> "
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> thank you for help
>> >
>> >>> >>>>>
>> >
>> >>> >>>>> 2012/8/23, Binan AL Halabi<binanalhalabi at yahoo.com>:
>> >
>> >>> >>>>>> Hi,
>> >
>> >>> >>>>>> what you get when you click "dialog" under "system" list on
>> >
>> >>> >>>>>> opensips-cp
>> >
>> >>> >>>>>> ?
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> //Binan
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> --- On Thu, 8/23/12, Engineer voip<forvoip4 at gmail.com> wrote:
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> From: Engineer voip<forvoip4 at gmail.com>
>> >
>> >>> >>>>>> Subject: [OpenSIPS-Users] cdr and Dialog on opensips-cp
>> >
>> >>> >>>>>> To: "OpenSIPS users mailling list"<users at lists.opensips.org>
>> >
>> >>> >>>>>> Date: Thursday, August 23, 2012, 3:06 AM
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> Hello All,
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> I'm using opensips-cp with opensips 1.8, and i can do the call
>> >
>> >>> >>>>>> between
>> >
>> >>> >>>>>> two
>> >
>> >>> >>>>>> users but i can't get the CDRs and Dialog informations by
>> >>> >>>>>> using
>> >
>> >>> >>>>>> opensips-cp.
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> someone can help me, please?
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> thanks
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> -----Inline Attachment Follows-----
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>>> _______________________________________________
>> >
>> >>> >>>>>> Users mailing list
>> >
>> >>> >>>>>> Users at lists.opensips.org
>> >
>> >>> >>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >>> >>>>>>
>> >
>> >>> >>>>> _______________________________________________
>> >
>> >>> >>>>> Users mailing list
>> >
>> >>> >>>>> Users at lists.opensips.org
>> >
>> >>> >>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >>> >>>>>
>> >
>> >>> >>> _______________________________________________
>> >
>> >>> >>> Users mailing list
>> >
>> >>> >>> Users at lists.opensips.org
>> >
>> >>> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >>> >>>
>> >
>> >>> >> _______________________________________________
>> >
>> >>> >> Users mailing list
>> >
>> >>> >> Users at lists.opensips.org
>> >
>> >>> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >>> >>
>> >
>> >>> >
>> >
>> >>>
>> >
>> >>> _______________________________________________
>> >
>> >>> Users mailing list
>> >
>> >>> Users at lists.opensips.org
>> >
>> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >>>
>> >
>> >>
>> >
>> >
>> >
>> >
>> > -----Inline Attachment Follows-----
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
More information about the Users
mailing list