Discussion:
[asterisk-dev] write my self app. Debug
i***@magnussolution.com
2018-09-12 16:09:56 UTC
Permalink
Hello.

I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.

My question is about DEBUG, where or how, I can get details about errors?

Exist any documentation to DEBUG.


My app overview:

Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.



Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digi
James Finstrom
2018-09-12 18:11:07 UTC
Permalink
This is missing a lot of useful information.

How is your app interfaced to asterisk?
ARI?
AGI?
AMI?

What language?
Are you using a library?

There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool

gpg: https://github.com/jfinstrom.gpg

This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listi
i***@magnussolution.com
2018-09-12 19:08:48 UTC
Permalink
hi, thanks for try help me.

I using C. I’m create in Asterisk-13/apps/app_mbilling.c

Native application to Asterisk.
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://list
BJ Weschke
2018-09-12 19:11:20 UTC
Permalink
Why a native application? What data are you looking to store in the DB? It seems like you could do what you’re looking to do in the dial plan with func_odbc. 

-- 
BJ Weschke
Sent with Airmail

On September 12, 2018 at 3:12:35 PM, ***@magnussolution.com (***@magnussolution.com) wrote:

hi, thanks for try help me.

I using C. I’m create in Asterisk-13/apps/app_mbilling.c

Native application to Asterisk.
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Gaston Draque
2018-09-12 19:11:48 UTC
Permalink
From the Asterisk side, I would start by looking into the different logging
facilities provided[1] but as stated, which Asterisk API you are using will
determine which logging facility to look for, how to complement it with
your own app.logging and maybe some capturing may be needed during the
learning process.

Cheers,
Gaston//

