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

Pages: [1]
1
Other Yate server issues / Packetization interval
« on: October 02, 2015, 05:58:45 AM »
Hello.
How can i change packetization interval(ptime) for PCMA codec in SIP-I trunk?

2
Other Yate server issues / fork through mysql
« on: October 18, 2013, 01:57:35 AM »
I have a stored procedure for routing witch return a single column named 'location'
In section of call route in register.conf i have a query for procedure and result option
query=call routing('${caller}', '${called}')
result=location

The thing i would like to do is to make a call to a user and if he didn't answered after
a while - redirect call to another number. User number is 111 for example and number for redirection is 222
I am bit confused, in that case, what should my procedure return?
I suppose it must return a location with
"fork route/111 |exec=15000 route/222"?
Or maybe something else?
Thank you for answer.

3
Other Yate server issues / No audio when making a call
« on: June 24, 2013, 06:39:26 AM »
Hi.
I have a problem with yate, when making a call.
Call reaches second part but there is no audio. Here is log, sip debug on level 8
Thanks!

<pbxassist:CALL> Created assistant for 'sip/7'
<pbxassist:CALL> Created assistant for 'sip/8'
<pbxassist:CALL> Created assistant for 'sip/9'
<sig/2:CALL> Outgoing call from=29986000 to=069810010 trunk=link1 sigcall=0x9427560 [0x95d18a0]
<pbxassist:CALL> Created assistant for 'sig/2'
<link1/L1/Data:NOTE> ZapCircuit(6). IOCTL(SetToneDetect) failed on channel 6 (param=3). 38: Function not implemented [0x93092b8]
<sig/2:CALL> Call ringing [0x95d18a0]
<sip:NOTE> Formats for 'audio' changed to 'mulaw' [0x95ab1ec]
<yrtp:WARN> Initial timeout in channel sip/8 wrapper [0x94f73b8]
<sig/2:CALL> Call answered [0x95d18a0]
<link1/L1/Data:NOTE> ZapCircuit(6). Unable to send unknown event 23 [0x93039d8]
<NOTE> Choosing started 'audio' format 'mulaw' [0x9510210]
<yrtp:WARN> Initial timeout in channel sip/9 wrapper [0xb6d0d398]
<sig/2:CALL> Call hangup. Reason: 'normal-clearing' [0x95d18a0]
<sig/2:CALL> Call destroyed. Reason: 'normal-clearing'. No signalling call  [0x95d18a0]
<pbxassist:CALL> Created assistant for 'sip/10'
<pbxassist:CALL> Created assistant for 'sip/11'

4
Other Yate server issues / extensions from mysql
« on: April 29, 2013, 06:43:56 AM »
Hi, i am trying to register users through mysql database.

simple sip registration, i have a database and a table of 2 columns, login and password.
The thing is, that password is correct, but i get unauthorized message:

Sniffed 'user.auth' time=1367249962.688858
  thread=0x1d728f50 'YSIP Register'
  data=(nil)
  retval='(null)'
  param['protocol'] = 'sip'
  param['username'] = '300'
  param['realm'] = 'Yate'
  param['nonce'] = '1bb7d309d9a6051807788e3d3459281c.1367249962'
  param['response'] = '723f3537d790f66962a227c18ff7521c'
  param['method'] = 'REGISTER'
  param['uri'] = 'sip:83.218.223.50:5060'
  param['ip_host'] = '89.149.80.221'
  param['ip_port'] = '5060'
  param['ip_transport'] = 'UDP'
  param['address'] = '89.149.80.221:5060'
  param['newcall'] = 'false'
  param['domain'] = '83.218.223.50'
  param['device'] = 'SJphone/1.60.299a/L (SJ Labs)'
  param['number'] = ''
  param['expires'] = '600'
<register:INFO> On account 'yate' performing query 'SELECT password FROM users WHERE login='300' AND password IS NOT NULL AND password='';' expects results
Sniffed 'database' time=1367249962.689206
  thread=0x1d728f50 'YSIP Register'
  data=(nil)
  retval='(null)'
  param['account'] = 'yate'
  param['query'] = 'SELECT password FROM users WHERE login='300' AND password IS NOT NULL AND password='';'
  param['results'] = 'true'
