Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Yate users hangout place / YATE SIP Trunk without registration
« Last post by ganapathi on March 19, 2021, 11:49:30 PM »
Hi

I am trying to create a SIP trunk on yate without a registration method. But however the same configuration is working fine accfile.conf but
it's not working with the register module.

accfile.conf

Code: [Select]
[test_sip]
enabled=yes
protocol=sip
username=me
outbound=192.168.3.102:5060


accfile trunk log:

Code: [Select]
Sniffed 'user.login' time=1616218494.937736^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'me'^M
  param['outbound'] = '192.168.3.102:5060'^M
  param['account'] = 'test_sip'^M
  param['operation'] = 'login'
2021-03-20_05:34:54.948098 <sip:INFO> YateSIPLine::YateSIPLine('test_sip') [0x7fb2e8003d70]
2021-03-20_05:34:54.948117 <sip:INFO> YateSIPLine::update() 'test_sip' [0x7fb2e8003d70]
2021-03-20_05:34:54.948147 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948171 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948180 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948190 <sip:ALL> YateSIPPartyHolder::buildParty(UDP,(null),0,192.168.3.102,5060) force=1 [0x7fb2e8003ea0]
2021-03-20_05:34:54.948304 <sip:ALL> YateUDPParty local '192.168.2.52:45060' party '192.168.3.102:5060' transport=0x1490130 [0x7fb2e8001080]
2021-03-20_05:34:54.948329 <sip:ALL> YateSIPPartyHolder set party (0x7fb2e8001080) local=192.168.2.52:45060 remote=192.168.3.102:5060 trans=(0x1490130) [0x7fb2e8003ea0]
2021-03-20_05:34:54.948342 <sip:ALL> Set party trans_name=(null) proto=UDP local=:0 remote=192.168.3.102:5060 [0x7fb2f6e0bf10]
2021-03-20_05:34:54.948352 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948361 <sip:INFO> YateSIPLine(test_sip) setValid(1,(null)) current=0 [0x7fb2e8003d70]
Returned true 'user.login' delay=0.010637^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'me'^M
  param['outbound'] = '192.168.3.102:5060'^M
  param['account'] = 'test_sip'^M
  param['operation'] = 'login'^M
  param['handlers'] = 'sip:150'


register.conf

Code: [Select]

initquery=SELECT 'yes' as enabled,'sip' as protocol,username,username as description,outbound,account,(CASE WHEN _state IS FALSE THEN 'logout' ELSE 'login' END) AS operation FROM conf_trunk WHERE _state IS TRUE


register SIP trunk log:

Code: [Select]
Sniffed 'user.login' time=1616218496.011641^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'TRUNK5'^M
  param['description'] = 'TRUNK5'^M
  param['outbound'] = '192.168.3.202:5060'^M
  param['account'] = 'TRUNK5'^M
  param['operation'] = 'login'
2021-03-20_05:34:56.013702 <sip:INFO> YateSIPLine::YateSIPLine('TRUNK5') [0x7fb2e8009170]
2021-03-20_05:34:56.013712 <sip:INFO> YateSIPLine::update() 'TRUNK5' [0x7fb2e8009170]
2021-03-20_05:34:56.013734 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013747 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013753 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013906 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013915 <sip:INFO> YateSIPLine(TRUNK5) setValid(1,(null)) current=0 [0x7fb2e8009170]
Returned true 'user.login' delay=0.002283^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'TRUNK5'^M
  param['description'] = 'TRUNK5'^M
  param['outbound'] = '192.168.3.202:5060'^M
  param['account'] = 'TRUNK5'^M
  param['operation'] = 'login'^M
  param['handlers'] = 'sip:150'


42
Yate users hangout place / Re: How to route SMS to external PHP/Python module ?
« Last post by cc08 on December 28, 2020, 12:25:51 PM »
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
43
Yate users hangout place / cdr_combined for MySql
« Last post by snax68 on December 12, 2020, 06:05:13 AM »
Hi,
 which is the correct SQL instruction for cdr_combined if used with MySql database?

Thanks a lot,
 John
44
Yate users hangout place / How to route SMS to external PHP/Python module ?
« Last post by rhsy on November 16, 2020, 02:58:35 AM »
Hello

I want to route SMS to external module. but I don't find any information how to do.
Does anyone point me that ?

my expect use case is

1) User send SMS.
2) Yate received it.
3) Yate send it to external module
4) external module will be processed.
5) external module will be send SMS through Yate.
6) User received it.

for Step 5, there is example custom_sms.js / custom_sms.php.
but don't find any example / reference for step 3)

external module which I want to use is PHP or Python.
45
Yate based projects / YateBTS + BladeRf x40, controlling signal level
« Last post by vpaskov on August 30, 2020, 01:06:18 PM »
Hi all,
I'm an Android developer developing an app called GSM Signal Monitor (https://play.google.com/store/apps/details?id=paskov.biz.noservice), in it's core is an app that monitors your GSM signal strength and notifies you of events such as 'signal lost' or 'signal low'.

