Recent Posts

Pages: [1] 2 3 ... 10
1
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
.*49351898818077$={
    .*=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
   .*=sip/sip:+49302555880114778@213.XX.XX.XX:6045
}

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!
2
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
https://gist.github.com/vir/b1a868ef1d4aa5239064

#!/usr/bin/perl
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->connect("127.0.0.1:42428");
$yate->install('call.answered', \&call_answered_handler, 70);
$yate->listen();

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_$date.sh";
  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 Yate.pm 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/record_all_calls.pl line 4.
BEGIN failed--compilation aborted at /home/p52/record_all_calls.pl line 4.

who can hepl me fix this error please!
3
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.
4
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).
5
Yate users hangout place / How to avoid Multiple call.CDR-Answered Emit
« Last post by ganapathi on August 12, 2018, 10:47:18 AM »
Hi

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");
      Engine::enqueue(notify);

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@192.168.1.41:5632");
         notify->addParam("callto.1.secure", "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.
6
How can i Add Remote-Party-ID=<sip 616161@11.11.11.11>;party=calling;screen=yes;privacy=full into sip headers?
7
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:0.0.0.0:5060' received 454 bytes SIP message from 185.45.152.174:5060 [0x1934960]
------
SIP/2.0 401 Unauthorized
To: <sip:238867@sip.zadarma.com>;tag=5149c1126e702672db415b970eae4141.308e
Call-ID: 957299803@sip.zadarma.com
Via: SIP/2.0/UDP 192.168.1.254:55040;rport=55040;branch=z9hG4bK2130938351;received=192.168.1.254
From: <sip:238867@sip.zadarma.com>;tag=363392428
CSeq: 29 REGISTER
WWW-Authenticate: Digest realm="sip.zadarma.com", nonce="W25WW1tuVS8lFhnzrBDwHvHdP7bw6Y4T", qop="auth"
Server: Zadarma server
Content-Length: 0

------
2018-08-11_10:17:04.029389 <sip:INFO> 'udp:0.0.0.0:5060' sending 'REGISTER sip:sip.zadarma.com' 0x7f9d20029850 to 185.45.152.174:5060 [0x1934960]
------
REGISTER sip:sip.zadarma.com SIP/2.0
Contact: <sip:238867@192.168.1.254:55040>
Expires: 0
To: <sip:238867@sip.zadarma.com>
Call-ID: 957299803@sip.zadarma.com
Via: SIP/2.0/UDP 192.168.1.254:55040;rport;branch=z9hG4bK1065785809
From: <sip:238867@sip.zadarma.com>;tag=363392428
User-Agent: YATE/6.1.1
Max-Forwards: 70
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
CSeq: 30 REGISTER
Authorization: Digest username="238867", realm="sip.zadarma.com", nonce="W25WW1tuVS8lFhnzrBDwHvHdP7bw6Y4T", uri="sip:sip.zadarma.com", response="bfad0c72cdc590015716fd5a3d1ef5d2", algorithm=MD5, qop=auth, nc=0000000f, cnonce="23c173d53359e700f42335a361db0969"
Content-Length: 0

------
2018-08-11_10:17:04.268749 <sip:INFO> 'udp:0.0.0.0:5060' received 340 bytes SIP message from 185.45.152.174:5060 [0x1934960]
------
SIP/2.0 200 OK
To: <sip:238867@sip.zadarma.com>;tag=5149c1126e702672db415b970eae4141.2c89
Call-ID: 957299803@sip.zadarma.com
Via: SIP/2.0/UDP 192.168.1.254:55040;rport=55040;branch=z9hG4bK1065785809;received=192.168.1.254
From: <sip:238867@sip.zadarma.com>;tag=363392428
CSeq: 30 REGISTER
Server: Zadarma server
Content-Length: 0
8
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 https://wiki.yatebts.com/index.php/Using_GPRS_with_Local_breakout_in_YateBTS 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.
9
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
10
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