Re: [OpenSIPS-Users] Registrar

2023-06-06 Thread Bogdan-Andrei Iancu

Hi,

It sounds to be more of an Asterisk issue, rather than OpenSIPS - when 
proxying a REGISTER request, no registration info is changed/altered by 
OpenSIPS.


For the sake of completion, here is the link to your second identical post:
    http://lists.opensips.org/pipermail/users/2023-May/046959.html

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 5/31/23 6:15 PM, nutxase via Users wrote:

Hey Guys

How can i make opensips rewrite the contact of the registration sent 
to the received ip

currently i have
UAC -> opensips > asterisk
and asterisk shows the ip of the uac as the opensips ip
how can i make it rewrite it to the ip in the path or the via received=

thanks

Sent with Proton Mail  secure email.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and mid_registrar modules

2022-02-14 Thread Alberto
Thanks, I was trying to use the lookup function, overlooked completely
is_registered.
Note to self: RTFM!!!

On Mon, 14 Feb 2022 at 07:10, Bogdan-Andrei Iancu 
wrote:

> Hi Alberto,
>
> I have to admit you lost me somewhere on the way with what you want to do.
> But focusing on your final question "But when the uac starts a call, how do
> I validate the uac was previously registered?", the answer is
> https://opensips.org/html/docs/modules/3.2.x/registrar.html#func_is_registered
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp
>   https://www.opensips.org/Training/Bootcamp
>
> On 2/10/22 9:04 PM, Alberto wrote:
>
> Hi,
>
> I followed pretty much the available tutorials for mid_registrar, but I
> can't figure out something:
>
> I have:
>
> loadmodule "registrar.so"
> modparam("registrar", "attr_avp", "$avp(avp_json)")
> modparam("registrar", "max_contacts", 1)
> modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")
>
> loadmodule "mid_registrar.so"
> modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
> modparam("mid_registrar", "max_contacts", 1)
> modparam("mid_registrar", "mode", 0)
> modparam("mid_registrar", "tcp_persistent_flag",
> "TCP_PERSIST_REGISTRATIONS")
>
> and then:
>
>   if (is_method("REGISTER")) {
> $json(x) := "{}";
>
> python_exec("fn_lookup_account", "$rd|$socket_in(proto)");
>
> $avp(avp_json) = $json_compact(x);
> mid_registrar_save("location");
> switch ($retcode) {
>   case 1:
> $du = $json(x/remote_dest);
> $ru = $json(x/remote_uri);
> route(relay);
> break;
>   case 2:
> xlog("L_INFO", "Absorb REGISTER!\n");
> break;
>   default:
> xlog("L_INFO", "Failed to save registration!\n");
> break;
> }
>
> exit;
>   }
>
>
> I do this because I want to store some configuration in the attr column
> that I don't want to retrieve every call.
>
> However, the mid_registrar example then continues with
> mid_registrar_lookup, and that works fine for calls originating from the
> main registrar going to the uac.
> But when the uac starts a call, how do I validate the uac was previously
> registered?
>
> I tried with this below, but lookup doesn't work in this scenario.
>
> if (mid_registrar_lookup("location")) {
>   $json(x) := $avp(avp_json);
>   xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found
> mid_registrar_lookup from $si:$sp to $ru\n");
> } else if (lookup("location")) {
>   $json(x) := $avp(avp_json);
>   xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found lookup from
> $si:$sp to $ru\n");
> } else {
>   t_reply(404, "Not Found");
>   exit;
> }
>
>
> Thanks
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and mid_registrar modules

2022-02-13 Thread Bogdan-Andrei Iancu

Hi Alberto,

I have to admit you lost me somewhere on the way with what you want to 
do. But focusing on your final question "But when the uac starts a call, 
how do I validate the uac was previously registered?", the answer is 
https://opensips.org/html/docs/modules/3.2.x/registrar.html#func_is_registered


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp
  https://www.opensips.org/Training/Bootcamp

On 2/10/22 9:04 PM, Alberto wrote:

Hi,

I followed pretty much the available tutorials for mid_registrar, but 
I can't figure out something:


I have:

loadmodule "registrar.so"
modparam("registrar", "attr_avp", "$avp(avp_json)")
modparam("registrar", "max_contacts", 1)
modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")

loadmodule "mid_registrar.so"
modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "tcp_persistent_flag", 
"TCP_PERSIST_REGISTRATIONS")


and then:

  if (is_method("REGISTER")) {
    $json(x) := "{}";

    python_exec("fn_lookup_account", "$rd|$socket_in(proto)");

    $avp(avp_json) = $json_compact(x);
    mid_registrar_save("location");
    switch ($retcode) {
      case 1:
        $du = $json(x/remote_dest);
        $ru = $json(x/remote_uri);
        route(relay);
        break;
      case 2:
        xlog("L_INFO", "Absorb REGISTER!\n");
        break;
      default:
        xlog("L_INFO", "Failed to save registration!\n");
        break;
    }

    exit;
  }


I do this because I want to store some configuration in the attr 
column that I don't want to retrieve every call.


However, the mid_registrar example then continues with 
mid_registrar_lookup, and that works fine for calls originating from 
the main registrar going to the uac.
But when the uac starts a call, how do I validate the uac was 
previously registered?


I tried with this below, but lookup doesn't work in this scenario.

if (mid_registrar_lookup("location")) {
  $json(x) := $avp(avp_json);
  xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found 
mid_registrar_lookup from $si:$sp to $ru\n");

} else if (lookup("location")) {
  $json(x) := $avp(avp_json);
  xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found lookup 
from $si:$sp to $ru\n");

} else {
  t_reply(404, "Not Found");
  exit;
}


Thanks

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Alberto
I'll do that.
Thanks

On Tue, 11 Jan 2022, 12:42 Liviu Chircu,  wrote:

> On 11.01.2022 11:50, Alberto wrote:
>
>
> How do I insert values in the kv_store column?
> It's easy to use the attr_avp, but I need to store a couple more values
> upon registrations and the key-value storage would be the perfect solution.
>
> Hello, Alberto!
>
> The "kv_store" column is for internal purposes, hence there is no way to
> READ or WRITE values to it from the opensips.cfg script.
>
> Regarding attr_avp[1]: why not store your data in JSON format (perhaps
> using the $json_compact[2]) variable?  This way, you can give it
> structure, using as many nesting levels as necessary in order to fit all of
> it.
>
> [1]: https://opensips.org/docs/modules/3.3.x/registrar.html#param_attr_avp
> [2]: https://opensips.org/docs/modules/3.3.x/json.html#pv_json_compact
>
> Best Regards,
>
> --
> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Liviu Chircu

On 11.01.2022 11:50, Alberto wrote:


How do I insert values in the kv_store column?
It's easy to use the attr_avp, but I need to store a couple more 
values upon registrations and the key-value storage would be the 
perfect solution.


Hello, Alberto!

The "kv_store" column is for internal purposes, hence there is no way to 
READ or WRITE values to it from the opensips.cfg script.


Regarding attr_avp^[1] : why not store your data in JSON format (perhaps 
using the $json_compact^[2] ) variable?  This way, you can give it 
structure, using as many nesting levels as necessary in order to fit all 
of it.


[1]: https://opensips.org/docs/modules/3.3.x/registrar.html#param_attr_avp
[2]: https://opensips.org/docs/modules/3.3.x/json.html#pv_json_compact

Best Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar+TLS+NAT question (OpenSIPS 3.0.1)

2020-06-22 Thread Bogdan-Andrei Iancu

Hey Pete,

If you do an xlog on $fs after the lookup, what do you see there ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com

On 6/16/20 4:37 PM, Pete Kelly wrote:

Hi

I am running a Registrar in a natted location (AWS) which is currently 
accessed via a tls socket.


The listen parameter for the tls socket uses an alias to set the 
publicly advertised address, along the lines of:


listen=tls:172.3.4.5:5061  AS 
tls:99.88.77.66:5061 


however this public alias is also being set as the Socket when the 
AOR is stored in the usrloc module.


  "Socket": "tls:99.88.77.66:5061 "

When I then do a lookup() on a registered user, it is failing to route 
as I believe the socket is being set to the public alias. It was 
working fine when there was no TLS involved.


Is there an obvious way I can try to fix this? (I've tried 
using force_send_socket(tls:172.3.4.5:5061 ) 
after the lookup, but that isn't helping either)


Pete

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar load branch flags

2020-03-20 Thread Ben Newlin
You could try saving the request uri prior to calling lookup() and then restore 
it after. There’s also the $ou variable which provides the original request uri 
for the message prior to any modifications.

Ben Newlin

From: Users  on behalf of Bogdan-Andrei Iancu 

Reply-To: OpenSIPS users mailling list 
Date: Friday, March 20, 2020 at 7:13 AM
To: OpenSIPS users mailling list , Grant Bagdasarian 

Subject: Re: [OpenSIPS-Users] Registrar load branch flags

Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com<https://www.opensips-solutions.com>

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/<https://www.opensips.org/events/Summit-2020Amsterdam/>


On 3/16/20 11:38 PM, Grant Bagdasarian wrote:
Hello,

I’m looking for a way to load the branch flags (set before calling save()) for 
a registered contact, without rewriting the request uri. Basically, test if the 
requested contact is registered, if so load its branch flags, but not rewrite 
the request uri. The lookup function provides the “B” flag, but this didn’t 
load the branch flags. I’ve also tried the other is_* functions exposed by the 
registrar module, but these also didn’t load the branch flags.

Are there ways to accomplish this using already exposed functions in opensips 
or should I get creative and for instance use the sql_cacher to load the branch 
flags myself?

Thanks and kind regards,

Grant



___

Users mailing list

Users@lists.opensips.org<mailto:Users@lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar load branch flags

2020-03-20 Thread Bogdan-Andrei Iancu

Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/16/20 11:38 PM, Grant Bagdasarian wrote:

Hello,

I’m looking for a way to load the branch flags (set before calling 
save()) for a registered contact, without rewriting the request uri. 
Basically, test if the requested contact is registered, if so load its 
branch flags, but not rewrite the request uri. The lookup function 
provides the “B” flag, but this didn’t load the branch flags. I’ve 
also tried the other is_* functions exposed by the registrar module, 
but these also didn’t load the branch flags.


Are there ways to accomplish this using already exposed functions in 
opensips or should I get creative and for instance use the sql_cacher 
to load the branch flags myself?


Thanks and kind regards,

Grant

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup function

2019-03-08 Thread Pasan Meemaduma via Users
 Hi Bogdan,
Thanks for the clarification. All good now.

On Friday, 8 March 2019, 1:52:18 PM GMT+5:30, Bogdan-Andrei Iancu 
 wrote:  
 
  Hi Pasan,
 
 It is about filtering based on SIP methods. During registration, an UAC may 
list the supported SIP methods for that registration (like INVITE, MESSAGE). If 
the filtering is activated during the lookup() for a SUBSCRIBE, the lookup will 
fail as the current methods does not match the supported methods in the 
registered contact.
 
 Regards,
  Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/
 On 03/08/2019 05:34 AM, Pasan Meemaduma via Users wrote:
  
 Hi Guys, 
  Would someone able to shed some light on the method filtering flag (m) in 
registrar lookup function do  ? I'm having trouble understanding its purpose. 
Can somone give me an example of how it works ? 
  registrar Module 
   
|  
|  
| 
  |  
registrar Module
  |

  |

  |

  
  
  
  Thank you.
  
  
 ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
 
   ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup function

2019-03-08 Thread Bogdan-Andrei Iancu

Hi Pasan,

It is about filtering based on SIP methods. During registration, an UAC 
may list the supported SIP methods for that registration (like INVITE, 
MESSAGE). If the filtering is activated during the lookup() for a 
SUBSCRIBE, the lookup will fail as the current methods does not match 
the supported methods in the registered contact.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 03/08/2019 05:34 AM, Pasan Meemaduma via Users wrote:

Hi Guys,

Would someone able to shed some light on the method filtering flag (m) 
in registrar lookup function do ? I'm having trouble understanding its 
purpose. Can somone give me an example of how it works ?


registrar Module 







registrar Module





Thank you.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-18 Thread Răzvan Crainea
You are probably using an old version of OpenSIPS, that's why you are 
not seeing negative return values.


Checking if the IP might still be ok, if your database is consistent and 
has an IP for every user. So for now I would go with this solution.


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/17/2017 11:03 AM, maatohewetbi wrote:

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 in DB");
  xlog("$rc");

and it is ok, and works like it should, because $avp(s:ip) is NULL when
there's no records found. But I'm afraid it's not the best solution. What do
You think?



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605600.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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 in DB");
 xlog("$rc");

and it is ok, and works like it should, because $avp(s:ip) is NULL when
there's no records found. But I'm afraid it's not the best solution. What do
You think?



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605600.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-17 Thread Răzvan Crainea
That's weird. How did you check the value and you got 1842312...? I am 
asking because that does look like a -2, only converted to an unsigned 
representation, (unsigned int)-2 = 18446744073709551614). Or was it -1?
Can you control the data in the database and make sure you don't have 
that username when doing the query?


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/17/2017 10:06 AM, maatohewetbi wrote:

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
something like 1842312...so very long digit, but it was never -2. It it
possible that this value changes?



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605592.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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
something like 1842312...so very long digit, but it was never -2. It it
possible that this value changes?



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605592.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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 OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-13 Thread Răzvan Crainea

