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

Pages: [1]
1
Yate users hangout place / Play wave on chan.disconnected
« on: February 26, 2018, 05:52:52 AM »
Hello.

I want to play different slin files on to inform the caller about the reason of disconnection the other side: wrong number, unavailable and so on.

I watch chan.disconnected message and use chan.masquerade to play the message with options:
{
  'message': 'call.execute',
  'id': params['id'],
  'callto': 'wave/play//share/yate/sounds/%s.slin' % sound
}


If the provider sent progress message before (ring tones), the rtp is up and busy message on disconnect is played. If there is no progress and earlymedia, no any sound is hear (but msgsniffer shows all good and message was played).

What I've forgottent to make this work?

2
Yate bugs / [fix] Wrong killing of extmodule
« on: May 09, 2017, 06:40:04 PM »
Some time ago I said about the bug of terminating external module. I've fixed it and changed the logic of quiting from external module as follows.

If exit is initiated from external module it just close their stdout and finish running. Yate as soon as get EOF trying to check is pid terminated or not and waiting up to m_timeout. If EOF was get from socket nothing to wait.

If exit initiated from Yate the engine send to external module %%<quit message and waiting EOF/pid termination as described above.

%%>quit from external module to Yate I've make redundant. But it's possible to interpret it as a "kill me" signal without waiting and without %%<quit as a reply. Let me know how it must be.

The approach let external modules to handle quit messages. It is useful for example if external module registers external lines through user.login message: it's may be important to unregister lines on module quiting (operation=logout).

I'm new in Yate and would like how can I share described improvements? How can I commit it and to know is it a needed feature?

3
Yate bugs / TCP external modules and Engine::dispatch
« on: May 09, 2017, 07:37:37 AM »
I have the following function which returns CallEndpoint by channel id:
Code: [Select]
static CallEndpoint* locateChan(const String& id, bool peer = false)
{
    if (id.null())
return 0;
    Message m("chan.locate");
    m.addParam("id",id);
    if (!Engine::dispatch(m))
return 0;
    CallEndpoint* ce = static_cast<CallEndpoint*>(m.userObject(YATOM("CallEndpoint")));
    if (!ce)
return 0;
    return peer ? ce->getPeer() : ce;
}

This code is used from ExtModReceiver::processLine as follows. And this works if external module is a pipe script, but doesn't work if it a TCP socket. I tried to debug it without success: Engine::dispatch doesn't work.

The difference which I've found is TCP extmodule starts from an additional thread of ExtListener which is a server for processing incoming connections (it's true approach). Can this broke Engine::dispatch? Or may be other reasons?

4
I'm trying to fix the bug during last days, but without success. :(

If I have a sip endpoint which is connected to an external plugin (in playrec mode) a try to picking it up (disconnect extmodule and connect sip endpoints each other) crashes Yate at all in 90% of cases.

The log which I see:
Code: [Select]
2017-05-01_23:17:24.413847 <INFO> Choosing offered 'audio' format 'alaw' [0x7fb840011bc0]
2017-05-01_23:17:24.413857 <sip/3:NOTE> Formats for 'audio' changed to 'alaw' [0x7fb840010990]
2017-05-01_23:17:24.413902 >>> DataTranslator::detachChain(0x7fb83c006dd0,0x7fb84c00fac0)
2017-05-01_23:17:27.000093   <engine:MILD> Creating new message dispatching thread (1 running)
2017-05-01_23:17:29.000097   <engine:MILD> Creating new message dispatching thread (2 running)
...

The normal state (if I disconnecting tone endpoint):
Code: [Select]
2017-05-01_22:36:17.464148 <yrtp:INFO> RTP starting format 'alaw' payload 8 [0x7fb840016b40]
2017-05-01_22:36:17.464172 >>> DataTranslator::detachChain(0x7fb840017190,0x7fb8300040a0)
2017-05-01_22:36:17.464177 <<< DataTranslator::detachChain
2017-05-01_22:36:17.464185 <ALL> DataTranslator::attachChain [0x7fb840017190] 'alaw' -> [0x7fb8300040a0] 'alaw' succeeded
2017-05-01_22:36:17.464190 >>> DataTranslator::detachChain(0x7fb830003ec0,0x7fb840017320)
2017-05-01_22:36:17.464193 <<< DataTranslator::detachChain
2017-05-01_22:36:17.464198 <ALL> DataTranslator::attachChain [0x7fb830003ec0] 'alaw' -> [0x7fb840017320] 'alaw' succeeded
2017-05-01_22:36:17.464270 <yrtp:INFO> Wrapper opened a hole in firewall/NAT [0x7fb840016b40]

5
Other Yate server issues / Yate as a client behind a firewall
« on: September 20, 2016, 08:03:00 AM »
Hello.

I try to use Yate as a client to process incoming calls from DID number. Yate connects to provider as a client by SIP.

The problem is that Yate installed on VPS which is behind a firewall. The firewall is out of my control and drops all incoming connections for all ports except 80 and 443. Outgoing connections are allowed. VPS has real IP, i.e. without NAT.

As a result I have working Yate which can process calls, but in one direction: Yate doesn't get the voice from caller but it can play anything to the line. Is it possible to solve it?

I didn't check Asterisk but have found some option:
Quote
Nat=route:
Asterisk will send the audio to the port and ip where its receiving the audio from. Instead of relying on the addresses in the SIP and SDP messages.
I'm not sure is it what I need. Does it help me and what something that is available on Yate?

Thanks.

Pages: [1]