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.


Topics - ganapathi

Pages: [1]
1
Yate users hangout place / Autodial Implementation Idea
« on: July 10, 2018, 12:47:03 PM »
Hi,

As i am trying to do autodial feature on yate but have some question/difficulties faced as of now to do the same.

  • As i need to search the number from database and needs to dial outbound call
  • And if not answered then need to hangup relevant channel and close the call with proper initialize, finalize & combine method
  • If answered then needs to do keep search for available user and transfer the call and finally need to update cdr with proper outleg records with SIP user instead of utility channels.

Here my question is
  • How to create channel and connect call. Is it possible to do without any utility channel. If not then how to use by using fork/dumb channel
  • How to override leg & outleg as sig & sip channel parameters instead of 3 leg on cdr method.

And also attached the code which is initiated as of now. As of now it's calling customer and play the wave file and closing the cdr properly. But if i calling sip user once answered then how to handle cdr .

2
Hi

As i recently noticed as CDR module is initialized for Wave channel and keep available on cdrbuild status

Code: [Select]
name=cdrbuild,type=cdr,format=Status|Caller|Called|BillId|Duration;cdrs=8,hungup=0;wave/90=unknown||||462416,
And some original channel created by call doesn't finalizing and it's keep available until service restart and finalized once  service ended , due to that call end time shows inappropriately.

CDRBuild :

Code: [Select]
%%+status:cdrbuild
name=cdrbuild,type=cdr,format=Status|Caller|Called|BillId|Duration;cdrs=8,hungup=0;wave/90=unknown||||462416,sip/5951=answered|6027|7002|1530000462-5867|275148,sip/5952=answered|6027|7002|1530000462-5867|275148,sip/5956=answered|6034|6033|1530000462-5871|275135,sip/5957=answered|6034|6033|1530000462-5871|275135,wave/262=unknown||||191456,wave/267=unknown||||42145,wave/302=unknown||||27914
%%-status

CDRCombine :

Code: [Select]
%%+status:cdrcombine
name=cdrcombine,type=cdr,format=ChanId|Caller|Called|Address|OutLegs;cdrs=3;1530000462-5867=sip/5951|6027|7002|192.168.1.74:5060|1,1530000462-5871=sip/5956|6034|6033|192.168.1.93:5268|1,1530000462-6703=sip/6739|6033|6004|192.168.1.78:5629|1
%%-status


And yate keep throws chan.locate message with null value like mentioned below.

Code: [Select]
Sniffed 'chan.locate' time=1530551429.087579
  thread=0x7f4f9c02a4e0 'YSIP Register'
  data=(nil)
  retval='(null)'
  param['id'] = ''

Kindly help me to avoid this issue.

3
Yate users hangout place / YateClient Installation on Linux
« on: June 10, 2018, 07:56:36 AM »
Hi

Anyone please help me on installation of Yate Client on Linux Distribution without installing other server related module with source code.


4
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);

..

..

..

}

5
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.

6
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';

7
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.

Pages: [1]