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

Pages: [1] 2
1
Yate bugs / doubled registration
« on: August 09, 2021, 06:44:06 AM »
At the registration stage, by transport ipv6, sipgate.de makes two endpoints with addresses

Contact:
<sip:4655310@[2a03:f540:1:1100::181d]:5060>;expires=597;received="sip:[2A03:F540:1:1100:0:0:0:181D]:5060",
<sip:4655310@[2A03:F540:1:1100:0:0:0:181D]:5060>;expires=600

How is that?
Moreover, the registration expire time soon decreases to 149 seconds, which I don't really like.


2
Other Yate server issues / Re: Limit call duration time
« on: June 15, 2021, 06:28:54 AM »
I did not understand, where does the conf.d ...
But what you need is here: timeout param

3
Subj ?

4
An external module, if we are talking about the same thing, should track the cal.route message and filter by route_type == "msg".
In general, this is all described here: https://docs.yate.ro/wiki/Using_SIP_MESSAGE_or_how_to_enable_chat_messages_in_SIP

5
Yate users hangout place / Re: Check SIP Status
« on: August 10, 2020, 01:04:42 PM »
I think that the client will request re-registration only after the timeout expired.
Or restarting the client.
There are no other ways.

6
Rjevski, nahuya vam https ?

Here is the working link:

svn checkout https://voip.null.ro/svn/yate/trunk yate

but the certificate is self-signed. Therefore, from SVN there will be additional questions.

7
Yate IVR / Re: Nodejs library compatible to javascript.yate
« on: April 19, 2020, 04:59:19 PM »
Indeed, the conversion to the slin solved the click problems.
Thanks a lot.

8
Yate IVR / Re: Nodejs library compatible to javascript.yate
« on: April 16, 2020, 09:16:59 AM »
Yes, today was a free day, I decided to try it.
Today's git too.
I took an example from the first page of your git, slightly modifying it.

Code: [Select]
// Core API
const { Yate, YateMessage } = require("next-yate");
let yate = new Yate({ host: "127.0.0.1", port:6030 });

yate.init(() => {console.log("Connected")}); // Initialize connection before use
yate.output("Hello World!");


A little cleared up, this error appears when the script is launched by the extmodule from yate.

If the launch is manual, then everything is clean in yate.

Second question :)
When playing several wav files between them I listen to clicks.
How can you deal with this?


9
Yate IVR / Re: Nodejs library compatible to javascript.yate
« on: April 16, 2020, 08:17:50 AM »
I try to play with your module, but this string from  example_core_api.js :

Code: [Select]
yate.init(() => console.log("Connected"));
causes an error in yate console :

Code: [Select]
<ExtModReceiver:WARN> Error: 'Connected'
this is normal ?

10
Yate IVR / Re: Nodejs library compatible to javascript.yate
« on: February 11, 2020, 01:37:31 PM »
Anton, can you suggest more complex use cases that reveal the benefits of this module.
Waht differens from others ?

11
SIP to H.323 proxy / Re: Unable to foward calls from H323 to SIP
« on: February 10, 2020, 03:22:02 PM »
I see one mistake in a regexroute.conf - space after a vertical slash. He should not be there. But the reason may not be that. Therefore, I recommend:

1. since the connection breaks on the x323 side, enable x323 level 10 debugging.

2. Since the gap is initiated by the remote side, look at the cause of the break there.

3. to search for the cause of the gap, make default configs with the necessary settings minimum. Do not include parameters whose purpose is unknown.


12
YateBTS / Re: Como saber se o banco está conectado???
« on: February 06, 2020, 11:19:30 PM »
English, please .

13
SIP to H.323 proxy / Re: Unable to foward calls from H323 to SIP
« on: February 06, 2020, 11:13:59 PM »
Without your configs, it's hard to say a certain thing.
And from the logs it is clear that the connection break by the remote side.

14
Other Yate server issues / Alias in rmanager
« on: January 27, 2020, 01:49:37 PM »
Can we make one alias for several commands at once ?

15
Other Yate server issues / Re: register instead of regfile
« on: January 20, 2020, 03:01:15 PM »
Hi Monica!