To ease the app development and testing process (it's tedious job to test and debug various Android devices (20 currently) simulating different network conditions using a metal bucket and metal cans reinforced with aluminum foil) I assembled simple test environment using BladeRF x40, Ubuntu 18.04 and YateBTS.

Everything is working almost great, the phones can connect to YateBTS, they can call each other, when I stop the BTS the signal is lost, the GPRS data is working. I'm successfully using libyate.php to monitor some events that I'm interested in etc...

One thing I'm not able to achieve for now is how to properly control the recieved / transmitted signal levels so the phone reception can be altered. Ex: The signal is great currently, how can I simulate for example low signal condition.

I tried playing with rmanager adjusting the BTS power with mbts power, but the results are not exactly stable. The phone either lose signal or gains great signal, nothing in between.

Any help will be appreciated.



--
Regards,
Vladimir Paskov
46
YateBTS / Re: Multioperators in YateBTS is possible? (severals MNC)
« Last post by chankatc on August 15, 2020, 01:51:43 PM »
I'm also interested.
47
Yate users hangout place / Re: Check SIP Status
« Last post by cc08 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.
48
Yate users hangout place / Check SIP Status
« Last post by ganapathi on August 09, 2020, 12:32:37 PM »
Hi,

As i want every SIP Client to request registration forcefully once after yate service restarted. Where i'm maintaining sip registration status on database and able to configure to get those using init_query on register module.

But technically which sip method or any other way to request SIP client to renew their Registrations.
49
YateBTS / Re: BladeRF 2.0 micro xA4 Noise Problem
« Last post by jhutchins on July 27, 2020, 03:43:06 AM »
Are you able to use yate with an xA4 with any success? The only person I've spoken to in the last 2 years who has been able to use yate with an xA4 is Robert Ghilduta   ::)  I've found many other uses for it though so definatley not saying I have buyers remorse but not aware of anyone else to get it  working with yate
50
Other Yate server issues / SIP outbound proxy patch
« Last post by Gerry on July 11, 2020, 10:54:28 AM »
Hi,

Please find below a patch for Yate version 4.1.1. to get outbound proxying working. The patch introduces a new outboundproxy parameter which can be used for example from regexroute, like

; set proxy gateway
.*=;outboundproxy=112.203.17.24:5069

When this parameter is set it connects the outgoing YateSIPConnection to a proxy and sends all SIP messages there instead of the r-uri destination.

Comments re this patch would be highly welcome.

Cheers Gerry

@@ -4869,45 +4873,71 @@
     m_rtpForward = msg.getBoolValue(YSTRING("rtp_forward"));
     m_user = msg.getValue(YSTRING("user"));
     m_line = msg.getValue(YSTRING("line"));
+
     String tmp;
     YateSIPLine* line = 0;
     if (m_line) {
-   line = plugin.findLine(m_line);
-   if (line) {
-       if (uri.find('@') < 0 && !uri.startsWith("tel:")) {
-      if (!uri.startsWith("sip:"))
-          tmp = "sip:";
-      tmp << uri << "@" << line->domain();
-       }
-       m_externalAddr = line->getLocalAddr();
-   }
-    }
+       line = plugin.findLine(m_line);
+       if (line) {
+           if (uri.find('@') < 0 && !uri.startsWith("tel:")) {
+                if (!uri.startsWith("sip:"))
+                    tmp = "sip:";
+                tmp << uri << "@" << line->domain();
+           }
+           m_externalAddr = line->getLocalAddr();
+       }
+    }
+
     if (tmp.null()) {
-   if (!(uri.startsWith("tel:") || uri.startsWith("sip:"))) {
-       int sep = uri.find(':');
-       if ((sep < 0) || ((sep > 0) && (uri.substr(sep+1).toInteger(-1) > 0)))
-      tmp = "sip:";
-   }
-   tmp << uri;
+        if (!(uri.startsWith("tel:") || uri.startsWith("sip:"))) {
+            int sep = uri.find(':');
+            if ((sep < 0) || ((sep > 0) && (uri.substr(sep+1).toInteger(-1) > 0)))
+              tmp = "sip:";
+        }
+        tmp << uri;
     }
     m_uri = tmp;
     m_uri.parse();
-    if (!setParty(msg,false,"o",m_uri.getHost(),m_uri.getPort()) && line) {
-   SIPParty* party = line->party();
-   setParty(party);
-   TelEngine::destruct(party);
-    }
+
+    tmp.clear();
+    String rproxyaddr;
+    int rproxyport = 0;
+    tmp = msg.getValue(YSTRING("outboundproxy"));
+    if (tmp) {
+        int sep = tmp.find(':');
+        if (sep > 0) {
+            rproxyport = tmp.substr(sep + 1).toInteger(0);
+            rproxyaddr = tmp.substr(0,sep);
+        }
+        else
+            rproxyaddr = tmp;
+    }
+
+    if (rproxyaddr) {
+        setParty(msg,false,"o",rproxyaddr,rproxyport);
+    } else if (!setParty(msg,false,"o",m_uri.getHost(),m_uri.getPort()) && line) {
+       SIPParty* party = line->party();
+       setParty(party);
+       TelEngine::destruct(party);
+    }
+
     SIPMessage* m = new SIPMessage("INVITE",m_uri);
-    setSipParty(m,line,true,msg.getValue("host"),msg.getIntValue("port"));
+
+    if (rproxyaddr)
+        setSipParty(m,line,true,rproxyaddr,rproxyport);
+    else
+        setSipParty(m,line,true,msg.getValue("host"),msg.getIntValue("port"));
+
     if (!m->getParty()) {

Pages: 1 ... 3 4 [5] 6 7 ... 10