Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ganapathi

Pages: 1 ... 4 5 [6]
76
Hi

unable to use svn patch due to that ,Attached git patch.

I hope it's should be same as i guess.

77
Hi

As suggested modified the cdrbuilder emit function like mentioned below. 

   m->addParam("ringtime",printTime(buf,t_answer - t_ringing));

   //HoldTime Calculation
   if (String(m_status) == YSTRING("hold") ) {
      m_hold = Time::msecNow();
   }
   if (String(m_status) == YSTRING("unhold") && m_hold && ( m_hold > 0 ) ){
      m_unhold =   Time::msecNow();
      if(m_holdsec)
      m_holdsec = m_holdsec + m_unhold - m_hold;
      else
      m_holdsec = m_unhold - m_hold;
   }

   m->addParam("holdtime",printTime(buf,m_holdsec));   
   //
    m->addParam("status",m_status);

It should work ?

78
So you meant to say my calculation in cdrhandler: received function needs to do on cdrbuilder:emit function itself before emitting the variable with help of cdrbuilder's current data? .

Let me try that then

79
Yate users hangout place / CDRBuild - Holdtime Modification - 6.0.1
« on: June 10, 2018, 01:25:16 AM »
Hi

As I trying to add holdtime in core level instead of custom patch, but almost calculated the holdtime and debug console emitting the value properly but failed to add into emitting CDR message to get it stored in Database.

Due to clear show fully operational function are hidden with “..” value.

Appreciated if Anybody help me on this.

Yate Version : 6.0.1-dev

SIP Client/IP Phone : For Making Call.

Ysipchan.cpp:


bool YateSIPConnection::reInviteProxy(SIPTransaction* t, MimeSdpBody* sdp, int invite)

{

..

..

..

 

    msg->addParam("audio_changed",String::boolText(audioChg));

    msg->addParam("mute",String::boolText(MediaStarted != m_mediaStatus));

// Holdtime Patch START

   if( MediaStarted != m_mediaStatus)

      msg->addParam("status","hold");

   else

         msg->addParam("status","unhold");

// Holdtime Patch END

    putMedia(*msg);

    Engine::enqueue(msg);

..

..

..

}

 

 

Cdrbuild.cpp:

 

Variable Initialization :

 

class CdrHandler : public MessageHandler

{

public:

    CdrHandler(const char *name, int type, int prio = 50)

                                                          : MessageHandler(name,prio,__plugin.name()),

                                                            m_type(type)

                                                          { }

    virtual bool received(Message &msg);

private:

    int m_type;

    u_int64_t

      m_holdsec,

      m_hold,

      m_unhold;                                     

};

 

 

Variable Initialization 2 :

 

class CdrBuilder : public NamedList

{

public:

..

..

..

private:

    u_int64_t

     m_start,

     m_call,

     m_ringing,

     m_answer,

     m_holdsec,                                     

     m_hangup;

..

..

..

}

 

Variable Initializations 3 :

 

CdrBuilder::CdrBuilder(const char *name)

    : NamedList(name), m_dir("unknown"), m_status("unknown"),

      m_first(true), m_write(true)

{

    m_statusTime = m_start = m_call = m_ringing = m_answer = m_hangup = m_holdsec = 0;

    m_cdrId = ++s_seq;

}

 

Hold Time Calculation On cdrbuild function :

 

bool CdrHandler::received(Message &msg)

{

    Lock lock(s_mutex);

..

..

..

 

if (m_type == CdrUpdate) {

const String* oper = msg.getParam(YSTRING("operation"));

const String* TBmute = msg.getParam(YSTRING("mute"));

if (oper && (*oper != YSTRING("cdrbuild")) )

  track = false;

  if (oper && TBmute && (*TBmute == YSTRING("true")) ) {

   track = true;

   m_hold = Time::msecNow();

  }

  if (oper && TBmute && (*TBmute == YSTRING("false") ) && m_hold && ( m_hold > 0 ) ){

   track = true;

   m_unhold =                                       Time::msecNow();

   if(m_holdsec)

     m_holdsec = m_holdsec + m_unhold - m_hold;

   else

     m_holdsec = m_unhold - m_hold;

   if(m_holdsec)

    Debug("cdrbuild",DebugAll,"TBholdtime is '%lu'",m_holdsec);

  }

}

..

..

..

}

 

