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.


Messages - iKenny

Pages: [1] 2
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 / Re: fork through mysql
« on: October 18, 2013, 02:52:03 AM »
I have found the solution.
The key is first to call to client's location, then to call to second number.
In short, location must be
Code: [Select]
fork sip/sip:user number@ip |exec=5000 route/number to redirect |stoperror=busy
for procedure in it self you can contact me via e-mail

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

4
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'

5
Other Yate server issues / Re: extensions from mysql
« on: April 30, 2013, 02:27:20 AM »
For those, who want to know,
register.conf:

user.auth=yes
user.register=yes
user.unregister=yes
accounts=yes



[user.auth]
;in my case i use as context, but you can remove "as context" and use withount it, in that case you must set in result password: result=password
account=yate
query=SELECT password as context FROM users WHERE username="${username}";   
result=context

[user.register]
;here we put in table field "location" and 'expires' data
account=yate
query=UPDATE users SET location='${data}',expires='CURRENT_TIMESTAMP + INTERVAL ${expires}' WHERE username='${username}';

[user.unregister]
;Here we remove user.register data from table, if sip account unregisters
account=yate
query=UPDATE users SET location=NULL,expires=NULL WHERE expires IS NOT NULL AND username='${username}';

And mysql table: username varchar(20), password varchar(20), location varchar(50), expires varchar(50)

Insert some clients with password and try.

Here's my config for registering users through mysql.

And one more thing, you may have problem with regfile module, it can cause problems, so i disable it from yate.conf:
[modules]
regfile.yate=no

6
Other Yate server issues / Re: extensions from mysql
« on: April 30, 2013, 02:18:35 AM »
I have found the problem, in register.conf section accounts must be enabled
accounts=yes

7
Other Yate server issues / Re: extensions from mysql
« on: April 30, 2013, 12:38:15 AM »
I can see that CDRs were written successfully. But users are not registering. Only from regfile.conf.
I tryed to disable regfile from yate.conf (regfile.yate=no) But no result

8
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?

9
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: */
?>

10
Other Yate server issues / Re: Fax sens & Receive
« on: April 12, 2013, 03:11:59 AM »
The problem was in command syntax
i typed call fax/receive/patch_to_file.tiff
there must be // after receive
           call fax/receive//patch_to_file

11
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

12
SIP to H.323 proxy / Re: Calls inside yate
« on: April 07, 2013, 04:09:44 AM »
Found the way-you myst disable rtp forwardind, then all calls will be made inside the yate, or you can configure 2 servers-1 as sip register, the second as rtp where all calls will be forwarded

13
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!

14
Other Yate server issues / Re: Yate + MySQL connection
« on: March 28, 2013, 04:13:43 AM »
Found the solution, on very x 10 verbose start i have found that the mysql module wasn't created. The problem was that was need to be installed package yate-mysql and after that yate must be compiled with yate-mysql.

15
Other Yate server issues / Re: Yate + MySQL connection
« on: February 18, 2013, 03:57:01 PM »
Returned false 'database'
And when i make call from one softphone to another databsase stays empty.
I can connet to database through localhost and i can make enterys. But yate doesn't write cdr data in database.

Pages: [1] 2