You can do something like this:

avp_db_query("select ip from address where context_info='$fU'", "$avp(ip)");
if ($rc == -2) {
# not found in db
} else if ($avp(ip) != $si) {
# reject the call
}

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/13/2017 01:51 PM, maatohewetbi wrote:

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 - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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 - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-13 Thread Stefano Pisani

Use 0.0.0.0/0 for those without IP filter.

s

Il 13/01/2017 12:09, maatohewetbi ha scritto:

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
is the same as real IP of this user (from $si value), the user can be
registered. If this IP is not the same - user can't be registered.
2. When user wants to register, but his sip login doesn't exist in address
table - this user can be registered without IP checking.

So I have to check IP, only for users, whom login is in address table.
Others, can registered without checking. If I use one of function in
permission module I always have to check IP. I have to check login first,
then IP. I hope that now everything is clear.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605552.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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
is the same as real IP of this user (from $si value), the user can be
registered. If this IP is not the same - user can't be registered.
2. When user wants to register, but his sip login doesn't exist in address
table - this user can be registered without IP checking.

So I have to check IP, only for users, whom login is in address table.
Others, can registered without checking. If I use one of function in
permission module I always have to check IP. I have to check login first,
then IP. I hope that now everything is clear.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605552.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-13 Thread Răzvan Crainea
Yes, it is. Provision the address table in the database and use the 
check_source_address() functionin the script.


[1] http://www.opensips.org/html/docs/modules/2.2.x/permissions#id295007

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/13/2017 11:03 AM, maatohewetbi wrote:

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 OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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 OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-13 Thread Răzvan Crainea
Then simply reverse the IP check logic and do it after the user is 
authenticated.


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/11/2017 01:15 PM, maatohewetbi wrote:

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 it matches - allow a registration, if
not - send 403 and exit. There will be another case, when a SIP login is not
in this table - just allow registration without checking an IP.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605516.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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 it matches - allow a registration, if
not - send 403 and exit. There will be another case, when a SIP login is not
in this table - just allow registration without checking an IP. 



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605516.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

2017-01-11 Thread Răzvan Crainea
Yes, you can use the check_source() address function[1] just before the 
auth block.


[1] http://www.opensips.org/html/docs/modules/2.2.x/permissions#id295007

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/11/2017 12:44 PM, maatohewetbi wrote:

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.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar contact delete

2016-01-19 Thread Bogdan-Andrei Iancu

Hi Tito,

What do you understand by socket ?? The TCP connection ? or ?

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 15.01.2016 22:56, Tito Cumpen wrote:

Group,

I am currently using a max contact param within the registrar module. 
I am using if (!save("location","f")) to force the new 
registration the case that the max has been reached.It appears that 
the oldest registration is deleted. Will the respective socket to the 
deleted contact be closed after the contact has been deleted ? Or will 
it linger until the previous registration expiry time concludes?



Thanks,
Tito


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar contact delete

2016-01-19 Thread Tito Cumpen
Bogdan,

Yea will the server close tcp connection to the client if the record is
replace as I mentioned ?

Thanks,
Tito
On Jan 19, 2016 5:24 AM, "Bogdan-Andrei Iancu"  wrote:

> Hi Tito,
>
> What do you understand by socket ?? The TCP connection ? or ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 15.01.2016 22:56, Tito Cumpen wrote:
>
> Group,
>
> I am currently using a max contact param within the registrar module. I am
> using  if (!save("location","f")) to force the new
> registration the case that the max has been reached.It appears that the
> oldest registration is deleted. Will the respective socket to the deleted
> contact be closed after the contact has been deleted ? Or will it linger
> until the previous registration expiry time concludes?
>
>
> Thanks,
> Tito
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar contact delete

2016-01-19 Thread Bogdan-Andrei Iancu
There is no 1 to 1 relation between calls/registration (or generic SIP 
elements) and the TCP connections - a TCP conn may be used by multiple 
such SIP elements.


A TCP conn is closed by opensips if there is no traffic on it for 
certain amount of time.


Do you use the "tcp_persistent_flag" ?
http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id293556

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 19.01.2016 13:02, Tito Cumpen wrote:


Bogdan,

Yea will the server close tcp connection to the client if the record 
is replace as I mentioned ?


Thanks,
Tito

On Jan 19, 2016 5:24 AM, "Bogdan-Andrei Iancu" > wrote:


Hi Tito,

What do you understand by socket ?? The TCP connection ? or ?

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 15.01.2016 22:56, Tito Cumpen wrote:

Group,

I am currently using a max contact param within the registrar
module. I am using   if (!save("location","f")) to force
the new registration the case that the max has been reached.It
appears that the oldest registration is deleted. Will the
respective socket to the deleted contact be closed after the
contact has been deleted ? Or will it linger until the previous
registration expiry time concludes?


Thanks,
Tito


___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Pete Kelly
Hi Bodgan

I want to do it from script.

Regards
Pete

On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org wrote:

  Hi Pete,

 Do you want to do this from script or via MI ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 24.06.2015 11:48, Pete Kelly wrote:

 Hi

  Is there any way or known workaround to do a registrar lookup to
 retrieve all currently registered users for a given domain?

  As I understand it I can pass in an AOR to retrieve a specific
 user@domain, however I would like to to retrieve all users on a given
 domain.

  Regards
  Pete


 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Ovidiu Sas
Try to register all users with a forced AOR:
http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294034
Then perform a lookup with the same forced AOR:
http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366
That should do the trick.

Regards,
Ovidiu Sas
On Jun 25, 2015 08:05, Pete Kelly pke...@gmail.com wrote:



 On 25 June 2015 at 11:16, Bogdan-Andrei Iancu bog...@opensips.org wrote:

  Hi Pete,

 No, at script level you cannot get a list with all the registered users.
 Of course, you can do a very dirty trick, to run a exec() and do the MI
 querying to get the list.

 But why do you need that list in your script logic ?


 In order to be able to call with parallel fork *all* users who are
 currently registered, unless there is another mechanism for this?



 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 25.06.2015 10:47, Pete Kelly wrote:

 Hi Bodgan

  I want to do it from script.

  Regards
 Pete

 On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Pete,

 Do you want to do this from script or via MI ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

  On 24.06.2015 11:48, Pete Kelly wrote:

  Hi

  Is there any way or known workaround to do a registrar lookup to
 retrieve all currently registered users for a given domain?

  As I understand it I can pass in an AOR to retrieve a specific
 user@domain, however I would like to to retrieve all users on a given
 domain.

  Regards
  Pete


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users






 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Bogdan-Andrei Iancu
So you want to call all the users registered on the server ? can you 
make a db query to get all the subscribers (from a table) and do a loop 
to do lookup(location) for each of them, one by one ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 25.06.2015 15:05, Pete Kelly wrote:



On 25 June 2015 at 11:16, Bogdan-Andrei Iancu bog...@opensips.org 
mailto:bog...@opensips.org wrote:


Hi Pete,

No, at script level you cannot get a list with all the registered
users. Of course, you can do a very dirty trick, to run a exec()
and do the MI querying to get the list.

But why do you need that list in your script logic ?


In order to be able to call with parallel fork *all* users who are 
currently registered, unless there is another mechanism for this?



Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 25.06.2015 10:47, Pete Kelly wrote:

Hi Bodgan

I want to do it from script.

Regards
Pete

On 24 June 2015 at 15:28, Bogdan-Andrei Iancu
bog...@opensips.org mailto:bog...@opensips.org wrote:

Hi Pete,

Do you want to do this from script or via MI ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 24.06.2015 11:48, Pete Kelly wrote:

Hi

Is there any way or known workaround to do a registrar
lookup to retrieve all currently registered users for a
given domain?

As I understand it I can pass in an AOR to retrieve a
specific user@domain, however I would like to to retrieve
all users on a given domain.

Regards
Pete


___
Users mailing list
Users@lists.opensips.org  mailto:Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users








___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Pete Kelly
On 25 June 2015 at 11:16, Bogdan-Andrei Iancu bog...@opensips.org wrote:

  Hi Pete,

 No, at script level you cannot get a list with all the registered users.
 Of course, you can do a very dirty trick, to run a exec() and do the MI
 querying to get the list.

 But why do you need that list in your script logic ?


In order to be able to call with parallel fork *all* users who are
currently registered, unless there is another mechanism for this?



 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 25.06.2015 10:47, Pete Kelly wrote:

 Hi Bodgan

  I want to do it from script.

  Regards
 Pete

 On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org wrote:

  Hi Pete,

 Do you want to do this from script or via MI ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

  On 24.06.2015 11:48, Pete Kelly wrote:

  Hi

  Is there any way or known workaround to do a registrar lookup to
 retrieve all currently registered users for a given domain?

  As I understand it I can pass in an AOR to retrieve a specific
 user@domain, however I would like to to retrieve all users on a given
 domain.

  Regards
  Pete


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Bogdan-Andrei Iancu

Hi Pete,

No, at script level you cannot get a list with all the registered users. 
Of course, you can do a very dirty trick, to run a exec() and do the MI 
querying to get the list.


But why do you need that list in your script logic ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 25.06.2015 10:47, Pete Kelly wrote:

Hi Bodgan

I want to do it from script.

Regards
Pete

On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org 
mailto:bog...@opensips.org wrote:


Hi Pete,

Do you want to do this from script or via MI ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 24.06.2015 11:48, Pete Kelly wrote:

Hi

Is there any way or known workaround to do a registrar lookup to
retrieve all currently registered users for a given domain?

As I understand it I can pass in an AOR to retrieve a specific
user@domain, however I would like to to retrieve all users on a
given domain.

Regards
Pete


___
Users mailing list
Users@lists.opensips.org  mailto:Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Pete Kelly
The trouble is that would then prevent from calling individual users,
surely?

I was going to do as Bogdan suggested and check subscribers then loop.

