Recent Posts

Pages: [1] 2 3 ... 10
Other Yate server issues / Re: Record a call in regexroute
« Last post by Dam Dat on August 14, 2018, 08:06:44 PM »
HI bnaetsch, marian
can you tell me
to record call i need add
    .*=enqueue chan.masquerade;id=${id};message=chan.record;call=wave/record//var/records/inbound_${called}_${caller}$(timestamp).slin;peer=wave/record//var/records/outbound_${called}_${caller}$(timestamp).slin

on bottom regexroute.conf ?
And can you tell me parameters. what is serial 49351898818077, +49302555880114778
where can i play files recording?

Thanh you very much for helping!
Features requests / error record wave
« Last post by Dam Dat on August 14, 2018, 06:56:05 PM »
hello everybody i found some guide codes "record call" in this page

use strict;
use warnings;
use Yate;
use Data::Dumper;

# Convert results into stereo wav:
#  sox -M /tmp/rec_2015-05-20T17\:09\:44_no-billid_6134-[AB].au /tmp/rec_2015-05-20T17:09:44_no-billid_6134.wav

my $yate = new Yate(Debug=>0);
$yate->install('call.answered', \&call_answered_handler, 70);

sub call_answered_handler
  my $m = shift;
  my $billid = $m->param('billid') // 'no-billid';
  my $date = mk_date();
  my $fn = sprintf("/tmp/rec_%s_%s_%04d", $date, $billid, int(rand(10000)));
  my $ext = 'au';
  print "Recording call: $fn\n";
  $m->message('chan.masquerade', undef, '',
    message => "chan.record",
    id => $m->param('id'),
    peer => "wave/record/$fn-A.$ext",
    call => "wave/record/$fn-B.$ext",
  open F, '>:utf8', "$fn.txt" or warn "Can't open $fn.txt: $!\n";
  print F Dumper($m->{params});
  close F or warn "Can't write to $fn.txt: $!\n";

  $date =~ s/_.*//;
  my $script = "/tmp/convert_$";
  my $first = !-e $script;
  open F, '>>:utf8', $script or warn "Can't open $script: $!\n";
  print F "#!/bin/sh\n" if $first;
  print F "sox -M $fn-[AB].au $fn.wav && rm $fn-[AB].au\n";
  close F;
  return undef;

sub mk_date
  my $time = shift;
  my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time // time());
  return sprintf "%04d-%02d-%02d_%02d%02d%02d", $year + 1900, $mon + 1, $mday,$hour,$min,$sec;

and i received this response :
Can't locate in @INC (you may need to install the Yate module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /home/p52/ line 4.
BEGIN failed--compilation aborted at /home/p52/ line 4.

who can hepl me fix this error please!
Windows / Re: Is Yate client portable (on flash disk for instance)?
« Last post by drom007 on August 14, 2018, 03:16:01 PM »
Thank you for this, Marian! I'll try this way.
YateBTS / Re: SIP Routing Issue: Hangup reason='Proxy Authentication Required'
« Last post by marian on August 14, 2018, 01:11:13 AM »
The 401 reply means server challenge (requires the client to authenticate).
Yate users hangout place / How to avoid Multiple call.CDR-Answered Emit
« Last post by ganapathi on August 12, 2018, 10:47:18 AM »

As i am initiating a call through yate server by using dumb module like below.

Initiating Outbound :

Message* notify = new Message("call.execute");
      notify->addParam("copyparams", "cdrtrack,link");
      notify->addParam("direct", "sig/9500197700");
      notify->addParam("callto", "dumb/");
      notify->addParam("target", "9500197700");
      notify->addParam("add_billid", "true");
      notify->addParam("cdrtrack", "false");

And it's successfully initiating the call with billid patch for dumb channel. And once call got answered and using below handler and condition checking emitting the call.execute with fork.

Call.answered Message Handler :

if ( msg.getParam(YSTRING("status"))->c_str() == YSTRING("answered")) {
         Message* notify = new Message("chan.masquerade");
         notify->addParam("id", msg.getParam(YSTRING("id"))->c_str());
         notify->addParam("message", "call.execute");
         notify->addParam("caller", "49781807");
         notify->addParam("called", "9500197700");
         notify->addParam("callto", "fork");
         notify->addParam("callto.1.fork.ringer", "yes");
         notify->addParam("callto.1.fork.autoring", "yes");
         notify->addParam("callto.1", "sip/sip:7007@");
         notify->addParam("", "no");
         notify->addParam("callto.1.oconnection_id", "general");

But here facing below problem
  • SIP user ringing but there is no sound to the caller who got answered
  • call.cdr-outgoing- Answered status executed two times. Don't have clue to stop one
  • sig call consider as outgoing and also sip call also consider as outgoing for the same. So there is no incoming direction on CDR tracking.

How to change direction of each leg as my per wish. So that i can log the CDR on table with cdrcombine. And in middle i can able to change caller & called , so that SIP user got original CallerID of customer without changing the caller and called parameter for each cdr functionalities.

Attached yate sniffer log as well.

Kindly help me out.
How can i Add Remote-Party-ID=<sip 616161@>;party=calling;screen=yes;privacy=full into sip headers?
thank you for answering my question!
i have one more question:
i received a report follow "SIP/2.0 401 Unauthorized". Is this a error?
the following text is detail information:
2018-08-11_10:17:04.025795 <sip:INFO> 'udp:' received 454 bytes SIP message from [0x1934960]
SIP/2.0 401 Unauthorized
To: <>;tag=5149c1126e702672db415b970eae4141.308e
Via: SIP/2.0/UDP;rport=55040;branch=z9hG4bK2130938351;received=
From: <>;tag=363392428
WWW-Authenticate: Digest realm="", nonce="W25WW1tuVS8lFhnzrBDwHvHdP7bw6Y4T", qop="auth"
Server: Zadarma server
Content-Length: 0

2018-08-11_10:17:04.029389 <sip:INFO> 'udp:' sending 'REGISTER' 0x7f9d20029850 to [0x1934960]
Contact: <sip:238867@>
Expires: 0
To: <>
Via: SIP/2.0/UDP;rport;branch=z9hG4bK1065785809
From: <>;tag=363392428
User-Agent: YATE/6.1.1
Max-Forwards: 70
Authorization: Digest username="238867", realm="", nonce="W25WW1tuVS8lFhnzrBDwHvHdP7bw6Y4T", uri="", response="bfad0c72cdc590015716fd5a3d1ef5d2", algorithm=MD5, qop=auth, nc=0000000f, cnonce="23c173d53359e700f42335a361db0969"
Content-Length: 0

2018-08-11_10:17:04.268749 <sip:INFO> 'udp:' received 340 bytes SIP message from [0x1934960]
SIP/2.0 200 OK
To: <>;tag=5149c1126e702672db415b970eae4141.2c89
Via: SIP/2.0/UDP;rport=55040;branch=z9hG4bK1065785809;received=
From: <>;tag=363392428
Server: Zadarma server
Content-Length: 0
Other Yate server issues / [Solved] sgsn / ggsn issues
« Last post by yateuser on August 09, 2018, 08:22:11 AM »
OK.. I got this working.

The issue was actually my NAT / Routing on the rpi.  The iptables configuration on the Wiki are wrong.
Once I fixed them to this
Code: [Select]
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
It started magically working

The error message that sent me on a witch hunt should just be ignored and the border case addressed in the code.

Thanks davidb00 for your help. I did learn a lot on how yates + yatebts work in the process, but I'm happy it works now.
YateBTS / Re: GPRS not working
« Last post by yateuser on August 09, 2018, 05:54:01 AM »
Would you mind sharing your settings?

I'm fighting to get GRPS working, I'm sure it is something simple.

Thanks in advance
YateBTS / Re: Problems connecting with phone to the bts.
« Last post by yateuser on August 09, 2018, 04:34:25 AM »
Do you have gprs enabled?

Try first disabling it. See if you can connect.
Pages: [1] 2 3 ... 10