Unfortunately, in your example, there is no routing, and especially the functionality of "alternatives".
Over the weekend, I made a working function in postgres, but it turned out so ugly!

I’ll leave this function here, maybe a professional will see it, will be horrified and advise how to ennoble it.

Code: [Select]
CREATE FUNCTION public.get_route(_caller text, _called text, _addres text) RETURNS SETOF record
    LANGUAGE plpgsql
    AS $$DECLARE
  _location text :='-';
  _tmp text;
  _sum int;
  _sumAlt int;
  _sumCld int;
  _result RECORD;
  _record RECORD;
/* max count of calls is 5*/
  _callto1 text;
  _callto2 text;
  _callto3 text;
  _callto4 text;
  _callto5 text;

BEGIN

  SELECT COUNT(id)
  FROM ( SELECT id
         FROM users
         WHERE username=_called
         AND location IS NOT NULL)
  AS sub
  INTO _sumCld;
  IF _sumCld IS NULL THEN
    _sumCld = 0;
  END IF;

  SELECT COUNT(id)
  FROM ( SELECT id
         FROM users
         WHERE alternatives ~ _called
         AND location IS NOT NULL)
  AS sub
  INTO _sumAlt;
  IF _sumAlt IS NULL THEN
    _sumCld = 0;
  END IF;

  _sum = _sumAlt + _sumCld;
  IF _sum > 1 THEN
    _location ='fork';
    IF _sumAlt > 1 THEN
      FOR _record IN
        SELECT location
        FROM users
        WHERE alternatives ~ _called
        AND location IS NOT NULL
      LOOP
        CASE _sumAlt
          WHEN 1 THEN _callto1 = _record.location;
          WHEN 2 THEN _callto2 = _record.location;
          WHEN 3 THEN _callto3 = _record.location;
          WHEN 4 THEN _callto4 = _record.location;
          WHEN 5 THEN _callto5 = _record.location;
        END CASE;
        _sumAlt = _sumAlt -1;
        EXIT WHEN _sumAlt = 0;
      END LOOP;

      IF _sumCld = 1 THEN
        SELECT location
        FROM users
        WHERE username=_called
        AND location IS NOT NULL
        INTO _tmp;
        CASE _sum
          WHEN 1 THEN _callto1 = _tmp;
          WHEN 2 THEN _callto2 = _tmp;
          WHEN 3 THEN _callto3 = _tmp;
          WHEN 4 THEN _callto4 = _tmp;
          WHEN 5 THEN _callto5 = _tmp;
        END CASE;       
      END IF;
    ELSE
      SELECT location
      FROM users
      WHERE username=_called
      AND location IS NOT NULL
      INTO _callto1;
      SELECT location
      FROM users
      WHERE alternatives ~ _called
      AND location IS NOT NULL
      INTO _callto2;
    END IF;
  ELSE
    IF _sumCld = 1 THEN
      SELECT location
      FROM users
      WHERE username=_called
      AND location IS NOT NULL
      INTO _location;
    ELSEIF _sumAlt = 1 THEN
      SELECT location
      FROM users
      WHERE alternatives ~ _called
      AND location IS NOT NULL
      INTO _location;
    ELSE
      RETURN;
    END IF;   
  END IF;

  SELECT _location,_callto1,_callto2,_callto3,_callto4,_callto5
  INTO _result;

  RETURN NEXT _result;
  RETURN;

END;
$$;


Table `users` based on your examples, but slightly modified.

Code: [Select]
CREATE TABLE public.users (
    username text NOT NULL,
    password text,
    vcard text,
    first_name text,
    last_name text,
    address text,
    inuse integer,
    location text,
    expires timestamp without time zone,
    alternatives text,
    realm text,
    reginterval integer DEFAULT 300,
    lnr boolean DEFAULT false,
    context text,
    id bigint DEFAULT nextval('public.user_id_seq'::regclass) NOT NULL,
    record text,
    skype text,
    mobile text,
    groupe text
);


And part of register.conf:

Code: [Select]
[call.route]
query=SELECT * FROM get_route('${caller}','${called}','${address}') AS t(location text,"callto.1" text,"callto.2" text,"callto.3" text,"callto.4" text,"callto.5" text)
result=location
priority=110


Pages: [1] 2