On 25 June 2015 at 13:56, Ovidiu Sas o...@voipembedded.com wrote:

 Try to register all users with a forced AOR:
 http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294034
 Then perform a lookup with the same forced AOR:
 http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366
 That should do the trick.

 Regards,
 Ovidiu Sas
 On Jun 25, 2015 08:05, Pete Kelly pke...@gmail.com wrote:



 On 25 June 2015 at 11:16, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Pete,

 No, at script level you cannot get a list with all the registered users.
 Of course, you can do a very dirty trick, to run a exec() and do the MI
 querying to get the list.

 But why do you need that list in your script logic ?


 In order to be able to call with parallel fork *all* users who are
 currently registered, unless there is another mechanism for this?



 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 25.06.2015 10:47, Pete Kelly wrote:

 Hi Bodgan

  I want to do it from script.

  Regards
 Pete

 On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Pete,

 Do you want to do this from script or via MI ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

  On 24.06.2015 11:48, Pete Kelly wrote:

  Hi

  Is there any way or known workaround to do a registrar lookup to
 retrieve all currently registered users for a given domain?

  As I understand it I can pass in an AOR to retrieve a specific
 user@domain, however I would like to to retrieve all users on a given
 domain.

  Regards
  Pete


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users






 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-25 Thread Ovidiu Sas
You can try to call save twice:
- without forced AOR;
- with forced AOR.

Then you should be able to route individually and to all. I haven't tried
to call save twice, but it should work.

If you do multiple lookups, after each lookup except for the last one, you
might need to push the current RURI into a branch. I can't remember if this
was fixed or not.
Also, there is a limited number of branches. You will need to take that
into account too.

Regards
Ovidiu Sas
On Jun 25, 2015 11:08, Pete Kelly pke...@gmail.com wrote:

 The trouble is that would then prevent from calling individual users,
 surely?

 I was going to do as Bogdan suggested and check subscribers then loop.

 On 25 June 2015 at 13:56, Ovidiu Sas o...@voipembedded.com wrote:

 Try to register all users with a forced AOR:
 http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294034
 Then perform a lookup with the same forced AOR:
 http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366
 That should do the trick.

 Regards,
 Ovidiu Sas
 On Jun 25, 2015 08:05, Pete Kelly pke...@gmail.com wrote:



 On 25 June 2015 at 11:16, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Pete,

 No, at script level you cannot get a list with all the registered
 users. Of course, you can do a very dirty trick, to run a exec() and do the
 MI querying to get the list.

 But why do you need that list in your script logic ?


 In order to be able to call with parallel fork *all* users who are
 currently registered, unless there is another mechanism for this?



 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 25.06.2015 10:47, Pete Kelly wrote:

 Hi Bodgan

  I want to do it from script.

  Regards
 Pete

 On 24 June 2015 at 15:28, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Pete,

 Do you want to do this from script or via MI ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

  On 24.06.2015 11:48, Pete Kelly wrote:

  Hi

  Is there any way or known workaround to do a registrar lookup to
 retrieve all currently registered users for a given domain?

  As I understand it I can pass in an AOR to retrieve a specific
 user@domain, however I would like to to retrieve all users on a given
 domain.

  Regards
  Pete


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users






 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar lookup

2015-06-24 Thread Bogdan-Andrei Iancu

Hi Pete,

Do you want to do this from script or via MI ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 24.06.2015 11:48, Pete Kelly wrote:

Hi

Is there any way or known workaround to do a registrar lookup to 
retrieve all currently registered users for a given domain?


As I understand it I can pass in an AOR to retrieve a specific 
user@domain, however I would like to to retrieve all users on a given 
domain.


Regards
Pete


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - usrloc

2014-06-26 Thread Bogdan-Andrei Iancu

Hi Leo,

1) it is normal - SIP and OpenSIPS allows multiple registrations per 
account (multiple contacts registered for the same AOR).


2) UDP or TCP sockets ??

3) once again, SIP allows parallel multiple registrations ; if you want 
to have only the last one (to override all the previous registrations), 
see the 'f' and 'c' flags for save():

http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294034

Try something like save(location,c01f)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.06.2014 15:07, leo wrote:

Hello:

I hope someone could give a clue on this...
The thing i don't understand is that doing the command /opensipsctl ul show/
i see a lot of contacts for the same AOR. My questions are:
- is this normal?
- This is also opening a lot of sockets (where most of them are useless)
- why i don't have just the last contact, the one that it will have the
latest info?


Thanks.

Leo.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-usrloc-tp7592073.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - usrloc

2014-06-26 Thread Leonardo Uzcudun
Thanks a lot Bogdan!!!

2) TCP sockets

3) I'll try it



Il Giovedì 26 Giugno 2014 16:42, Bogdan-Andrei Iancu bog...@opensips.org ha 
scritto:
 


Hi Leo,

1) it is normal - SIP and OpenSIPS allows multiple registrations per 
account (multiple contacts registered for the same AOR).

2) UDP or TCP sockets ??

3) once again, SIP allows parallel multiple registrations ; if you want 
to have only the last one (to override all the previous registrations), 
see the 'f' and 'c' flags for save():
http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294034

Try something like save(location,c01f)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 26.06.2014 15:07, leo wrote:
 Hello:

 I hope someone could give a clue on this...
 The thing i don't understand is that doing the command /opensipsctl ul show/
 i see a lot of contacts for the same AOR. My questions are:
 - is this normal?
 - This is also opening a lot of sockets (where most of them are useless)
 - why i don't have just the last contact, the one that it will have the
 latest info?


 Thanks.

 Leo.



 --
 View this message in context: 
 http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-usrloc-tp7592073.html
 Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - usrloc

2014-06-26 Thread Bogdan-Andrei Iancu

Leo,

2) if you use TCP for SIP, for each UAC you will have a TCP conn, so a 
TCP socket on the OpenSIPS side.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.06.2014 18:06, Leonardo Uzcudun wrote:

Thanks a lot Bogdan!!!

2) TCP sockets

3) I'll try it


Il Giovedì 26 Giugno 2014 16:42, Bogdan-Andrei Iancu 
bog...@opensips.org ha scritto:



Hi Leo,

1) it is normal - SIP and OpenSIPS allows multiple registrations per
account (multiple contacts registered for the same AOR).

2) UDP or TCP sockets ??

3) once again, SIP allows parallel multiple registrations ; if you want
to have only the last one (to override all the previous registrations),
see the 'f' and 'c' flags for save():
http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294034

Try something like save(location,c01f)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com http://www.opensips-solutions.com/

On 26.06.2014 15:07, leo wrote:
 Hello:

 I hope someone could give a clue on this...
 The thing i don't understand is that doing the command /opensipsctl 
ul show/

 i see a lot of contacts for the same AOR. My questions are:
 - is this normal?
 - This is also opening a lot of sockets (where most of them are useless)
 - why i don't have just the last contact, the one that it will have the
 latest info?


 Thanks.

 Leo.



 --
 View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-usrloc-tp7592073.html

 Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

 ___
 Users mailing list
 Users@lists.opensips.org mailto:Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-12 Thread Adrien Martin
Hello,

Ok, thanks.

Regards,

Adrien Martin

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-11 Thread Bogdan-Andrei Iancu

Hello,

OK, thanks for testing - I will push the fix I did in the public code. I 
will also give a bit more thinking to see what should be the best 
solution to expose the internal error.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 10.02.2014 18:29, Adrien Martin wrote:

Hello,

I tested it, and it works.

About the save() return codes, there are a lot of cases, so I would have
sorted it this way:
- no error,
- error codes in parsing SIP,
- server side errors (like manipulating usrloc),
- and service errors (like too many registers).

Here is a patch by way of example, but I can't say if it's the right way
to do.

Regards,



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-10 Thread Adrien Martin
Hello,

I tested it, and it works.

About the save() return codes, there are a lot of cases, so I would have
sorted it this way:
- no error,
- error codes in parsing SIP,
- server side errors (like manipulating usrloc),
- and service errors (like too many registers).

Here is a patch by way of example, but I can't say if it's the right way
to do.

Regards,

-- 
Adrien Martin

diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index 63e2d4d..9c0b2cf 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -816,7 +816,42 @@ error:
 
 	if (forced_c) free_contacts(forced_c);
 
-	return 0;
+  switch (rerrno) {
+case R_FINE:
+case R_OOO:
+case R_RETRANS:
+  return 0;
+case R_TOO_MANY:
+  return -2; /* Account errors */
+case R_INV_CSEQ:
+case R_TO_USER:
+case R_AOR_PARSE:
+case R_INV_EXP:
+case R_INV_Q:
+case R_PARSE:
+case R_TO_MISS:
+case R_CID_MISS:
+case R_CS_MISS:
+case R_PARSE_EXP:
+case R_PARSE_CONT:
+case R_STAR_EXP:
+case R_STAR_CONT:
+case R_UNESCAPE:
+case R_CONTACT_LEN:
+case R_CALLID_LEN:
+case R_PARSE_PATH:
+case R_PATH_UNSUP:
+  return -3; /* UAC's SIP errors */
+case R_UL_DEL_R:
+case R_UL_GET_R:
+case R_UL_NEW_R:
+case R_UL_INS_C:
+case R_UL_INS_R:
+case R_UL_DEL_C:
+case R_UL_UPD_C:
+case R_AOR_LEN:
+  return -4; /* Server side errors */
+  }
 
 return_minus_one:
 	if (forced_c) free_contacts(forced_c);



signature.asc
Description: OpenPGP digital signature
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-09 Thread Bogdan-Andrei Iancu

Hello,

Try the attached patch for preventing save() to stop your script.

In regards to the error itself, $err is not suitable for that. The idea 
will be to have save() returning detailed negative codes to reflect the 
actual internal error.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 08.02.2014 11:14, Martin Adrien wrote:

Hello,

On 07/02/2014 21:00, Bogdan-Andrei Iancu wrote:

Hello,

Not sure a bug or an undocumented feature, but save() function, in case
of internal error, is stopping the script.

Assuming we change that (to continue the script execution), you will
failure from save() without actually knowing the error itself. I
assume you are looking the error code/reason, right ?

That's right, the code/reason is quite useful.
But if it can not be known, maybe can I get the sip status sent by
Opensis, with $err.rcode for example.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

Regards,

Adrien Martin

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index c2a88fa..7e9daec 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -876,7 +876,7 @@ error:
 
 	if (forced_c) free_contacts(forced_c);
 
-	return 0;
+	return -2;
 
 return_minus_one:
 	if (forced_c) free_contacts(forced_c);
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-08 Thread Martin Adrien
Hello,

On 07/02/2014 21:00, Bogdan-Andrei Iancu wrote:
 Hello,
 
 Not sure a bug or an undocumented feature, but save() function, in case
 of internal error, is stopping the script.
 
 Assuming we change that (to continue the script execution), you will
 failure from save() without actually knowing the error itself. I
 assume you are looking the error code/reason, right ?

That's right, the code/reason is quite useful.
But if it can not be known, maybe can I get the sip status sent by
Opensis, with $err.rcode for example.

 Regards,
 
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

Regards,

Adrien Martin

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

Not sure a bug or an undocumented feature, but save() function, in case 
of internal error, is stopping the script.


Assuming we change that (to continue the script execution), you will 
failure from save() without actually knowing the error itself. I 
assume you are looking the error code/reason, right ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.02.2014 17:38, Adrien Martin wrote:

Hello,

In the registrar module I set the max_contacts parameter.
Save function work as expected, but I did not manage to log the 503
status when max contacts is reached.

It seems configuration after save function is not used by Opensips in
this case.

Is this an expected behavior and could I log the 503 in this way or
another ?

PS: I found an appropriate log at INFO level, but at the moment I would
rather keep NOTICE level. Indeed I could use INFO level if there is no
other way to check save function's return.
PS2: Opensips version is 1.8.0.

Regards,

Adrien Martin





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-24 Thread Nathaniel L Keeling III

Hello Bogdan,