Returned true 'database' delay=0.000926
  thread=0x1d728f50 'YSIP Register'
  data=0x1d72ab90
  retval='(null)'
  param['account'] = 'yate'
  param['query'] = 'SELECT password FROM users WHERE login='300' AND password IS NOT NULL AND password='';'
  param['results'] = 'true'
  param['handlers'] = 'mysqldb:100'
  param['columns'] = '1'
  param['rows'] = '0'
  param['affected'] = '0'
  param['dbtype'] = 'mysqldb'
Returned false 'user.auth' delay=0.001489


My register.conf:
user.auth=yes
account=yate
query=SELECT password FROM users WHERE login='${username}' AND password IS NOT NULL AND password='${password}';
result=password;

And i can see, that there is a login in message, but no password:
 param['query'] = 'SELECT password FROM users WHERE login='300' AND password IS NOT NULL AND password='';'

Could someone tell where the problem is?

5
Other Yate server issues / Fax issue
« on: April 25, 2013, 12:58:32 PM »
Hi, i am tryind to receive a fax with yate.
I use a script from https://github.com/shimaore/yate/blob/master/share/scripts/detector.php
I am iniciating a fax with pbxassist.
For example, in my regexroute are route
^964$=external/nodata/fax.php;called=${caller};
I use fax.php to iniciate fax receiving and detector.php
to write it into a file. The problem is, that in detector.php
filename consist of billid, called and called, but when it writes
a file it writes in form billid caller caller

For example, i make a call from extension 022768482 to 022244340
I make one change in detector.php i v added a print of $num varueble.

My pbxassist transfer trigger:
[transfer]
; blind transfer: make call on behalf of peer, hangup this
; key: *1nnnnn*
trigger=\*1\([0-9]\+\)\#$
target=\1
;trigger=*3\([0-9]\+\)\*$
;target=\1
First time script detects correctly, but after it detect both as caller.
I tryed regexroute with ^964$=external/nodata/fax.php
but it returns, that there is no called after making a transfer

<ExtModReceiver:WARN> Error: 'NUM 1366916013-1_022768482-022244340'
<pbxassist:CALL> Created assistant for 'sip/2'
<NOTE> Choosing started 'audio' format 'mulaw' [0x1959c1a0]
<sip:MILD> No formats for 'video', excluding from SDP [0x1958cff0]
<NOTE> Choosing started 'audio' format 'mulaw' [0x19591490]
<yrtp:WARN> Wrapper neither format nor payload specified [0x195ab360]
<pbxassist:NOTE> Chan 'sip/2' triggered operation 'transfer' in state 'new' holding '(null)'
<ExtModReceiver:WARN> Error: 'NUM 1366916013-1_022768482-964'

And log with ^964$=external/nodata/fax.php;called=${caller};

<pbxassist:CALL> Created assistant for 'sip/9'
Starting detection on sip/9
<ExtModReceiver:WARN> Error: 'NUM 1366913760-5_022768482-022244340'
<pbxassist:NOTE> Channel 'sip/9' already assisted!
<pbxassist:CALL> Created assistant for 'sip/10'
<NOTE> Choosing started 'audio' format 'mulaw' [0x116aac50]
<sip:MILD> No formats for 'video', excluding from SDP [0x116ae040]
<NOTE> Choosing started 'audio' format 'mulaw' [0x116baa70]
<yrtp:WARN> Wrapper neither format nor payload specified [0x116b17b0]
<sip:NOTE> Registered user '022768482' expires in 120 s
<pbxassist:NOTE> Chan 'sip/10' triggered operation 'transfer' in state 'new' holding '(null)'
Starting detection on sip/9
<ExtModReceiver:WARN> Error: 'NUM 1366913760-5_022768482-022768482'
PHP Installed: call.execute
PHP Answered: call.answered id: 1115985716517973d1de1b56.84525410
PHP: bye! Fax PHP

And here is fax.php

#!/usr/bin/php -q
<?php
/* Simple Fax2Mail Skript for the Yate PHP interface
   To test add in regexroute.conf

   ^NNN$=external/nodata/fax.php

   where NNN is the number you want to assign
*/
require_once("libyate.php");