[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart.
This cause that all call hangup.
Post by i***@magnussolution.com
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call,
after save call data in my mysql database via ODBC.
Post by i***@magnussolution.com
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"email" : "***@gmail.com",
"twitter" : "@gdraque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
i***@magnussolution.com
2018-09-12 19:18:44 UTC
Permalink
i’m developing a native application to billing in realtime.

I work many years with Asterisk Billing via AGI. But it is very limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB RAM.

With my actual native C application I can get on the same server more than 40 CPS.

I wrote in C the same code that I have in php AGI.


My name is Adilson Magnus, I’m developer from www.magnusbilling.com Opensource project to Asterisk Billing.

https://github.com/magnussolution/magnusbilling6

Best regards.
From the Asterisk side, I would start by looking into the different logging facilities provided[1] but as stated, which Asterisk API you are using will determine which logging facility to look for, how to complement it with your own app.logging and maybe some capturing may be needed during the learning process.
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging <https://wiki.asterisk.org/wiki/display/AST/Logging>
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration <https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration>
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg <https://github.com/jfinstrom.gpg>
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
BJ Weschke
2018-09-12 19:26:00 UTC
Permalink
AGI is limited in its TPS scalability because it needs to fork an external application to complete processing. func_odbc run from within the dial plan does not need to fork anything external so it does not have the same scalability issues that present with an AGI based solution.

-- 
BJ Weschke
Sent with Airmail

On September 12, 2018 at 3:22:33 PM, ***@magnussolution.com (***@magnussolution.com) wrote:

i’m developing a native application to billing in realtime.

I work many years with Asterisk Billing via AGI. But it is very limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB RAM.

With my actual native C application I can get on the same server more than 40 CPS.

I wrote in C the same code that I have in php AGI.


My name is Adilson Magnus, I’m developer from www.magnusbilling.com Opensource project to Asterisk Billing.

https://github.com/magnussolution/magnusbilling6

Best regards.







On 12 Sep 2018, at 16:11, Gaston Draque <***@gmail.com> wrote:

From the Asterisk side, I would start by looking into the different logging facilities provided[1] but as stated, which Asterisk API you are using will determine which logging facility to look for, how to complement it with your own app.logging and maybe some capturing may be needed during the learning process.

Cheers,
Gaston//

[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration

On Wed, Sep 12, 2018 at 3:11 PM, James Finstrom <***@gmail.com> wrote:
This is missing a lot of useful information.

How is your app interfaced to asterisk?
ARI?
AGI?
AMI?

What language?
Are you using a library?

There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
    http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool

gpg: https://github.com/jfinstrom.gpg

This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



--
{
  "fullName" : "Gaston Draque",
  "email"    : "***@gmail.com",
  "twitter"  : "@gdraque",
  "job"      : "VoIP Space Monkey",
  "motto"    : "Clouds are made of pizza & coffee"
}

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
i***@magnussolution.com
2018-09-12 19:33:37 UTC
Permalink
that’s correct. I wrote a ael context with func_odbc and this work very well.

But, using my app_mbilling.c work more faster than ael and func_odbc.

example:
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS

But my native application crash some times.

I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond the issue, but each crash the line is different. And in /var/log/asterisk/full Log file not show any additional information.

I’m test in production with more than 40 CPS. In test server I send 75 CPS with SIPP and work perfectly.


Best regards
Post by BJ Weschke
AGI is limited in its TPS scalability because it needs to fork an external application to complete processing. func_odbc run from within the dial plan does not need to fork anything external so it does not have the same scalability issues that present with an AGI based solution.
--
BJ Weschke
Sent with Airmail
Post by i***@magnussolution.com
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB RAM.
With my actual native C application I can get on the same server more than 40 CPS.
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com <http://www.magnusbilling.com/> Opensource project to Asterisk Billing.
https://github.com/magnussolution/magnusbilling6 <https://github.com/magnussolution/magnusbilling6>
Best regards.
From the Asterisk side, I would start by looking into the different logging facilities provided[1] but as stated, which Asterisk API you are using will determine which logging facility to look for, how to complement it with your own app.logging and maybe some capturing may be needed during the learning process.
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging <https://wiki.asterisk.org/wiki/display/AST/Logging>
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration <https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration>
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg <https://github.com/jfinstrom.gpg>
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
modou lo
2018-09-12 19:44:43 UTC
Permalink
hi Dear Member can i have your helping i want to have a code which help me
to taxe users services voip/toip each calling in asterisk.
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
But my native application crash some times.
I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond the
issue, but each crash the line is different. And in /var/log/asterisk/full
Log file not show any additional information.
I’m test in production with more than 40 CPS. In test server I send 75 CPS
with SIPP and work perfectly.
Best regards
AGI is limited in its TPS scalability because it needs to fork an external
application to complete processing. func_odbc run from within the dial plan
does not need to fork anything external so it does not have the same
scalability issues that present with an AGI based solution.
--
BJ Weschke
Sent with Airmail
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very limited to
strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB
RAM.
With my actual native C application I can get on the same server more than 40 CPS.
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com
Opensource project to Asterisk Billing.
https://github.com/magnussolution/magnusbilling6
Best regards.
From the Asterisk side, I would start by looking into the different
logging facilities provided[1] but as stated, which Asterisk API you are
using will determine which logging facility to look for, how to complement
it with your own app.logging and maybe some capturing may be needed during
the learning process.
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart.
This cause that all call hangup.
Post by i***@magnussolution.com
My question is about DEBUG, where or how, I can get details about
errors?
Post by i***@magnussolution.com
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call,
after save call data in my mysql database via ODBC.
Post by i***@magnussolution.com
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
James Finstrom
2018-09-12 19:58:30 UTC
Permalink
Modou please do not hijack other peoples messages.

As mentioned in your original email

Quote:

This list is for the purpose of developmental discussion of the
Asterisk source code. For discussion of taxation in VoIP services,
you might find a better response on the asterisk-biz list or the
asterisk-users list.
hi Dear Member can i have your helping i want to have a code which help me to taxe users services voip/toip each calling in asterisk.
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
But my native application crash some times.
I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond the issue, but each crash the line is different. And in /var/log/asterisk/full Log file not show any additional information.
I’m test in production with more than 40 CPS. In test server I send 75 CPS with SIPP and work perfectly.
Best regards
AGI is limited in its TPS scalability because it needs to fork an external application to complete processing. func_odbc run from within the dial plan does not need to fork anything external so it does not have the same scalability issues that present with an AGI based solution.
--
BJ Weschke
Sent with Airmail
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB RAM.
With my actual native C application I can get on the same server more than 40 CPS.
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com Opensource project to Asterisk Billing.
https://github.com/magnussolution/magnusbilling6
Best regards.
From the Asterisk side, I would start by looking into the different logging facilities provided[1] but as stated, which Asterisk API you are using will determine which logging facility to look for, how to complement it with your own app.logging and maybe some capturing may be needed during the learning process.
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool

gpg: https://github.com/jfinstrom.gpg

This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mail
modou lo
2018-09-12 20:13:10 UTC
Permalink
Sorry Dear
Post by James Finstrom
Modou please do not hijack other peoples messages.
As mentioned in your original email
This list is for the purpose of developmental discussion of the
Asterisk source code. For discussion of taxation in VoIP services,
you might find a better response on the asterisk-biz list or the
asterisk-users list.
Post by modou lo
hi Dear Member can i have your helping i want to have a code which help
me to taxe users services voip/toip each calling in asterisk.
Post by modou lo
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work very
well.
Post by modou lo
Post by i***@magnussolution.com
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
But my native application crash some times.
I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond the
issue, but each crash the line is different. And in /var/log/asterisk/full
Log file not show any additional information.
Post by modou lo
Post by i***@magnussolution.com
I’m test in production with more than 40 CPS. In test server I send 75
CPS with SIPP and work perfectly.
Post by modou lo
Post by i***@magnussolution.com
Best regards
AGI is limited in its TPS scalability because it needs to fork an
external application to complete processing. func_odbc run from within the
dial plan does not need to fork anything external so it does not have the
same scalability issues that present with an AGI based solution.
Post by modou lo
Post by i***@magnussolution.com
--
BJ Weschke
Sent with Airmail
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very limited
to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB
RAM.
Post by modou lo
Post by i***@magnussolution.com
With my actual native C application I can get on the same server more
than 40 CPS.
Post by modou lo
Post by i***@magnussolution.com
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com
Opensource project to Asterisk Billing.
Post by modou lo
Post by i***@magnussolution.com
https://github.com/magnussolution/magnusbilling6
Best regards.
From the Asterisk side, I would start by looking into the different
logging facilities provided[1] but as stated, which Asterisk API you are
using will determine which logging facility to look for, how to complement
it with your own app.logging and maybe some capturing may be needed during
the learning process.
Post by modou lo
Post by i***@magnussolution.com
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and
restart. This cause that all call hangup.
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
My question is about DEBUG, where or how, I can get details about
errors?
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call,
after save call data in my mysql database via ODBC.
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com
--
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
modou lo
2018-09-12 20:17:47 UTC
Permalink
Sorry Dear Member you know i have a probleme and i think this way can help
me
Post by modou lo
Sorry Dear
Post by James Finstrom
Modou please do not hijack other peoples messages.
As mentioned in your original email
This list is for the purpose of developmental discussion of the
Asterisk source code. For discussion of taxation in VoIP services,
you might find a better response on the asterisk-biz list or the
asterisk-users list.
Post by modou lo
hi Dear Member can i have your helping i want to have a code which help
me to taxe users services voip/toip each calling in asterisk.
Post by modou lo
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work
very well.
Post by modou lo
Post by i***@magnussolution.com
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
But my native application crash some times.
I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond
the issue, but each crash the line is different. And in
/var/log/asterisk/full Log file not show any additional information.
Post by modou lo
Post by i***@magnussolution.com
I’m test in production with more than 40 CPS. In test server I send 75
CPS with SIPP and work perfectly.
Post by modou lo
Post by i***@magnussolution.com
Best regards
AGI is limited in its TPS scalability because it needs to fork an
external application to complete processing. func_odbc run from within the
dial plan does not need to fork anything external so it does not have the
same scalability issues that present with an AGI based solution.
Post by modou lo
Post by i***@magnussolution.com
--
BJ Weschke
Sent with Airmail
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very
limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core
and 4 GB RAM.
Post by modou lo
Post by i***@magnussolution.com
With my actual native C application I can get on the same server more
than 40 CPS.
Post by modou lo
Post by i***@magnussolution.com
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com
Opensource project to Asterisk Billing.
Post by modou lo
Post by i***@magnussolution.com
https://github.com/magnussolution/magnusbilling6
Best regards.
From the Asterisk side, I would start by looking into the different
logging facilities provided[1] but as stated, which Asterisk API you are
using will determine which logging facility to look for, how to complement
it with your own app.logging and maybe some capturing may be needed during
the learning process.
Post by modou lo
Post by i***@magnussolution.com
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and
restart. This cause that all call hangup.
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
My question is about DEBUG, where or how, I can get details about
errors?
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the
call, after save call data in my mysql database via ODBC.
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
Best regards.
--
_____________________________________________________________________
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
-- Bandwidth and Colocation Provided by http://www.api-digital.com
--
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
Post by James Finstrom
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by modou lo
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
BJ Weschke
2018-09-12 22:00:58 UTC
Permalink
Are you using AEL with your native application where you’re achieving 50 CPS?  What kind of CPS do you get when you just use the straight up dial plan along with func_odbc? It seems odd to me that you’re getting such a dramatic CPS difference between func_odbc used with an AEL dial plan and odbc within your native application. I’d have to imagine the bottleneck is somewhere else. As someone else indicated earlier on this thread, if you’re convinced that you need a native application to meet your needs, a backtrace taken against the core dump produced from the Asterisk crash would be your best bet to figure out what went wrong when the Asterisk instance crashed. 

-- 
BJ Weschke
Sent with Airmail

On September 12, 2018 at 3:37:24 PM, ***@magnussolution.com (***@magnussolution.com) wrote:

that’s correct. I wrote a ael context with func_odbc and this work very well.

But, using my app_mbilling.c work more faster than ael and func_odbc.

example:
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS

But my native application crash some times.

I add in my code many ast_log(LOG_ERROR,”LINE number”); to try fond the issue, but each crash the line is different. And in /var/log/asterisk/full Log file not show any additional information.

I’m test in production with more than 40 CPS. In test server I send 75 CPS with SIPP and work perfectly.


Best regards 




On 12 Sep 2018, at 16:26, BJ Weschke <***@btwtech.com> wrote:

AGI is limited in its TPS scalability because it needs to fork an external application to complete processing. func_odbc run from within the dial plan does not need to fork anything external so it does not have the same scalability issues that present with an AGI based solution.

-- 
BJ Weschke
Sent with Airmail

On September 12, 2018 at 3:22:33 PM, ***@magnussolution.com (***@magnussolution.com) wrote:

i’m developing a native application to billing in realtime.

I work many years with Asterisk Billing via AGI. But it is very limited to strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB RAM.

With my actual native C application I can get on the same server more than 40 CPS.

I wrote in C the same code that I have in php AGI.


My name is Adilson Magnus, I’m developer from www.magnusbilling.com Opensource project to Asterisk Billing.

https://github.com/magnussolution/magnusbilling6

Best regards.







On 12 Sep 2018, at 16:11, Gaston Draque <***@gmail.com> wrote:

From the Asterisk side, I would start by looking into the different logging facilities provided[1] but as stated, which Asterisk API you are using will determine which logging facility to look for, how to complement it with your own app.logging and maybe some capturing may be needed during the learning process.

Cheers,
Gaston//

[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration

On Wed, Sep 12, 2018 at 3:11 PM, James Finstrom <***@gmail.com> wrote:
This is missing a lot of useful information.

How is your app interfaced to asterisk?
ARI?
AGI?
AMI?

What language?
Are you using a library?

There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart. This cause that all call hangup.
My question is about DEBUG, where or how, I can get details about errors?
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call, after save call data in my mysql database via ODBC.
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
    http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool

gpg: https://github.com/jfinstrom.gpg

This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



--
{
  "fullName" : "Gaston Draque",
  "email"    : "***@gmail.com",
  "twitter"  : "@gdraque",
  "job"      : "VoIP Space Monkey",
  "motto"    : "Clouds are made of pizza & coffee"
}

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
Alex Villací­s Lasso
2018-09-12 22:28:22 UTC
Permalink
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C.
Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.

As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/a
i***@magnussolution.com
2018-09-12 23:10:38 UTC
Permalink
thanks for you help.


I try use backtrace. But I no a expert.

I using cents 7 64x

gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt

warning: exec file is newer than core file.
Missing separate debuginfo for /usr/lib64/libmyodbc5.so


[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;


to use ODBC on centos7 and mariaDB 10 I install it

yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
Matt Fredrickson
2018-09-13 21:21:02 UTC
Permalink
Post by i***@magnussolution.com
thanks for you help.
I try use backtrace. But I no a expert.
I using cents 7 64x
gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c
core.13414 > /tmp/backtrace.txt
warning: exec file is newer than core file.
It looks like your installed version of Asterisk is newer than the one
that is running. That's usually an important issue to resolve when
trying to debug an issue.
Post by i***@magnussolution.com
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;
You're going to need to post more stack frames of the backtrace than
that to get anywhere with it.

Best wishes,
Matthew Fredrickson
Post by i***@magnussolution.com
to use ODBC on centos7 and mariaDB 10 I install it
yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck
http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of
an entire process per call. FastAGI just requires a daemon that listens to
requests on a TCP/IP port. This is way less invasive than writing a whole
new Asterisk application in C. Any bottlenecks would now be located in the
FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one
or more race conditions, and the proper locking required to solve them would
slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
ht
i***@magnussolution.com
2018-09-14 13:50:47 UTC
Permalink
I get from backtrace:

Thread 168 (Thread 0x7fb5122be700 (LWP 1411)):
#0 0x00007fb57e0cdf0d in poll () from /lib64/libc.so.6
#1 0x00000000004b245c in ast_waitfor_nandfds (c=0x7fb554081db8, n=1, fds=0x7fb554081e50, nfds=1, exception=0x0, outfd=0x7fb5122b6c50, ms=0x7fb5122b6c54) at channel.c:3170
#2 0x0000000000484b87 in bridge_channel_wait (bridge_channel=0x7fb554081d80) at bridge_channel.c:2602
#3 0x00000000004853b1 in bridge_channel_internal_join (bridge_channel=0x7fb554081d80) at bridge_channel.c:2768
#4 0x000000000046b949 in ast_bridge_join (bridge=0x7fb554080590, chan=0x7fb560285300, swap=0x0, features=0x7fb5122b6dc0, tech_args=0x0, flags=(AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP)) at bridge.c:1713
#5 0x000000000050a610 in ast_bridge_call_with_flags (chan=0x7fb560285300, peer=0x7fb554045c90, config=0x7fb5122b7e90, flags=0) at features.c:671
#6 0x000000000050a6e2 in ast_bridge_call (chan=0x7fb560285300, peer=0x7fb554045c90, config=0x7fb5122b7e90) at features.c:710
#7 0x00007fb535b8b4b7 in dial_exec_full (chan=0x7fb560285300, data=0x7fb5122b85d0 "SIP/CC-MOVEL-TDM-FT/33105587988477247,60,L(764234560:61000:30000)", peerflags=0x7fb5122bb290, continue_exec=0x0) at app_mbilling.c:2752
#8 0x00007fb535b90a5c in mbilling_exec (chan=0x7fb560285300, data=0x652b69 "") at app_mbilling.c:3959
#9 0x0000000000582bb1 in pbx_exec (c=0x7fb560285300, app=0x7fb57001f950, data=0x7fb5122bb4f0 "") at pbx_app.c:494
#10 0x000000000056ff34 in pbx_extension_helper (c=0x7fb560285300, con=0x0, context=0x7fb560285cb8 "billing", exten=0x7fb560285d08 "087988477247", priority=1, label=0x0, callerid=0x7fb56019b080 "4330152780", action=E_SPAWN, found=0x7fb5122bdba4, combined_find_spawn=1) at pbx.c:2886
#11 0x00000000005735ad in ast_spawn_extension (c=0x7fb560285300, context=0x7fb560285cb8 "billing", exten=0x7fb560285d08 "087988477247", priority=1, callerid=0x7fb56019b080 "4330152780", found=0x7fb5122bdba4, combined_find_spawn=1) at pbx.c:4111
#12 0x0000000000574288 in __ast_pbx_run (c=0x7fb560285300, args=0x0) at pbx.c:4288
#13 0x0000000000575a58 in pbx_thread (data=0x7fb560285300) at pbx.c:4610
#14 0x00000000005f9ba9 in dummy_start (data=0x7fb5604b20a0) at utils.c:1239
#15 0x00007fb57edfae25 in start_thread () from /lib64/libpthread.so.0
#16 0x00007fb57e0d8bad in clone () from /lib64/libc.so.6



My code:

line 2752: res = ast_bridge_call(chan, peer, &config);


memset(&peerflags, 0, sizeof(peerflags));
snprintf(dialcommand, sizeof(dialcommand), "SIP/%s/%s%s",trunkcode,trunkdestination,dialparams);
ast_channel_data_set(chan, dialcommand);
line 3959: dial_exec_full(chan, dialcommand, &peerflags, NULL);


Have any method to use function from another app? for example, the function dial_exec_full. I rewrite all function inside my app. Exist any method to use from app_dial.c?

Best regards
Post by i***@magnussolution.com
thanks for you help.
I try use backtrace. But I no a expert.
I using cents 7 64x
gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt
warning: exec file is newer than core file.
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;
to use ODBC on centos7 and mariaDB 10 I install it
yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm <http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm>
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
i***@magnussolution.com
2018-09-17 13:59:48 UTC
Permalink
Hi, sorry bother you.

I get a new backtrace

Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
No symbol table info available.
#1 0x0000000000533c38 in __ast_pthread_mutex_lock (filename=<optimized out>, lineno=<optimized out>, func=<optimized out>, mutex_name=<optimized out>, t=<optimized out>) at lock.c:315
No locals.
#2 0x00007f829927aa12 in ast_odbc_release_obj (obj=***@entry=0x7f81e8021900) at res_odbc.c:724
class = 0x0
__PRETTY_FUNCTION__ = "ast_odbc_release_obj"
#3 0x00007f81c2aee0b1 in dial_exec (chan=<optimized out>, data=0x7f81c3e85ae0 “\"SIP/magnus\"") at app_mbilling.c:4220




My code line 4219 - 4222:

4219 if(obj){
4220 ast_odbc_release_obj(obj);
4221 obj = NULL;
4222 }


Please help me.

Best regards
Post by i***@magnussolution.com
thanks for you help.
I try use backtrace. But I no a expert.
I using cents 7 64x
gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt
warning: exec file is newer than core file.
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;
to use ODBC on centos7 and mariaDB 10 I install it
yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm <http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm>
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
Post by i***@magnussolution.com
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
Matt Fredrickson
2018-09-17 21:48:31 UTC
Permalink
Post by i***@magnussolution.com
Hi, sorry bother you.
I get a new backtrace
Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
No symbol table info available.
#1 0x0000000000533c38 in __ast_pthread_mutex_lock (filename=<optimized out>, lineno=<optimized out>, func=<optimized out>, mutex_name=<optimized out>, t=<optimized out>) at lock.c:315
No locals.
class = 0x0
__PRETTY_FUNCTION__ = "ast_odbc_release_obj"
#3 0x00007f81c2aee0b1 in dial_exec (chan=<optimized out>, data=0x7f81c3e85ae0 “\"SIP/magnus\"") at app_mbilling.c:4220
4219 if(obj){
4220 ast_odbc_release_obj(obj);
4221 obj = NULL;
4222 }
Is it possible that our released the object multiple times? If class
= 0x0 at the time of that lock in the release, that would indicate
that the obj->parent field has been set to 0x0 already by
somebody/something earlier.

Not sure how much more that can be helped here since you're asking
coding advice about a module that we can't see the source to.

Best wishes,
Matthew Fredrickson
Post by i***@magnussolution.com
Please help me.
Best regards
thanks for you help.
I try use backtrace. But I no a expert.
I using cents 7 64x
gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt
warning: exec file is newer than core file.
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;
to use ODBC on centos7 and mariaDB 10 I install it
yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailma
i***@magnussolution.com
2018-09-17 22:13:57 UTC
Permalink
hi, you are correct. I try release two time.

best regards
Post by Matt Fredrickson
Post by i***@magnussolution.com
Hi, sorry bother you.
I get a new backtrace
Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
#0 0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0
No symbol table info available.
#1 0x0000000000533c38 in __ast_pthread_mutex_lock (filename=<optimized out>, lineno=<optimized out>, func=<optimized out>, mutex_name=<optimized out>, t=<optimized out>) at lock.c:315
No locals.
class = 0x0
__PRETTY_FUNCTION__ = "ast_odbc_release_obj"
#3 0x00007f81c2aee0b1 in dial_exec (chan=<optimized out>, data=0x7f81c3e85ae0 “\"SIP/magnus\"") at app_mbilling.c:4220
4219 if(obj){
4220 ast_odbc_release_obj(obj);
4221 obj = NULL;
4222 }
Is it possible that our released the object multiple times? If class
= 0x0 at the time of that lock in the release, that would indicate
that the obj->parent field has been set to 0x0 already by
somebody/something earlier.
Not sure how much more that can be helped here since you're asking
coding advice about a module that we can't see the source to.
Best wishes,
Matthew Fredrickson
Post by i***@magnussolution.com
Please help me.
Best regards
thanks for you help.
I try use backtrace. But I no a expert.
I using cents 7 64x
gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt
warning: exec file is newer than core file.
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /usr/lib64/libmyodbc5.so
Core was generated by `asterisk -vvvvvvvg'.
Program terminated with signal 11, Segmentation fault.
#0 ast_odbc_release_obj (obj=0x0) at res_odbc.c:712
712 struct odbc_class *class = obj->parent;
to use ODBC on centos7 and mariaDB 10 I install it
yum -y remove mysql-connector-odbc
yum -y localinstall --nogpgcheck http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
that’s correct. I wrote a ael context with func_odbc and this work very well.
But, using my app_mbilling.c work more faster than ael and func_odbc.
agi 15 CPS
ael-func_odbc 30 CPS
native application 50 CPS
Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.
As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> --
Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference <https://www.asterisk.org/community/astricon-user-conference>
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev <http://lists.digium.com/mailman/listinfo/asterisk-dev>
Gaston Draque
2018-09-12 19:41:11 UTC
Permalink
You would most likely use ast_log() [main/logger.c] to take care of your
logging, but it seems your server is crashing, so you need a backtrace from
the core dump.[1][2] so see why your asterisk is dying on you.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace
[2] https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5243139
Post by i***@magnussolution.com
i’m developing a native application to billing in realtime.
I work many years with Asterisk Billing via AGI. But it is very limited to
strong CPS. With 10-15 CPS the server crash. Server with 2 core and 4 GB
RAM.
With my actual native C application I can get on the same server more than 40 CPS.
I wrote in C the same code that I have in php AGI.
My name is Adilson Magnus, I’m developer from www.magnusbilling.com
Opensource project to Asterisk Billing.
https://github.com/magnussolution/magnusbilling6
Best regards.
From the Asterisk side, I would start by looking into the different
logging facilities provided[1] but as stated, which Asterisk API you are
using will determine which logging facility to look for, how to complement
it with your own app.logging and maybe some capturing may be needed during
the learning process.
Cheers,
Gaston//
[1] https://wiki.asterisk.org/wiki/display/AST/Logging
[1] https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
Post by James Finstrom
This is missing a lot of useful information.
How is your app interfaced to asterisk?
ARI?
AGI?
AMI?
What language?
Are you using a library?
There simply isn't enough here to give a qualified answer
Post by i***@magnussolution.com
Hello.
I’m developing a new app. But i’m a problem. The app crash and restart.
This cause that all call hangup.
Post by i***@magnussolution.com
My question is about DEBUG, where or how, I can get details about
errors?
Post by i***@magnussolution.com
Exist any documentation to DEBUG.
Connect mysql via ODBC, mount the DIAL command and execute the call,
after save call data in my mysql database via ODBC.
Post by i***@magnussolution.com
Best regards.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
Post by i***@magnussolution.com
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
James Finstrom
Guy who does stuff that is sometimes cool
gpg: https://github.com/jfinstrom.gpg
This email was sent from a personal email account. The content of this
email is not endorsed by my employer or any project I may be a part
of. The contents of this email should be considered my opinion and not
taken as any form of official response. Please keep your hands and
feet in the ride while in motion. Please be sure to tip the wait
staff.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"job" : "VoIP Space Monkey",
"motto" : "Clouds are made of pizza & coffee"
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
https://www.asterisk.org/community/astricon-user-conference
asterisk-dev mailing list
http://lists.digium.com/mailman/listinfo/asterisk-dev
--
{
"fullName" : "Gaston Draque",
"email" : "***@gmail.com",
"twitter" : "@gdraque",
"job" : "VoIP Space Monkey",
"tags" : ["uc communications","telecom integrator","software
developer","asterisk warrior","clouds builder"],
"motto" : "Clouds are made of pizza & coffee"
}
Loading...