The change that you did is now causing things to work. I have attached a 
snippet of the log file and I have listed the output from the extra 
debug lines from your patch within the email:


May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE 
SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug 
...
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is 10038f8a0
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
DBG:registrar:save_aux: xXx - flags string is p0
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 20
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=

.
.
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=800
May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 20
May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug] 
DBG:registrar:pack_ci: xXx - saving path into usrloc
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=


Thanks

Nathaniel L Keeling

On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for 
the flags - and it seems it does (the value I gave you is bogus, so it 
ended up with error).


Could you try this new patch (remove old one) ? (of course, put back 
the p0 param ).


Thanks and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/23/2013 01:43 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I am using opensips v1.8.3. I was using v1.8.2 earlier but I upgraded 
thinking it might fix my issue. When I changed the script to the 
save(location, $((ff))) I get this config error when starting 
opensips:


May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: pvar (inner_name) 
not found
May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: wrong char [f/102] 
in [$((ff))] at [3 (2)]

May 22 17:39:11 [14757] ERROR:core:fixup_spve: wrong format[$((ff))]
May 22 17:39:11 [14757] ERROR:core:fix_actions: fixing failed 
(code=-1) at cfg line 767

May 22 17:39:11 [14757] CRITICAL:core:fix_expr: fix_actions error
May 22 17:39:11 [14757] ERROR:core:main: failed to fix configuration 
with err code -1


Thanks

Nathaniel L Keeling

On 5/22/13 11:46 AM, Bogdan-Andrei Iancu wrote:

Could you try : save(location,$((ff))) ?
Do you get any error ?

What is your opensips version ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/22/2013 05:49 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I have validated the script and that i am passing a parameter. I 
also changed the debug log statement that I displayed right before 
the save() and I still get the same output. Here is the code that I 
use in the script:



xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with 
extra debug ...);

if (!save(location, p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}

xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Is there a better way to validate? I am not sure of what else to check.

Thanks

Nathaniel L Keeling

On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

Well, the logs shows that save() does not receive any flags as 
params...everything indicates that you do not have the params or 
you are using the wrong config file.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here is the output from the opensips log. I have also attached a 
snippet from the log file.


May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is
May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 0


May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 0


Thanks

Nathaniel L Keeling

On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See the attached patch - it logs more from the part where the 
params are handled .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here are snippets from my script. I only have one place where I 
execute the save function. Just wondering, could it be 
truncating a byte?


modparam(usrloc, nat_bflag, 10)
modparam(usrloc, use_domain, 1)
modparam(usrloc, db_mode, 3)
modparam(usrloc, db_url,

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-24 Thread Bogdan-Andrei Iancu
Hi Nathaniel,

Thanks for the help in troubleshooting this - I pushed the fix on repos
(GIT and SVN), so now there are official - remove the patch I sent you
and update from repo.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/24/2013 03:53 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 The change that you did is now causing things to work. I have attached
 a snippet of the log file and I have listed the output from the extra
 debug lines from your patch within the email:

 May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE
 SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug
 ...
 May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 10038f8a0
 May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug]
 DBG:registrar:save_aux: xXx - flags string is p0
 May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 20
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=
 .
 .
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=800
 May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 20
 May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug]
 DBG:registrar:pack_ci: xXx - saving path into usrloc
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=

 Thanks

 Nathaniel L Keeling

 On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 My test was just to see if your opensips hits the fixup function for
 the flags - and it seems it does (the value I gave you is bogus, so
 it ended up with error).

 Could you try this new patch (remove old one) ? (of course, put back
 the p0 param ).

 Thanks and regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-24 Thread Nathaniel L Keeling III

Hello Bogdan,

Thank you for all of your help! I have one other question for you. How 
does save() flag a request as being NAT'ed or which column within the 
location table is the setting saved? My register requests that are 
behind a NAT are not maintaining their connections. I have tried 
performing the nat ping but I do not see the pings going out with ngrep. 
I am flagging the request as being behind a NAT but I think they are not 
being flagged in the database for later detection for nathelper.


Thanks

Nathaniel

On 5/24/13 4:14 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

Thanks for the help in troubleshooting this - I pushed the fix on 
repos (GIT and SVN), so now there are official - remove the patch I 
sent you and update from repo.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/24/2013 03:53 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

The change that you did is now causing things to work. I have 
attached a snippet of the log file and I have listed the output from 
the extra debug lines from your patch within the email:


May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING 
THE SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug 
...
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is 10038f8a0
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
DBG:registrar:save_aux: xXx - flags string is p0
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 20
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=

.
.
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=800
May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 20
May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug] 
DBG:registrar:pack_ci: xXx - saving path into usrloc
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=


Thanks

Nathaniel L Keeling

On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for 
the flags - and it seems it does (the value I gave you is bogus, so 
it ended up with error).


Could you try this new patch (remove old one) ? (of course, put back 
the p0 param ).


Thanks and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-24 Thread Bogdan-Andrei Iancu
Hi Nathaniel,

The branch flags (used for NAT flag) are stored into the cflags in DB.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/24/2013 05:21 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Thank you for all of your help! I have one other question for you. How
 does save() flag a request as being NAT'ed or which column within the
 location table is the setting saved? My register requests that are
 behind a NAT are not maintaining their connections. I have tried
 performing the nat ping but I do not see the pings going out with
 ngrep. I am flagging the request as being behind a NAT but I think
 they are not being flagged in the database for later detection for
 nathelper.

 Thanks

 Nathaniel

 On 5/24/13 4:14 AM, Bogdan-Andrei Iancu wrote:
 Hi Nathaniel,

 Thanks for the help in troubleshooting this - I pushed the fix on
 repos (GIT and SVN), so now there are official - remove the patch I
 sent you and update from repo.

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/24/2013 03:53 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 The change that you did is now causing things to work. I have
 attached a snippet of the log file and I have listed the output from
 the extra debug lines from your patch within the email:

 May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING
 THE SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug
 ...
 May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 10038f8a0
 May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug]
 DBG:registrar:save_aux: xXx - flags string is p0
 May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 20
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=
 .
 .
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=800
 May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 20
 May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug]
 DBG:registrar:pack_ci: xXx - saving path into usrloc
 May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug]
 DBG:core:parse_headers: flags=

 Thanks

 Nathaniel L Keeling

 On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 My test was just to see if your opensips hits the fixup function
 for the flags - and it seems it does (the value I gave you is
 bogus, so it ended up with error).

 Could you try this new patch (remove old one) ? (of course, put
 back the p0 param ).

 Thanks and regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-23 Thread Bogdan-Andrei Iancu
Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for the
flags - and it seems it does (the value I gave you is bogus, so it ended
up with error).

Could you try this new patch (remove old one) ? (of course, put back the
p0 param ).

Thanks and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/23/2013 01:43 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I am using opensips v1.8.3. I was using v1.8.2 earlier but I upgraded
 thinking it might fix my issue. When I changed the script to the
 save(location, $((ff))) I get this config error when starting
 opensips:

 May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: pvar (inner_name)
 not found
 May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: wrong char [f/102]
 in [$((ff))] at [3 (2)]
 May 22 17:39:11 [14757] ERROR:core:fixup_spve: wrong format[$((ff))]
 May 22 17:39:11 [14757] ERROR:core:fix_actions: fixing failed
 (code=-1) at cfg line 767
 May 22 17:39:11 [14757] CRITICAL:core:fix_expr: fix_actions error
 May 22 17:39:11 [14757] ERROR:core:main: failed to fix configuration
 with err code -1

 Thanks

 Nathaniel L Keeling

 On 5/22/13 11:46 AM, Bogdan-Andrei Iancu wrote:
 Could you try : save(location,$((ff))) ?
 Do you get any error ?

 What is your opensips version ?

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/22/2013 05:49 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I have validated the script and that i am passing a parameter. I
 also changed the debug log statement that I displayed right before
 the save() and I still get the same output. Here is the code that I
 use in the script:


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with
 extra debug ...);
 if (!save(location, p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Is there a better way to validate? I am not sure of what else to check.

 Thanks

 Nathaniel L Keeling

 On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:
 Hi Nathaniel,

 Well, the logs shows that save() does not receive any flags as
 params...everything indicates that you do not have the params or
 you are using the wrong config file.

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here is the output from the opensips log. I have also attached a
 snippet from the log file.

 May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 
 May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 0

 May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 0

 Thanks

 Nathaniel L Keeling

 On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 See the attached patch - it logs more from the part where the
 params are handled .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here are snippets from my script. I only have one place where I
 execute the save function. Just wondering, could it be
 truncating a byte?

 modparam(usrloc, nat_bflag, 10)
 modparam(usrloc, use_domain, 1)
 modparam(usrloc, db_mode, 3)
 modparam(usrloc, db_url,
 postgres://opensips:opensip...@ama.akan.net/opensips181t)
 modparam(registrar, tcp_persistent_flag, 7)
 modparam(registrar, received_avp, $avp(received_nh))


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying
 to save Register's request location);
 sl_reply_error();
 }

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Thanks

 Nathaniel

 On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 That is odd.it's like you do not set the p1 flag 

 I tested and I with p1 flag I get:
 May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags
 are 10

 Are you sure your script gets to the right save() ??

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]:
 [ID 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags
 are 0. I have also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-23 Thread Nathaniel L Keeling III

Hello Bogdan,

The change that you did is now causing things to work. I have attached a 
snippet of the log file and I have listed the output from the extra 
debug lines from your patch within the email:


May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE 
SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug 
...
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is 10038f8a0
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
DBG:registrar:save_aux: xXx - flags string is p0
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 20
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=

.
.
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=800
May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 20
May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug] 
DBG:registrar:pack_ci: xXx - saving path into usrloc
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=


Thanks

Nathaniel L Keeling

On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for 
the flags - and it seems it does (the value I gave you is bogus, so it 
ended up with error).


Could you try this new patch (remove old one) ? (of course, put back 
the p0 param ).


Thanks and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww21340\viewh14540\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug ...\
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags param is 10038f8a0
\b0  \
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags string is p0
\b0  \
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags bitmask is 20 
\b0 \
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] DBG:core:parse_headers: flags=\
May 23 09:31:28   OpenSips[23458]: [ID 421386 local1.debug] DBG:core:parse_uri: parsed uri:\
May 23 09:31:28type=1 user=nkeeling(8)\
May 23 09:31:28passwd=(0)\
May 23 09:31:28host=akanvoice.com(13)\
May 23 09:31:28port=(0): 0\
May 23 09:31:28params=(0)\
May 23 09:31:28headers=(0)\
May 23 09:31:28   OpenSips[23458]: [ID 883594 local1.debug] DBG:core:parse_uri:  uri params:\
May 23 09:31:28  transport=, val=, proto=0\
May 23 09:31:28   OpenSips[23458]: [ID 996803 local1.debug] DBG:core:parse_uri:user-param=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 784403 local1.debug] DBG:core:parse_uri:method=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 185236 local1.debug] DBG:core:parse_uri:ttl=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 628781 local1.debug] DBG:core:parse_uri:maddr=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 949013 local1.debug] DBG:core:parse_uri:lr=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 595631 local1.debug] DBG:core:parse_uri:r2=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 323951 local1.debug] DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 8 chars, out: 8 chars\
May 23 09:31:28   OpenSips[23458]: [ID 323951 local1.debug] DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 13 chars, out: 13 chars\
May 23 09:31:28   OpenSips[23458]: [ID 181770 local1.debug] DBG:db_postgres:db_postgres_submit_query: 100391220 PQsendQuery(select contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance from location where username='nkeeling' AND domain='akanvoice.com' order by q)\
May 23 09:31:28   OpenSips[23458]: [ID 529718 local1.debug] DBG:core:db_new_result: allocate 48 bytes for result set at 1003960d0\
May 23 09:31:28   OpenSips[23458]: [ID 911073 local1.debug] DBG:db_postgres:db_postgres_store_result: 100391220 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(100782900)\
May 23 09:31:28   OpenSips[23458]: [ID 460951 local1.debug] DBG:db_postgres:db_postgres_get_columns: 14 columns returned from the query\
May 23 09:31:28   OpenSips[23458]: [ID 586195 local1.debug] DBG:core:db_allocate_columns: allocate 392 bytes for result columns at 100396358\
May 23 09:31:28   OpenSips[23458]: [ID 412218 local1.debug] DBG:db_postgres:db_postgres_get_columns: 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-22 Thread Bogdan-Andrei Iancu
Hi Nathaniel,