/* Always the first action to do */
Yate::Init();
Yate::Debug(true);

date_default_timezone_set('Europe/Chisinau');

//$faxfile     = '/var/spool/fax/' . 'rx-file-' . date("Ymd_His") . '.tiff';
$faxfile     = '/var/spool/fax/rx-file-123.tiff';
$ourcallid   = 'fax/' . uniqid(rand(),1);
$partycallid = '';
$state       = 'call';

Yate::Install("call.execute",100);

/* The main loop. We pick events and handle them */
while ($state != "") {
    $ev=Yate::GetEvent();
    /* If Yate disconnected us then exit cleanly */
    if ($ev === false)
        break;
    /* Empty events are normal in non-blocking operation.
       This is an opportunity to do idle tasks and check timers */
    if ($ev === true)
        continue;
    /* If we reached here we should have a valid object */
    switch ($ev->type) {
        case "incoming":
            switch ($ev->name) {
                case "call.execute":
                    $partycallid = $ev->params["id"];
                    $ev->params["targetid"] = $ourcallid;
                    $ev->handled = true;
                    // we must ACK this message before dispatching a call.answered
                    $ev->Acknowledge();
                    // we already ACKed this message
                    $ev = false;

                    $m = new Yate("call.answered");
                    $m->params["id"] = $ourcallid;
                    $m->params["targetid"] = $partycallid;
                    $m->Dispatch();

                    $m = new Yate("chan.attach");
                    $m->params["id"] = $ourcallid;
//                  $m->params["source"] = "wave/play//usr/share/yate/sounds/fax2mail/dialtone.sln";
                    //$m->params["source"] = "wave/play//usr/local/share/yate/sounds/ring.au";
                                        $m->params["source"] = "wave/play//home/rec.slin";

                    $m->id = ""; // don't notify about message result
                    $m->params["sniffer"] = "tone/*";
                    $m->params["fax_divert"] = 'fax/receive//' . $faxfile;
                                        //$m->params["fax_divert"] = 'fax/receive/var/spool/fax/rx-file-123.tiff';
                    $m->Dispatch();
                    //Yate::Output("PHP Incoming: call.execute id: " . $ev->id);

                    break;
                default:
                    Yate::Output("PHP Incoming: " . $ev->name . " id: " . $ev->id);
            }
            /* This is extremely important.
               We MUST let messages return, handled or not */
            if ($ev)
                $ev->Acknowledge();
            break;
        case "answer":
            Yate::Output("PHP Answered: " . $ev->name . " id: " . $ev->id);
            break;
        case "installed":
            Yate::Output("PHP Installed: " . $ev->name);
            break;
        case "uninstalled":
            Yate::Output("PHP Uninstalled: " . $ev->name);
            break;
        default:
            Yate::Output("PHP Event: " . $ev->type . $ev->name);
    }
}

Yate::Output("PHP: bye! Fax PHP");

/* vi: set ts=8 sw=4 sts=4 noet: */
?>

6
Other Yate server issues / Fax sens & Receive
« on: April 07, 2013, 04:13:18 AM »
Hi, i have anissue with yate, trying to send a fax.
I have this scheme:
Fax machine---ATA Linksys---yate---softphone
Extension on ata is 200 and when i try from telnet localhost 5038 rmanager
call fax/transmit/home/myfax.tiff 200

i get this:
                           
<pbxassist:CALL> Created assistant for 'fax/9'
<pbxassist:NOTE> Channel 'fax/9' already assisted!
<pbxassist:CALL> Created assistant for 'sip/9'
<yrtp:MILD> Unexpected payload 100 in wrapper 0x84da7c0
TIFFOpen: home/myfax.tiff: Cannot open.
WARNING T.30 fax/9 Cannot open source TIFF file 'home/myfax.tiff'
And no fax

