[OpenSIPS-Users] Opensips 2.1.2 - can't pass var in rewritehostport()

2018-11-13 Thread maatohewetbi
I have Opensips 2.1.2 and wanna to pass IP variable using sip header and parse it in Opensips to use with rewritehostport() function. I've checked that when I use it like rewritehostport("var(IP):5060") I can't pass this variable, it's empty. I've read it's impossible to do it. How can I do it rig

Re: [OpenSIPS-Users] Opensips 2.1.2 - can't pass var in rewritehostport()

2018-11-16 Thread maatohewetbi
How can I use it, like that? $rd=$hdr(X-IP-Header) rewritehostport($rd:5060) -- Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/c

[OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-03 Thread maatohewetbi
I use Opensips 1.6.2 on my server. I want to add BLF function to it but I don't know how. I have config where I route calls to asterisk. There are tutorials where I can set Opensip Presence Server as standalone, with OpenXcap as well, but there's nowhere config how to set Opensips to work on one ma

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-03 Thread maatohewetbi
It doesn't work. If I call number B, it rings, and BLF LED is blinking, but after picking up the phone, call is without audio and LED is still blinking event I disconnect call. Then If I try to call again, call freezes like if it's routing in loop, and B side doesn't ring at all. I heve to restart

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-09 Thread maatohewetbi
Have You got any clue, why this is happnning? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605485.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___

[OpenSIPS-Users] How to store variables into file

2017-01-10 Thread maatohewetbi
How can I save any variable into log? I use somethin like this: log("$Ts"); But in log file I always get: Jan 9 16:39:14 OpenSips/sbin/opensips[23670]: $Ts How I can get this variable in log? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/How-to-sto

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-10 Thread maatohewetbi
Yes, I added this route. You can check my config, it's in this post. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605502.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

Re: [OpenSIPS-Users] How to store variables into file

2017-01-11 Thread maatohewetbi
Ok, I managed to get variables in log. I used *xlog* instead of *log*. It looks like variables can't be written by log function. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/How-to-store-variables-into-file-tp7605497p7605504.html Sent from the OpenSIPS

[OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-11 Thread maatohewetbi
Is there any way to make an IP authorization with registrar module? First I want to authenticate peer with IP, and then allow him to register with correct login/pass. Or is there any way to select any variable from DB? -- View this message in context: http://opensips-open-sip-server.1449251.n2.

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-11 Thread maatohewetbi
Yes, but I want to check sip login first, not an IP. Here is ny plan, what I want to do: - store IP, login in one table (a new on or existing one) - there will be IP and SIP logins. When a client make a registration, my script should check if this login is in table, if yes - then check IP, if i

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-13 Thread maatohewetbi
Yes, but every IP and login should be in table. How can I read variables from DB? Is it possible to do it? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605547.html Sent from the Ope

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-13 Thread maatohewetbi
I think You don't understand. My Opensips should work in this scenario: 1. When user wants to register, I have to check whether his sip login is in address table (which can be stored in context_info for example). If it is there then check IP, which is in this record, for this sip login. If this IP

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-13 Thread maatohewetbi
Still I have to check login whether it exist in table. Then I have to compare it to IP address. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605554.html Sent from the OpenSIPS - Use

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-13 Thread maatohewetbi
Razvan, that's what I was looking for. I haven't tested it yet but it looks like You made my day! Thanks -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605556.html Sent from the OpenS

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-17 Thread maatohewetbi
Razvan, I've found that this conditional doesn't work: if ($rc == -2) It turned out that $rc variable is never -2, although select query(select ip from address where context_info='$fU'", "$avp(ip)"), doesn't contain any values. When I checked $rc variable its value was 1, and once it was somethi

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-17 Thread maatohewetbi
Hello, can anybody help? I need blf to work. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605593.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-17 Thread maatohewetbi
Where are the sequential requests? Can You point it in my script? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605598.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___

Re: [OpenSIPS-Users] Registrar with IP authentication - selecting variables from DB

2017-01-17 Thread maatohewetbi
I've just did it like this: xlog("$rc"); and on Friday I got 18446744073709551615 so You were right that it was unsigned int. But now if I want to read xlog("$rc") it has 1 value. And my table is empty. Now I've changed script and it looks: if ($avp(s:ip) == null ) { xlog("no results found

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-17 Thread maatohewetbi
You are right Bogdan, I forgot about these requests. Anyway, thanks for help - I will look at webinars. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605602.html Sent from the OpenSIPS - Users mailin

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-19 Thread maatohewetbi
I want to ask what bolded values mean: # -- core presence params -- modparam("presence","server_address","sip:*sa*@10.10.10.10:5060") # -- pua and pua_dialoginfo parameters -- modparam("pua_dialoginfo", "presence_server", "sip:*sa*@10.10.10.10:5060") I don't really know what to write there.

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-19 Thread maatohewetbi
I think I found the reason BLF doesn't work. I made a test. I've erased presenity table. Then: 1. I called other user, led is blinking, and presentity table shows record with xml bodies with *early* state. 2. Then I pickup a call, the same record changes with *confirmed* state. 3. Then I end this

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-19 Thread maatohewetbi
I think I found the reason BLF doesn't work. I made a test. I've erased presenity table. Then: 1. I called other user, led is blinking, and presentity table shows record with xml bodies with early state. 2. Then I pickup a call, the same record changes with confirmed state. 3. Then I end this call,

Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

2017-01-20 Thread maatohewetbi
How did You check it? You checked calls from this sip login? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605677.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___

[OpenSIPS-Users] BLF authorize

2017-04-24 Thread maatohewetbi
I've just added BLF to my Opensips 1.11.9 and it seems to work ok, but I want to start another thing: I want to authorize users, I want to let user to monitor only certain users. I've just added this to my script: / route[handle_presence] { avp_db_query("select user_id from user where sip_login='

[OpenSIPS-Users] BLF with only one domain?

2017-04-24 Thread maatohewetbi
I have a strange behaviour in Opensips. Look at this, In active_watchers table I get something like this: presentity_ur i:sip:11...@sip.test.com.pl watcher_username: 1 watcher_domain: sip.test.com.pl to_user: 1 to_domain: sip.test.com.p so it means my user 1 wants to

Re: [OpenSIPS-Users] BLF authorize

2017-04-24 Thread maatohewetbi
Thank You Bogdan! I will shorten expire header and will see whether it will work. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-authorize-tp7607123p7607162.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. _

Re: [OpenSIPS-Users] BLF with only one domain?

2017-04-25 Thread maatohewetbi
I've realized that bla_presentity_spec (str) should do the trick: modparam("presence", "bla_presentity_spec", "$var(bla_pres)") I could set this module, and set a variable ($var(bla_pres)) to $var(bla_pres) = "sip:" + $au + "@" + "192.168.0.111"; burt active_watchers table still show auto-genera

Re: [OpenSIPS-Users] BLF with only one domain?

2017-04-26 Thread maatohewetbi
I think I didn't describe it correctly. Let me explain my scenario: AsteriskBox1(IP:192.168.0.100)<-SIP->Opensips1.11(192.168.0.110) Asterisk sends Invites to Opensips to an IP, eg. 192.168.0.110. Opensips listens on this IP, but it has also a few domains: sip1.com sip2.com ... There are users, t

Re: [OpenSIPS-Users] BLF with only one domain?

2017-04-28 Thread maatohewetbi
Can I get any response? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-with-only-one-domain-tp7607133p7607269.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list U

[OpenSIPS-Users] How to change presentity_uri in Opensips 1.11?

2017-05-04 Thread maatohewetbi
My scenario is as follows: AsteriskBox1(IP:192.168.0.100)<-SIP->Opensips1.11(192.168.0.110) Asterisk sends Invites to Opensips to an IP, eg. 192.168.0.110. Opensips listens on this IP, but it has also a few domains: sip1.com sip2.com ... Users can register to these domains, but although they regi

Re: [OpenSIPS-Users] BLF with only one domain?

2017-05-05 Thread maatohewetbi
I think this param will not work for me, because I use event:dialog which is not supported in this function. So, how can I change presentity_uri before user subscription? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-with-only-one-domain-tp7607133p76

[OpenSIPS-Users] Call Pickup feature in Opensips 1.11

2017-05-22 Thread maatohewetbi
Can anyone explain how to make call pickup work in Opensips? In asterisk it works ok, but I couldn't find any documentation about this feature in Opensips. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Call-Pickup-feature-in-Opensips-1-11-tp7607496.html

[OpenSIPS-Users] Opensips 2.3 db version error

2017-06-02 Thread maatohewetbi
I wanted to install Opensips 2.3, and everythings goes well, but after this process I can't start opensips and have those lines in log: /Jun 2 11:17:06 OpenSips-Reseller /sbin/opensips[11692]: ERROR:core:db_check_table_version: invalid version 1009 for table aliases found, expected 1011 Jun 2 11

Re: [OpenSIPS-Users] Opensips 2.3 db version error

2017-06-02 Thread maatohewetbi
Yes it is. I managed to get Opensips working: I replicated location table into aliases, so that both are the same. It started. Big Thank You Răzvan -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-2-3-db-version-error-tp7607579p7607582.html Sent fr

Re: [OpenSIPS-Users] Call Pickup feature in Opensips 1.11

2017-06-07 Thread maatohewetbi
Is it any way to upload whole script to test Call pickup with 2.3? I've installed this version and pasted pickup config from module event_routing documentation. Call Pickup doesn't work as it should. When I call one leg, and want to handle this call by third user I get only 480 message after dialin

Re: [OpenSIPS-Users] BLF with only one domain?

2017-06-08 Thread maatohewetbi
Maybe there is another way to change presentity_uri? I might want to rewrite uri before user subscription? Do You think it might help? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/BLF-with-only-one-domain-tp7607133p7607665.html Sent from the OpenSIPS -

Re: [OpenSIPS-Users] BLF with only one domain?

2017-06-12 Thread maatohewetbi
Before subscription, every data has to be loaded to cache and/or to database. If I want to change presentity_uri I can do it manually before subscription route is called. But I have to find out what variable I should set. Is anybody here who knows which variable store presentity_uri just to change

[OpenSIPS-Users] Can't change From header

2017-06-13 Thread maatohewetbi
I want to change from header by using *uac_replace_from*, but when I call it from request route it's still the same. route[handle_presence] { if (is_method("PUBLISH")) { handle_publish(); } else if (is_method("SUBSCRIBE")) { xlog ("fu: $fu"); uac_replace_from("","sip:ro...