Well, the logs shows that save() does not receive any flags as
params...everything indicates that you do not have the params or you are
using the wrong config file.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here is the output from the opensips log. I have also attached a
 snippet from the log file.

 May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 
 May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 0

 May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 0

 Thanks

 Nathaniel L Keeling

 On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 See the attached patch - it logs more from the part where the params
 are handled .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here are snippets from my script. I only have one place where I
 execute the save function. Just wondering, could it be truncating a
 byte?

 modparam(usrloc, nat_bflag, 10)
 modparam(usrloc, use_domain, 1)
 modparam(usrloc, db_mode, 3)
 modparam(usrloc, db_url,
 postgres://opensips:opensip...@ama.akan.net/opensips181t)
 modparam(registrar, tcp_persistent_flag, 7)
 modparam(registrar, received_avp, $avp(received_nh))


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Thanks

 Nathaniel

 On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 That is odd.it's like you do not set the p1 flag 

 I tested and I with p1 flag I get:
 May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

 Are you sure your script gets to the right save() ??

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]: [ID
 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I
 have also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 Attached is an extended patch - remove the old one and apply this
 one. Again look for any xXx logs .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 here is the output from opensips's og file of the save() with
 the patch and the code snippet from the opensips.cfg. I did not
 see any ant logs with xXx. Also,I have usrloc's db_mode set to 3.

 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying
 to save Register's request location);
 sl_reply_error();
 }
 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit; 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-22 Thread Nathaniel L Keeling III

Hello Bogdan,

I have validated the script and that i am passing a parameter. I also 
changed the debug log statement that I displayed right before the save() 
and I still get the same output. Here is the code that I use in the script:



xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with 
extra debug ...);

if (!save(location, p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to save 
Register's request location);

sl_reply_error();
}

xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Is there a better way to validate? I am not sure of what else to check.

Thanks

Nathaniel L Keeling

On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

Well, the logs shows that save() does not receive any flags as 
params...everything indicates that you do not have the params or you 
are using the wrong config file.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here is the output from the opensips log. I have also attached a 
snippet from the log file.


May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is
May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 0


May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 0


Thanks

Nathaniel L Keeling

On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See the attached patch - it logs more from the part where the params 
are handled .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here are snippets from my script. I only have one place where I 
execute the save function. Just wondering, could it be truncating a 
byte?


modparam(usrloc, nat_bflag, 10)
modparam(usrloc, use_domain, 1)
modparam(usrloc, db_mode, 3)
modparam(usrloc, db_url,
postgres://opensips:opensip...@ama.akan.net/opensips181t)
modparam(registrar, tcp_persistent_flag, 7)
modparam(registrar, received_avp, $avp(received_nh))


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}

xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Thanks

Nathaniel

On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

That is odd.it's like you do not set the p1 flag 

I tested and I with p1 flag I get:
May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

Are you sure your script gets to the right save() ??

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I added the patch and here is what I found: OpenSips[4378]: [ID 
269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I 
have also included the log file.


Thanks

Nathaniel Keeling

On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

Attached is an extended patch - remove the old one and apply 
this one. Again look for any xXx logs .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

here is the output from opensips's og file of the save() with 
the patch and the code snippet from the opensips.cfg. I did not 
see any ant logs with xXx. Also,I have usrloc's db_mode set to 3.


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying 
to save Register's request location);

sl_reply_error();
}
xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber 
has successfully registered with Akan Voice);
exit; 



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-22 Thread Bogdan-Andrei Iancu
Could you try : save(location,$((ff))) ?
Do you get any error ?

What is your opensips version ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/22/2013 05:49 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I have validated the script and that i am passing a parameter. I also
 changed the debug log statement that I displayed right before the
 save() and I still get the same output. Here is the code that I use in
 the script:


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with
 extra debug ...);
 if (!save(location, p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Is there a better way to validate? I am not sure of what else to check.

 Thanks

 Nathaniel L Keeling

 On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:
 Hi Nathaniel,

 Well, the logs shows that save() does not receive any flags as
 params...everything indicates that you do not have the params or you
 are using the wrong config file.

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here is the output from the opensips log. I have also attached a
 snippet from the log file.

 May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 
 May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 0

 May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 0

 Thanks

 Nathaniel L Keeling

 On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 See the attached patch - it logs more from the part where the
 params are handled .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here are snippets from my script. I only have one place where I
 execute the save function. Just wondering, could it be truncating
 a byte?

 modparam(usrloc, nat_bflag, 10)
 modparam(usrloc, use_domain, 1)
 modparam(usrloc, db_mode, 3)
 modparam(usrloc, db_url,
 postgres://opensips:opensip...@ama.akan.net/opensips181t)
 modparam(registrar, tcp_persistent_flag, 7)
 modparam(registrar, received_avp, $avp(received_nh))


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Thanks

 Nathaniel

 On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 That is odd.it's like you do not set the p1 flag 

 I tested and I with p1 flag I get:
 May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

 Are you sure your script gets to the right save() ??

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]: [ID
 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0.
 I have also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 Attached is an extended patch - remove the old one and apply
 this one. Again look for any xXx logs .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 here is the output from opensips's og file of the save() with
 the patch and the code snippet from the opensips.cfg. I did
 not see any ant logs with xXx. Also,I have usrloc's db_mode
 set to 3.

 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error
 trying to save Register's request location);
 sl_reply_error();
 }
 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber
 has successfully registered with Akan Voice);
 exit; 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-22 Thread Nathaniel L Keeling III

Hello Bogdan,

I am using opensips v1.8.3. I was using v1.8.2 earlier but I upgraded 
thinking it might fix my issue. When I changed the script to the 
save(location, $((ff))) I get this config error when starting opensips:


May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: pvar (inner_name) 
not found
May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: wrong char [f/102] in 
[$((ff))] at [3 (2)]

May 22 17:39:11 [14757] ERROR:core:fixup_spve: wrong format[$((ff))]
May 22 17:39:11 [14757] ERROR:core:fix_actions: fixing failed (code=-1) 
at cfg line 767

May 22 17:39:11 [14757] CRITICAL:core:fix_expr: fix_actions error
May 22 17:39:11 [14757] ERROR:core:main: failed to fix configuration 
with err code -1


Thanks

Nathaniel L Keeling

On 5/22/13 11:46 AM, Bogdan-Andrei Iancu wrote:

Could you try : save(location,$((ff))) ?
Do you get any error ?

What is your opensips version ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/22/2013 05:49 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I have validated the script and that i am passing a parameter. I also 
changed the debug log statement that I displayed right before the 
save() and I still get the same output. Here is the code that I use 
in the script:



xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with 
extra debug ...);