7
SIP to H.323 proxy / Calls inside yate
« on: April 01, 2013, 01:37:56 PM »
Hi everyone.
The problem: yate and orkaudio(voip recording software) are installed on 1 machine.
Through the router(home router-tplink) are connected 2 softphones. Third softphone is installed
on the same machine where yate and orkaudio are. When i call third softphone-softwere records
a call. When i make calls between other 2 softphones-call is not recorded. The problem as i understanded
is that session between those 2 softphones are made directly between them so on machine with sniffer
comes no traffic. I readed documentation on yate.null.ro but i didn't found there solution to make calls going
through yate server.Could someone tell me how to do that and please, i am a noob in yate.
Thanks!

8
Other Yate server issues / Yate + MySQL connection
« on: February 18, 2013, 04:57:55 AM »
Hello.
I have a problem with connecting yate to mysql database. I want to store call history in to mysql database
My mysql server is on the same machine as yate.
OS Ubuntu 12.04
The output message in debug mode is:
Sniffed 'database' time=1361183648.475115
  thread=0x88a6cc0 'Engine Worker'
  data=(nil)
  retval='(null)'
  param['account'] = 'yate'
  param['query'] = 'UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0'
  param['results'] = 'false'
Returned false 'database' delay=0.001216
  thread=0x88a6cc0 'Engine Worker'
  data=(nil)
  retval='(null)'
  param['account'] = 'yate'
  param['query'] = 'UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0'
  param['results'] = 'false'

My register config

[call.cdr]
; Queries for the CDR updating message

; critical: boolean: Reject all registrations and routing if query fails
;critical=yes

;initquery=UPDATE cdr SET ended=true WHERE ended IS NULL OR NOT ended
;cdr_initialize=INSERT INTO cdr VALUES(TIMESTAMP 'EPOCH' + INTERVAL '${time} s','${chan}','${address}','${direction}','${billid}','${caller}','${called}',INTERVAL '${duration} s',INTERVAL '${billtime} s',INTERVAL '${ringtime} s','${status}','${reason}',false)
;cdr_update=UPDATE cdr SET address='${address}',direction='${direction}',billid='${billid}',caller='${caller}',called='${called}',duration=INTERVAL '${duration} s',billtime=INTERVAL '${billtime} s',ringtime=INTERVAL '${ringtime} s',status='${status}',reason='${reason}' WHERE chan='${chan}' AND time=TIMESTAMP 'EPOCH' + INTERVAL '${time} s'
;cdr_finalize=UPDATE cdr SET address='${address}',direction='${direction}',billid='${billid}',caller='${caller}',called='${called}',duration=INTERVAL '${duration} s',billtime=INTERVAL '${billtime} s',ringtime=INTERVAL '${ringtime} s',status='${status}',reason='${reason}',ended=true WHERE chan='${chan}' AND time=TIMESTAMP 'EPOCH' + INTERVAL '${time} s'
critical=no

initquery=UPDATE cdrs SET ended = 1 WHERE ended IS NULL OR ended = 0

cdr_initialize=INSERT INTO cdrs VALUES(NULL, '${time}', '${billid}', '${chan}', '${address}', '${caller}', '${called}', '${billtime}', '${ringtime}', '${duration}', '${direction}', '${status}', '${reason}', 0)

cdr_update=UPDATE cdrs SET address = '${address}', direction = '${direction}', billid = '${billid}', caller = '${caller}', called = '${called}', duration = '${duration}', billtime = '${billtime}', ringtime = '${ringtime}', status = '${status}', reason = '${reason}' WHERE chan = ''${chan}' AND time = CAST(${time} AS UNSIGNED)

cdr_finalize=UPDATE cdrs SET address = '${address}', direction = '${direction}', billid = '${billid}', caller = '${caller}', called = '${called}', duration = '${duration}', billtime = '${billtime}', ringtime = '${ringtime}', status = '${status}', reason = '${reason}', ended = 1 WHERE chan = '${chan}' AND time = CAST(${time} AS UNSIGNED)

accound=yate

My mysqldb.conf is

[yate]
host=127.0.0.1
port=3306
database=yate
user=root
password=password

In modules i entered

pgsqldb.yate=true
register.yate=true
mysqldb.yate=true

i vahe installed yate-mysql package and recompiled yate.
But no result.

Thanks for help.

Pages: [1]