Holdtime Emit Function :

 

void CdrBuilder::emit(const char *operation)

{

..

..

..

 

    m->addParam("ringtime",printTime(buf,t_answer - t_ringing));

    m->addParam("holdtime",printTime(buf,m_holdsec));   // Holdtime Emit. This is where I need value to be emit.

    m->addParam("status",m_status);

..

..

..

}

80
Yate users hangout place / C++ Code Changes Help
« on: October 19, 2017, 10:27:12 AM »
Hi

Will you please give me a example to pass/Gather some variable along with value to/From other module in C++ source code.

For example if ysigchan module had error then need to pass m_error into cdrbuild module as well.

81
Hi

As i need to assign one value while listening one module(chan.disconnected) and need to assign the value on another module(call.cdr) by using external module.

Will you please guys help me for the same.


Yate::Install("chan.disconnected",80);

call_cdr->params["call_direction"]='xyz';

82
Features requests / ISDN Cause Code on PSTN Calling
« on: September 30, 2017, 07:36:03 AM »
Hi

As like asterisk ISDN Cause code with description is required in yate also to analyze the call status . And also if yate detects the called party number is switch off, User Busy, Network Busy, Disconnected on ISDN then it would more useful.

Also ring timeout while calling.

83
Hi

As i used pgsql stored function to route a call to user/group. Whereas i am getting result properly but even though calls are not routing to the user .

find the below mentioned configuration for the same.

register.conf

query=SELECT * FROM route_master('${billid}','${called}','${trace}');
result=location

Output of PgSQL:

field   value
trace   4444407
callto.1   sip/sip:4444407@192.168.1.82:5060
dtmfpass   false
location   fork
pbxassist   true
copyparams   pbxassist,dtmfpass
tonedetect_out   true
callto.1.secure   yes

Logs :

<pgsqldb:ALL> Query for 'db.1' returned 8 rows, 8 affected [0xcbd510]
Returned true 'database' delay=0.230988
  thread=0x7f6e54002c10 'Call Router'
  data=0x7f6e4c006200
  retval='(null)'
  param['account'] = 'technobureau_db'
  param['query'] = 'SELECT * FROM route_master('1506767265-8','4444407','');'
  param['results'] = 'true'
  param['handlers'] = 'pgsqldb:100'
  param['columns'] = '2'
  param['rows'] = '8'
  param['affected'] = '8'
  param['dbtype'] = 'pgsqldb'
2017-09-30_17:34:43.806147 <register:WARN> Skipping void route #2
2017-09-30_17:34:43.806158 <register:WARN> Skipping void route #3
2017-09-30_17:34:43.806172 <register:WARN> Skipping void route #4
2017-09-30_17:34:43.806182 <register:WARN> Skipping void route #5
2017-09-30_17:34:43.806192 <register:WARN> Skipping void route #6
2017-09-30_17:34:43.806202 <register:WARN> Skipping void route #7
2017-09-30_17:34:43.806211 <register:WARN> Skipping void route #8

Call.cdr :

Status :hangup
Reason : Offline

But actually user logged-in.

Kindly help me out.

84
Linux / Re: how to modify the yate client's ui
« on: September 29, 2017, 07:30:57 AM »
hi

please help me the procedure to extend the yate client source code and build. Am unable to build / modify yate client UI

85
Other Yate server issues / [ YATE 6.0] Record all call
« on: September 24, 2017, 01:46:46 PM »
Hi

Is there any option to record all the calls by using external module in a single Wav file with every channel voice.?


Also as i found this perl file but there is a problem to execute this file and don't know what is the procedure to configure this perl file on yate.

https://gist.github.com/vir/b1a868ef1d4aa5239064/raw/cbbefce066148485dc0db7d02467b79c2fcf9356/record_all_calls.pl

Pages: 1 ... 4 5 [6]