if (!save(location, p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}

xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Is there a better way to validate? I am not sure of what else to check.

Thanks

Nathaniel L Keeling

On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

Well, the logs shows that save() does not receive any flags as 
params...everything indicates that you do not have the params or you 
are using the wrong config file.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here is the output from the opensips log. I have also attached a 
snippet from the log file.


May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is
May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 0


May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 0


Thanks

Nathaniel L Keeling

On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See the attached patch - it logs more from the part where the 
params are handled .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here are snippets from my script. I only have one place where I 
execute the save function. Just wondering, could it be truncating 
a byte?


modparam(usrloc, nat_bflag, 10)
modparam(usrloc, use_domain, 1)
modparam(usrloc, db_mode, 3)
modparam(usrloc, db_url,
postgres://opensips:opensip...@ama.akan.net/opensips181t)
modparam(registrar, tcp_persistent_flag, 7)
modparam(registrar, received_avp, $avp(received_nh))


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying 
to save Register's request location);

sl_reply_error();
}

xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Thanks

Nathaniel

On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

That is odd.it's like you do not set the p1 flag 

I tested and I with p1 flag I get:
May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

Are you sure your script gets to the right save() ??

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I added the patch and here is what I found: OpenSips[4378]: 
[ID 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 
0. I have also included the log file.


Thanks

Nathaniel Keeling

On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

Attached is an extended patch - remove the old one and apply 
this one. Again look for any xXx logs .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

here is the output from opensips's og file of the save() with 
the patch and the code snippet from the opensips.cfg. I did 
not see any ant logs with xXx. Also,I have usrloc's db_mode 
set to 3.


xlog(SAVING THE SUBSCRIBER INTO 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-21 Thread Nathaniel L Keeling III

Hello Bogdan,

Here is the output from the opensips log. I have also attached a snippet 
from the log file.


May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is
May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 0


May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 0


Thanks

Nathaniel L Keeling

On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See the attached patch - it logs more from the part where the params 
are handled .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

Here are snippets from my script. I only have one place where I 
execute the save function. Just wondering, could it be truncating a byte?


modparam(usrloc, nat_bflag, 10)
modparam(usrloc, use_domain, 1)
modparam(usrloc, db_mode, 3)
modparam(usrloc, db_url,
postgres://opensips:opensip...@ama.akan.net/opensips181t)
modparam(registrar, tcp_persistent_flag, 7)
modparam(registrar, received_avp, $avp(received_nh))


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}

xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Thanks

Nathaniel

On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

That is odd.it's like you do not set the p1 flag 

I tested and I with p1 flag I get:
May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

Are you sure your script gets to the right save() ??

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I added the patch and here is what I found: OpenSips[4378]: [ID 
269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I 
have also included the log file.


Thanks

Nathaniel Keeling

On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

Attached is an extended patch - remove the old one and apply this 
one. Again look for any xXx logs .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

here is the output from opensips's og file of the save() with the 
patch and the code snippet from the opensips.cfg. I did not see 
any ant logs with xXx. Also,I have usrloc's db_mode set to 3.


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying 
to save Register's request location);

sl_reply_error();
}
xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);
exit; 



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


May 21 23:39:15   OpenSips[14397]: [ID 197553 local1.error] SAVING THE 
SUBSCRIBER INTO THE LOCATION TABLE 

May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is  
May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 0 
May 21 23:39:15   OpenSips[14397]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=
May 21 23:39:15   OpenSips[14397]: [ID 421386 local1.debug] DBG:core:parse_uri: 
parsed uri:
May 21 23:39:15type=1 user=nkeeling(8)
May 21 23:39:15passwd=(0)
May 21 23:39:15host=akanvoice.com(13)
May 21 23:39:15port=(0): 0
May 21 23:39:15params=(0)
May 21 23:39:15headers=(0)
May 21 23:39:15   OpenSips[14397]: [ID 883594 local1.debug] DBG:core:parse_uri: 
 uri params:
May 21 23:39:15  transport=, val=, proto=0
May 21 23:39:15   OpenSips[14397]: [ID 996803 local1.debug] DBG:core:parse_uri: 
   user-param=, val=
May 21 23:39:15   OpenSips[14397]: [ID 784403 local1.debug] DBG:core:parse_uri: 
   method=, val=
May 21 23:39:15   OpenSips[14397]: [ID 185236 local1.debug] DBG:core:parse_uri: 
   ttl=, val=
May 21 23:39:15   OpenSips[14397]: [ID 628781 local1.debug] DBG:core:parse_uri: 
   maddr=, val=
May 21 23:39:15   OpenSips[14397]: 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-20 Thread Bogdan-Andrei Iancu
Hello Nathaniel,

See the attached patch - it logs more from the part where the params are
handled .

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here are snippets from my script. I only have one place where I
 execute the save function. Just wondering, could it be truncating a byte?

 modparam(usrloc, nat_bflag, 10)
 modparam(usrloc, use_domain, 1)
 modparam(usrloc, db_mode, 3)
 modparam(usrloc, db_url,
 postgres://opensips:opensip...@ama.akan.net/opensips181t)
 modparam(registrar, tcp_persistent_flag, 7)
 modparam(registrar, received_avp, $avp(received_nh))


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Thanks

 Nathaniel

 On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 That is odd.it's like you do not set the p1 flag 

 I tested and I with p1 flag I get:
 May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

 Are you sure your script gets to the right save() ??

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]: [ID
 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I
 have also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 Attached is an extended patch - remove the old one and apply this
 one. Again look for any xXx logs .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 here is the output from opensips's og file of the save() with the
 patch and the code snippet from the opensips.cfg. I did not see
 any ant logs with xXx. Also,I have usrloc's db_mode set to 3.

 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }
 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit; 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Index: modules/registrar/save.c
===
--- modules/registrar/save.c	(revision 10023)
+++ modules/registrar/save.c	(working copy)
@@ -247,11 +247,14 @@
 		}
 
 		/* extract Path headers */
+		LM_DBG(xXx - flags are %X \n,_flags);
 		if ( _flagsREG_SAVE_PATH_FLAG ) {
+			LM_DBG(xXx - saving path into usrloc \n);
 			if (build_path_vector(_m, path, path_received, _flags)  0) {
 rerrno = R_PARSE_PATH;
 goto error;
 			}
+			LM_DBG(xXx - path is %.*s(%d)\n,path.len,path.s,path.len);
 			if (path.len  path.s) {
 ci.path = path;
 /* save in msg too for reply */
@@ -749,11 +752,13 @@
 	sctx.max_contacts = -1;
 
 	sctx.flags = 0;
+	LM_DBG(xXx - flags param is %s \n,_f);
 	if (_f  _f[0]!=0) {
 		if (fixup_get_svalue( _m, (gparam_p)_f, flags_s)!=0) {
 			LM_ERR(invalid flags parameter);
 			return -1;
 		}
+		LM_DBG(xXx - flags string is %.*s \n,flags_s.len,flags_s.s);
 		for( st=0 ; st flags_s.len ; st++ ) {
 			switch (flags_s.s[st]) {
 case 'm': sctx.flags |= REG_SAVE_MEMORY_FLAG; break;
@@ -799,6 +804,7 @@
 			}
 		}
 	}
+	LM_DBG(xXx - flags bitmask is %X \n,sctx.flags);
 	if(route_type == ONREPLY_ROUTE)
 		sctx.flags |= REG_SAVE_NOREPLY_FLAG;
 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-18 Thread Nathaniel L Keeling III

Hello Bogdan,

Here are snippets from my script. I only have one place where I execute 
the save function. Just wondering, could it be truncating a byte?


modparam(usrloc, nat_bflag, 10)
modparam(usrloc, use_domain, 1)
modparam(usrloc, db_mode, 3)
modparam(usrloc, db_url,
postgres://opensips:opensip...@ama.akan.net/opensips181t)
modparam(registrar, tcp_persistent_flag, 7)
modparam(registrar, received_avp, $avp(received_nh))


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to save 
Register's request location);

sl_reply_error();
}

xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;

Thanks

Nathaniel

On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

That is odd.it's like you do not set the p1 flag 

I tested and I with p1 flag I get:
May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

Are you sure your script gets to the right save() ??

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:

Hello Bogdan,

I added the patch and here is what I found: OpenSips[4378]: [ID 
269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I 
have also included the log file.


Thanks

Nathaniel Keeling

On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

Attached is an extended patch - remove the old one and apply this 
one. Again look for any xXx logs .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

here is the output from opensips's og file of the save() with the 
patch and the code snippet from the opensips.cfg. I did not see any 
ant logs with xXx. Also,I have usrloc's db_mode set to 3.


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}
xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);
exit; 



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-17 Thread Nathaniel L Keeling III

Hello Bogdan,

I added the patch and here is what I found: OpenSips[4378]: [ID 269964 
local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I have also 
included the log file.


Thanks

Nathaniel Keeling

On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

Attached is an extended patch - remove the old one and apply this one. 
Again look for any xXx logs .


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:

Hello Bogdan,

here is the output from opensips's og file of the save() with the 
patch and the code snippet from the opensips.cfg. I did not see any 
ant logs with xXx. Also,I have usrloc's db_mode set to 3.


xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to 
save Register's request location);

sl_reply_error();
}
xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);
exit; 


May 16 23:35:53   OpenSips[4378]: [ID 292666 local1.debug] DBG:core:parse_msg: 
SIP Request:
May 16 23:35:53   OpenSips[4378]: [ID 776402 local1.debug] DBG:core:parse_msg:  
method:  REGISTER
May 16 23:35:53   OpenSips[4378]: [ID 700387 local1.debug] DBG:core:parse_msg:  
uri: sip:akanvoice.com
May 16 23:35:53   OpenSips[4378]: [ID 641661 local1.debug] DBG:core:parse_msg:  
version: SIP/2.0
May 16 23:35:53   OpenSips[4378]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=2
May 16 23:35:53   OpenSips[4378]: [ID 202288 local1.debug] 
DBG:core:parse_via_param: found param type 232, branch = z9hG4bK69354; 
state=16
May 16 23:35:53   OpenSips[4378]: [ID 218084 local1.debug] DBG:core:parse_via: 
end of header reached, state=5
May 16 23:35:53   OpenSips[4378]: [ID 636936 local1.debug] 
DBG:core:parse_headers: via found, flags=2
May 16 23:35:53   OpenSips[4378]: [ID 481110 local1.debug] 
DBG:core:parse_headers: this is the first via
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 1, name=Via, body=SIP/2.0/UDP 
209.252.110.38:5060;branch=z9hG4bK69354
May 16 23:35:53   OpenSips[4378]: [ID 499462 local1.debug] DBG:core:parse_msg:  
first  via: SIP/2.0/UDP 209.252.110.38:5060(5060)
May 16 23:35:53   OpenSips[4378]: [ID 573780 local1.debug] DBG:core:parse_msg: 
;branch=z9hG4bK69354
May 16 23:35:53   OpenSips[4378]: [ID 937246 local1.debug] DBG:core:parse_msg: 
May 16 23:35:53   OpenSips[4378]: [ID 979351 local1.debug] DBG:core:parse_msg: 
exiting
May 16 23:35:53   OpenSips[4378]: [ID 911547 local1.debug] 
DBG:core:receive_msg: After parse_msg...
May 16 23:35:53   OpenSips[4378]: [ID 451678 local1.debug] 
DBG:core:receive_msg: preparing to run routing scripts...
May 16 23:35:53   OpenSips[4378]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=40
May 16 23:35:53   OpenSips[4378]: [ID 202288 local1.debug] 
DBG:core:parse_via_param: found param type 234, received = 208.54.44.253; 
state=6
May 16 23:35:53   OpenSips[4378]: [ID 202288 local1.debug] 
DBG:core:parse_via_param: found param type 235, rport = 44494; state=6
May 16 23:35:53   OpenSips[4378]: [ID 202288 local1.debug] 
DBG:core:parse_via_param: found param type 232, branch = z9hG4bK69354; 
state=16
May 16 23:35:53   OpenSips[4378]: [ID 218084 local1.debug] DBG:core:parse_via: 
end of header reached, state=5
May 16 23:35:53   OpenSips[4378]: [ID 636936 local1.debug] 
DBG:core:parse_headers: via found, flags=40
May 16 23:35:53   OpenSips[4378]: [ID 903840 local1.debug] 
DBG:core:parse_headers: parse_headers: this is the second via
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 1, name=Via, body=SIP/2.0/UDP 
100.229.65.174:43669;received=208.54.44.253;rport=44494;branch=z9hG4bK69354
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 8, name=Max-Forwards, body=30
May 16 23:35:53   OpenSips[4378]: [ID 218084 local1.debug] DBG:core:parse_to: 
end of header reached, state=10
May 16 23:35:53   OpenSips[4378]: [ID 841317 local1.debug] DBG:core:parse_to: 
display={}, ruri={sip:nkeel...@akanvoice.com}
May 16 23:35:53   OpenSips[4378]: [ID 993225 local1.debug] 
DBG:core:get_hdr_field: To [30]; uri=[sip:nkeel...@akanvoice.com] 
May 16 23:35:53   OpenSips[4378]: [ID 159376 local1.debug] 
DBG:core:get_hdr_field: to body [sip:nkeel...@akanvoice.com^M
May 16 23:35:53   ]
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 3, name=To, 
body=sip:nkeel...@akanvoice.com
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 4, name=From, 
body=sip:nkeel...@akanvoice.com;tag=z9hG4bK97036383
May 16 23:35:53   OpenSips[4378]: [ID 994387 local1.debug] 
DBG:core:parse_headers: header field type 6, 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-17 Thread Bogdan-Andrei Iancu
Hello Nathaniel,

That is odd.it's like you do not set the p1 flag 

I tested and I with p1 flag I get:
May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10

Are you sure your script gets to the right save() ??

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]: [ID
 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0. I have
 also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 Attached is an extended patch - remove the old one and apply this
 one. Again look for any xXx logs .

 Regards,
 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com

 On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 here is the output from opensips's og file of the save() with the
 patch and the code snippet from the opensips.cfg. I did not see any
 ant logs with xXx. Also,I have usrloc's db_mode set to 3.

 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }
 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit; 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-16 Thread Bogdan-Andrei Iancu
Hello Nathaniel,

Attached is an extended patch - remove the old one and apply this one.
Again look for any xXx logs .

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 here is the output from opensips's og file of the save() with the
 patch and the code snippet from the opensips.cfg. I did not see any
 ant logs with xXx. Also,I have usrloc's db_mode set to 3.

 ##
 # Try to save the Register's requests location information
 ##

 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 ##
 # Subscriber's register request was successfully authenticated
 # and saved
 ##

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;


 Thanks

 Nathaniel


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Index: modules/registrar/save.c
===
--- modules/registrar/save.c	(revision 10023)
+++ modules/registrar/save.c	(working copy)
@@ -247,11 +247,14 @@
 		}
 
 		/* extract Path headers */
+		LM_DBG(xXx - flags are %X \n,_flags);
 		if ( _flagsREG_SAVE_PATH_FLAG ) {
+			LM_DBG(xXx - saving path into usrloc \n);
 			if (build_path_vector(_m, path, path_received, _flags)  0) {
 rerrno = R_PARSE_PATH;
 goto error;
 			}
+			LM_DBG(xXx - path is %.*s(%d)\n,path.len,path.s,path.len);
 			if (path.len  path.s) {
 ci.path = path;
 /* save in msg too for reply */
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-14 Thread Nathaniel L Keeling III

Hello Bogdan,

here is the output from opensips's og file of the save() with the patch 
and the code snippet from the opensips.cfg. I did not see any ant logs 
with xXx. Also,I have usrloc's db_mode set to 3.


##
# Try to save the Register's requests location information
##

xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
);

if (!save(location,p1))
{
xlog(L_ERR, ERR:callerid:$ci|end|System error trying to save 
Register's request location);

sl_reply_error();
}

##
# Subscriber's register request was successfully authenticated
# and saved
##

xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice);

exit;


Thanks

Nathaniel
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 292666 
local1.debug] DBG:core:parse_msg: SIP Request:
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 776402 
local1.debug] DBG:core:parse_msg:  method:  REGISTER
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 700387 
local1.debug] DBG:core:parse_msg:  uri: sip:akanvoice.com
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 641661 
local1.debug] DBG:core:parse_msg:  version: SIP/2.0
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 497291 
local1.debug] DBG:core:parse_headers: flags=2
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 232, branch = 
z9hG4bK86136; state=16
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_via: end of header reached, state=5
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 636936 
local1.debug] DBG:core:parse_headers: via found, flags=2
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 481110 
local1.debug] DBG:core:parse_headers: this is the first via
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 1, name=Via, 
body=SIP/2.0/UDP 209.252.110.38:5060;branch=z9hG4bK86136
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 499462 
local1.debug] DBG:core:parse_msg:  first  via: SIP/2.0/UDP 
209.252.110.38:5060(5060)
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 573780 
local1.debug] DBG:core:parse_msg: ;branch=z9hG4bK86136
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 937246 
local1.debug] DBG:core:parse_msg: 
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 979351 
local1.debug] DBG:core:parse_msg: exiting
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 911547 
local1.debug] DBG:core:receive_msg: After parse_msg...
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 451678 
local1.debug] DBG:core:receive_msg: preparing to run routing scripts...
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 497291 
local1.debug] DBG:core:parse_headers: flags=40
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 234, received = 
208.54.44.246; state=6
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 235, rport = 
12985; state=6
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 232, branch = 
z9hG4bK86136; state=16
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_via: end of header reached, state=5
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 636936 
local1.debug] DBG:core:parse_headers: via found, flags=40
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 903840 
local1.debug] DBG:core:parse_headers: parse_headers: this is the second via
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 1, name=Via, 
body=SIP/2.0/UDP 
100.228.59.127:56530;received=208.54.44.246;rport=12985;branch=z9hG4bK86136
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 8, name=Max-Forwards, 
body=30
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_to: end of header reached, state=10
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 841317 
local1.debug] DBG:core:parse_to: display={}, ruri={sip:nkeel...@akanvoice.com}
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 993225 
local1.debug] DBG:core:get_hdr_field: To [30]; 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-09 Thread Bogdan-Andrei Iancu
Hi Nathaniel,

Could you please apply the attached patch to the registrar opensips - it
contains some more debugs in regards to saving the path array.

Check if during the save(location,p1) you get ant logs with xXx
and post them here.

What db_mode are you using for usrloc ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/05/2013 07:49 PM, Nathaniel L Keeling III wrote:
 Hello,

 On P1, I am using the add_path_received() function which is adding the
 Path header. Actually, it adds 2 Path headers since the request comes
 in using TCP but is forwarded using UDP. On the REGISTER, I use the
 save(location,p0) function but the path header is not saved in the
 PATH column of the location table. I have attached a snippet from the
 REGISTER's log and it looks like the insert into the table in placing
 NULL even though the PATH headers were successfully parsed earlier.
 Also, will the lookup() function use this column to locate the
 subscriber for an INVITE request?

 Thanks

 Nathaniel


 On 5/5/13 5:55 AM, Bogdan-Andrei Iancu wrote:
 The registrar server will store the PATH hdr in the PATH column of
 the location table.

 If P1 adds a PATH hdr to a REGISTER that is saved on REGISTRAR via
 save(location, p0) .

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com


 On 05/04/2013 08:11 PM, Nathaniel L Keeling III wrote:
 I am currently using version 1.8.2 of opensips. I am using this code
 on the registrar server, save(location,p0v), when the user is
 authenticated. The user is behind a firewall. The register request
 is first sent to the sip proxy which forwards it to the registrar
 server. The sip proxy adds the Path header with the source IP/Port
 of the Register request. From the documentation it sounds like the
 save() function should take the received parameter from the Path
 header and store it in the received column of the location table.
 When I look at the location table it contains the IP address and
 port of the SIP proxy so when I try to locate the user, they are
 being sent to the SIP proxy and the call fails. Is my understanding
 correct? What is the best approach for this, UAC -- firewall --
 P1  -- REG.

 Thanks

 Nathaniel

 On 5/4/13 4:26 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 See
 http://www.opensips.org/html/docs/modules/1.9.x/registrar.html#id248705
 - this controls the PATH support in REGISTRAR module.

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developer
 http://www.opensips-solutions.com


 On 05/04/2013 01:31 AM, Nathaniel L Keeling III wrote:
 Hello,

 I sent an earlier post concerning NATed registrations not being
 able to locate from the lookup() function when the registration
 request is sent from a opensips proxy server to an opensips
 registration server and from my research it looks like I should be
 using the Path header with the received parameter set. Doing this,
 the Register request is sent to the registrar proxy server with a
 Path header, the user is successfully authorized and saved in the
 location table but when I look at the location table entry, the
 received column either does not contain a value or it contains the
 wrong value. Here is the Register request sent from the proxy to
 the registrar server and the output from the location table.

 REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0.
 Call-ID: 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0.
 CSeq: 2 REGISTER.
 From: Nathaniel L Keeling III
 sip:nkeeli...@mydomain2.com;tag=cbe17bd3.
 To: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com.
 Max-Forwards: 68.
 User-Agent: Jitsi2.0.4506.10553Mac OS X.
 Expires: 600.
 Contact: Nathaniel L Keeling III
 sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com;expires=600.
 Via: SIP/2.0/UDP
 xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04.
 Via: SIP/2.0/TCP
 192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1.
 Authorization: Digest
 username=nkeeling3,realm=mydomain2.com,nonce=5184345b003b08c40d29a091fb53e6cb83c3961c1dbb,uri=sip:my-sip-domain.com;transport=tcp,response=987edb51f504ff56c7ba840d594c4bb1.
 Content-Length: 0.
 Path:
 sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp.
 Path: sip:xxx.xxx.110.38;transport=tcp;r2=on;lr.


   id  | username  |domain |
 contact | received |
 path |   expires   | q | callid  |
 cseq | last_modified| flags | cflags | user_agent |
 socket  | methods | sip_instance
 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-05 Thread Bogdan-Andrei Iancu
The registrar server will store the PATH hdr in the PATH column of the 
location table.


If P1 adds a PATH hdr to a REGISTER that is saved on REGISTRAR via 
save(location, p0) .


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/04/2013 08:11 PM, Nathaniel L Keeling III wrote:
I am currently using version 1.8.2 of opensips. I am using this code 
on the registrar server, save(location,p0v), when the user is 
authenticated. The user is behind a firewall. The register request is 
first sent to the sip proxy which forwards it to the registrar server. 
The sip proxy adds the Path header with the source IP/Port of the 
Register request. From the documentation it sounds like the save() 
function should take the received parameter from the Path header and 
store it in the received column of the location table. When I look 
at the location table it contains the IP address and port of the SIP 
proxy so when I try to locate the user, they are being sent to the SIP 
proxy and the call fails. Is my understanding correct? What is the 
best approach for this, UAC -- firewall -- P1  -- REG.


Thanks

Nathaniel

On 5/4/13 4:26 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See 
http://www.opensips.org/html/docs/modules/1.9.x/registrar.html#id248705 
- this controls the PATH support in REGISTRAR module.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/04/2013 01:31 AM, Nathaniel L Keeling III wrote:

Hello,

I sent an earlier post concerning NATed registrations not being able 
to locate from the lookup() function when the registration request 
is sent from a opensips proxy server to an opensips registration 
server and from my research it looks like I should be using the Path 
header with the received parameter set. Doing this, the Register 
request is sent to the registrar proxy server with a Path header, 
the user is successfully authorized and saved in the location table 
but when I look at the location table entry, the received column 
either does not contain a value or it contains the wrong value. Here 
is the Register request sent from the proxy to the registrar server 
and the output from the location table.


REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0.
Call-ID: 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0.
CSeq: 2 REGISTER.
From: Nathaniel L Keeling III 
sip:nkeeli...@mydomain2.com;tag=cbe17bd3.

To: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com.
Max-Forwards: 68.
User-Agent: Jitsi2.0.4506.10553Mac OS X.
Expires: 600.
Contact: Nathaniel L Keeling III 
sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com;expires=600.
Via: SIP/2.0/UDP 
xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04.
Via: SIP/2.0/TCP 
192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1.
Authorization: Digest 
username=nkeeling3,realm=mydomain2.com,nonce=5184345b003b08c40d29a091fb53e6cb83c3961c1dbb,uri=sip:my-sip-domain.com;transport=tcp,response=987edb51f504ff56c7ba840d594c4bb1.

Content-Length: 0.
Path: 
sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp.

Path: sip:xxx.xxx.110.38;transport=tcp;r2=on;lr.


  id  | username  |domain | 
contact | received | 
path |   expires   | q | callid  | cseq 
| last_modified| flags | cflags | user_agent | 
socket  | methods | sip_instance
--+---+---++-+--+-++--+--+-+---++-+-+-+-- 

 1555 | nkeeling3 | mydomain2.com | 
sip:nkeeling3@192.168.43.237:65420;transport=tcp;registering_acc=mydomain2_com 
| sip:xxx.xxx.110.38:5060 |  | 2013-05-03 17:08:03  | -1 | 
869321ee55e10970ff139673909ab626@0:0:0:0:0:0:0:0 |   10 | 2013-05-03 
16:58:03 | 0 |   1024 | Jitsi2.0.4506.10553Mac OS X | 
udp:xxx.xxx.110.48:5060 | |
 1556 | nkeeling3 | mydomain2.com | 
sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com 
| sip:xxx.xxx.110.38:5060 |  | 2013-05-03 17:13:42  | -1 | 
541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0 |2 | 2013-05-03 
17:03:42 | 0 |   1024 | Jitsi2.0.4506.10553Mac OS X | 
udp:xxx.xxx.110.48:5060 | |



Thanks

Nathaniel



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-05 Thread Nathaniel L Keeling III

Hello,

On P1, I am using the add_path_received() function which is adding the 
Path header. Actually, it adds 2 Path headers since the request comes in 
using TCP but is forwarded using UDP. On the REGISTER, I use the 
save(location,p0) function but the path header is not saved in the 
PATH column of the location table. I have attached a snippet from the 
REGISTER's log and it looks like the insert into the table in placing 
NULL even though the PATH headers were successfully parsed earlier. 
Also, will the lookup() function use this column to locate the 
subscriber for an INVITE request?


Thanks

Nathaniel


On 5/5/13 5:55 AM, Bogdan-Andrei Iancu wrote:
The registrar server will store the PATH hdr in the PATH column of the 
location table.


If P1 adds a PATH hdr to a REGISTER that is saved on REGISTRAR via 
save(location, p0) .


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/04/2013 08:11 PM, Nathaniel L Keeling III wrote:
I am currently using version 1.8.2 of opensips. I am using this code 
on the registrar server, save(location,p0v), when the user is 
authenticated. The user is behind a firewall. The register request is 
first sent to the sip proxy which forwards it to the registrar 
server. The sip proxy adds the Path header with the source IP/Port of 
the Register request. From the documentation it sounds like the 
save() function should take the received parameter from the Path 
header and store it in the received column of the location table. 
When I look at the location table it contains the IP address and port 
of the SIP proxy so when I try to locate the user, they are being 
sent to the SIP proxy and the call fails. Is my understanding 
correct? What is the best approach for this, UAC -- firewall -- P1  
-- REG.


Thanks

Nathaniel

On 5/4/13 4:26 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See 
http://www.opensips.org/html/docs/modules/1.9.x/registrar.html#id248705 
- this controls the PATH support in REGISTRAR module.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/04/2013 01:31 AM, Nathaniel L Keeling III wrote:

Hello,

I sent an earlier post concerning NATed registrations not being 
able to locate from the lookup() function when the registration 
request is sent from a opensips proxy server to an opensips 
registration server and from my research it looks like I should be 
using the Path header with the received parameter set. Doing this, 
the Register request is sent to the registrar proxy server with a 
Path header, the user is successfully authorized and saved in the 
location table but when I look at the location table entry, the 
received column either does not contain a value or it contains the 
wrong value. Here is the Register request sent from the proxy to 
the registrar server and the output from the location table.


REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0.
Call-ID: 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0.
CSeq: 2 REGISTER.
From: Nathaniel L Keeling III 
sip:nkeeli...@mydomain2.com;tag=cbe17bd3.

To: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com.
Max-Forwards: 68.
User-Agent: Jitsi2.0.4506.10553Mac OS X.
Expires: 600.
Contact: Nathaniel L Keeling III 
sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com;expires=600.
Via: SIP/2.0/UDP 
xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04.
Via: SIP/2.0/TCP 
192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1.
Authorization: Digest 
username=nkeeling3,realm=mydomain2.com,nonce=5184345b003b08c40d29a091fb53e6cb83c3961c1dbb,uri=sip:my-sip-domain.com;transport=tcp,response=987edb51f504ff56c7ba840d594c4bb1.

Content-Length: 0.
Path: 
sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp.

Path: sip:xxx.xxx.110.38;transport=tcp;r2=on;lr.


  id  | username  |domain | 
contact | received | 
path |   expires   | q | callid  | cseq 
| last_modified| flags | cflags | user_agent | 
socket  | methods | sip_instance
--+---+---++-+--+-++--+--+-+---++-+-+-+-- 

 1555 | nkeeling3 | mydomain2.com | 
sip:nkeeling3@192.168.43.237:65420;transport=tcp;registering_acc=mydomain2_com 
| sip:xxx.xxx.110.38:5060 |  | 2013-05-03 17:08:03 | -1 | 
869321ee55e10970ff139673909ab626@0:0:0:0:0:0:0:0 | 10 | 2013-05-03 
16:58:03 | 0 |   1024 | Jitsi2.0.4506.10553Mac OS X | 
udp:xxx.xxx.110.48:5060 | |
 1556 | nkeeling3 | mydomain2.com | 

Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-04 Thread Nathaniel L Keeling III
I am currently using version 1.8.2 of opensips. I am using this code on 
the registrar server, save(location,p0v), when the user is 
authenticated. The user is behind a firewall. The register request is 
first sent to the sip proxy which forwards it to the registrar server. 
The sip proxy adds the Path header with the source IP/Port of the 
Register request. From the documentation it sounds like the save() 
function should take the received parameter from the Path header and 
store it in the received column of the location table. When I look at 
the location table it contains the IP address and port of the SIP proxy 
so when I try to locate the user, they are being sent to the SIP proxy 
and the call fails. Is my understanding correct? What is the best 
approach for this, UAC -- firewall -- P1  -- REG.


Thanks

Nathaniel

On 5/4/13 4:26 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

See 
http://www.opensips.org/html/docs/modules/1.9.x/registrar.html#id248705 - 
this controls the PATH support in REGISTRAR module.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 05/04/2013 01:31 AM, Nathaniel L Keeling III wrote:

Hello,

I sent an earlier post concerning NATed registrations not being able 
to locate from the lookup() function when the registration request is 
sent from a opensips proxy server to an opensips registration server 
and from my research it looks like I should be using the Path header 
with the received parameter set. Doing this, the Register request is 
sent to the registrar proxy server with a Path header, the user is 
successfully authorized and saved in the location table but when I 
look at the location table entry, the received column either does not 
contain a value or it contains the wrong value. Here is the Register 
request sent from the proxy to the registrar server and the output 
from the location table.


REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0.
Call-ID: 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0.
CSeq: 2 REGISTER.
From: Nathaniel L Keeling III 
sip:nkeeli...@mydomain2.com;tag=cbe17bd3.

To: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com.
Max-Forwards: 68.
User-Agent: Jitsi2.0.4506.10553Mac OS X.
Expires: 600.
Contact: Nathaniel L Keeling III 
sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com;expires=600.
Via: SIP/2.0/UDP 
xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04.
Via: SIP/2.0/TCP 
192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1.
Authorization: Digest 
username=nkeeling3,realm=mydomain2.com,nonce=5184345b003b08c40d29a091fb53e6cb83c3961c1dbb,uri=sip:my-sip-domain.com;transport=tcp,response=987edb51f504ff56c7ba840d594c4bb1.

Content-Length: 0.
Path: 
sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp.

Path: sip:xxx.xxx.110.38;transport=tcp;r2=on;lr.


  id  | username  |domain | 
contact | received | path 
|   expires   | q | callid  | cseq | 
last_modified| flags | cflags | user_agent | 
socket  | methods | sip_instance
--+---+---++-+--+-++--+--+-+---++-+-+-+-- 

 1555 | nkeeling3 | mydomain2.com | 
sip:nkeeling3@192.168.43.237:65420;transport=tcp;registering_acc=mydomain2_com 
| sip:xxx.xxx.110.38:5060 |  | 2013-05-03 17:08:03  | -1 | 
869321ee55e10970ff139673909ab626@0:0:0:0:0:0:0:0 |   10 | 2013-05-03 
16:58:03 | 0 |   1024 | Jitsi2.0.4506.10553Mac OS X | 
udp:xxx.xxx.110.48:5060 | |
 1556 | nkeeling3 | mydomain2.com | 
sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com 
| sip:xxx.xxx.110.38:5060 |  | 2013-05-03 17:13:42  | -1 | 
541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0 |2 | 2013-05-03 
17:03:42 | 0 |   1024 | Jitsi2.0.4506.10553Mac OS X | 
udp:xxx.xxx.110.48:5060 | |



Thanks

Nathaniel



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar Module + GRUU + Multiple Instances: Causes Infinite Loop

2013-04-28 Thread Vlad Paiu

Hello Tolga,

Thank you very much for the patch.
I have committed it on OpenSIPS 1.8, 1.9 and trunk.

Best Regards,
Vlad

Pe 4/27/2013 2:41 AM, Tolga Tarhan a scris:

Hello,

When using the registrar module with GRUU-enabled clients, where 
multiple clients with different sip.instance identifiers register for 
the same AOR, an infinite loop is encountered in lookup.c while 
attempting to resolve a temporary GRUU.


In the 1.9.0 source, the problem is in modules/registrar/lookup.c 
between lines 165 and 174, in while(it). Since the it pointer is 
never advanced to the next item in the list, it's possible (likely) 
that we'll just get stuck in this while loop forever when there's more 
than one sip instance registered.


I've created and verified a patch for this problem. It can be found 
here: 
http://netbrains-misc.s3.amazonaws.com/opensips/opensips-fix-register-lookup-gruu.patch


Please let me know if there's something else I need to do to get the 
patch accepted upstream.


Thanks,
Tolga Tarhan


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar, Proxy and Load-balancer

2010-08-27 Thread Bogdan-Andrei Iancu
Hi Hema,

yes you can configure OpenSIPS in the same time to act as register, 
proxy and LB - it is just a matter of scripting.

Regards,
Bogdan

hemaram wrote:
 Hi Bogdan, 

 We have an implementation where we want the Opensips server to work as a
 Proxy, Registrar and Load-balancer (all three at a time) and the Freeswitch
 cluster will just take care of the PBX functionalities. 

 Can this be made possible? From all the wiki pages and mailing lists that I
 read, what I understand is that the Opensips can act either as Proxy and
 Registar or as a Load-balancer at a point of time. 

 Looking forward to you reply. Thanks in advance! 

 Regards, 
 Hema.
   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar save f flag missing in current builds

2010-02-16 Thread Bogdan-Andrei Iancu
Hi Jeff,

Now, according to the new release policy,  the backport of this change 
from trunk to 1.6 is doable :) I will take care or it

Regards,
Bogdan

Jeff Pyle wrote:
 Ha!  I crack myself up.  May I request this?


 - Jeff


 On Feb 15, 2010, at 8:37 AM, Bogdan-Andrei Iancu wrote:

   
 Just checked, 1.6 does not have this addition - there was no such 
 backport done

 Regards,
 Bogdan

 Jeff Pyle wrote:
 
 Interesting, I really thought I had it working on 1.6...

 On Feb 15, 2010, at 8:25 AM, Bogdan-Andrei Iancu wrote:


   
 Hi Jeff,

 The f flag is present only on the devel / trunk version (SVN).

 Regards,
 Bogdan

 Jeff Pyle wrote:

 
 Bogdan,

 I updated to 1.6 SVN 6594 tonight.  The new f flag for save() you wrote 
 into 6527 is no longer there.  I poked around some earlier builds and 
 they appear to be missing there as well.  Was there a problem with it?


 - Jeff


   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar save f flag missing in current builds

2010-02-15 Thread Bogdan-Andrei Iancu
Hi Jeff,

The f flag is present only on the devel / trunk version (SVN).

Regards,
Bogdan

Jeff Pyle wrote:
 Bogdan,

 I updated to 1.6 SVN 6594 tonight.  The new f flag for save() you wrote 
 into 6527 is no longer there.  I poked around some earlier builds and they 
 appear to be missing there as well.  Was there a problem with it?


 - Jeff


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar save f flag missing in current builds

2010-02-15 Thread Jeff Pyle
Interesting, I really thought I had it working on 1.6...

On Feb 15, 2010, at 8:25 AM, Bogdan-Andrei Iancu wrote:

 Hi Jeff,
 
 The f flag is present only on the devel / trunk version (SVN).
 
 Regards,
 Bogdan
 
 Jeff Pyle wrote:
 Bogdan,
 
 I updated to 1.6 SVN 6594 tonight.  The new f flag for save() you wrote 
 into 6527 is no longer there.  I poked around some earlier builds and they 
 appear to be missing there as well.  Was there a problem with it?
 
 
 - Jeff
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
 
 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar save f flag missing in current builds

2010-02-15 Thread Bogdan-Andrei Iancu
Just checked, 1.6 does not have this addition - there was no such 
backport done

Regards,
Bogdan

Jeff Pyle wrote:
 Interesting, I really thought I had it working on 1.6...

 On Feb 15, 2010, at 8:25 AM, Bogdan-Andrei Iancu wrote:

   
 Hi Jeff,

 The f flag is present only on the devel / trunk version (SVN).

 Regards,
 Bogdan

 Jeff Pyle wrote:
 
 Bogdan,

 I updated to 1.6 SVN 6594 tonight.  The new f flag for save() you wrote 
 into 6527 is no longer there.  I poked around some earlier builds and they 
 appear to be missing there as well.  Was there a problem with it?


 - Jeff


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


   
 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar save f flag missing in current builds

2010-02-15 Thread Jeff Pyle
Ha!  I crack myself up.  May I request this?


- Jeff


On Feb 15, 2010, at 8:37 AM, Bogdan-Andrei Iancu wrote:

 Just checked, 1.6 does not have this addition - there was no such 
 backport done
 
 Regards,
 Bogdan
 
 Jeff Pyle wrote:
 Interesting, I really thought I had it working on 1.6...
 
 On Feb 15, 2010, at 8:25 AM, Bogdan-Andrei Iancu wrote:
 
 
 Hi Jeff,
 
 The f flag is present only on the devel / trunk version (SVN).
 
 Regards,
 Bogdan
 
 Jeff Pyle wrote:
 
 Bogdan,
 
 I updated to 1.6 SVN 6594 tonight.  The new f flag for save() you wrote 
 into 6527 is no longer there.  I poked around some earlier builds and they 
 appear to be missing there as well.  Was there a problem with it?
 
 
 - Jeff
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
 
 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users