[OpenSIPS-Users] Authentication problem

2010-09-03 Thread vishu gaddi
Hi,



I am using opensips-1.6.0. I am facing problem of authentication.

Opensips server is accepting calls from any IP even IP is registered in
address table or not, and routing them to dialplan table and so on to
destination gateway.



I want IP based authentication for incoming traffic and I am using
check_source_address(“0”) function for this purpose of authentication, but
is not working.



Here is script from opensips.cfg



*if (!(method=="REGISTER") && is_from_local()) *

*{*

*if(!check_source_address("0")){*

*if (!proxy_authorize("", "subscriber")) {*

*proxy_challenge("", "0");*

*exit;*

*}*

*if (!db_check_from()) {*

*sl_send_reply("403","Forbidden auth ID");*

*exit;*

*}*

* *

*consume_credentials();*

*# caller authenticated*

*}*

* }*





Please revert how to use this function to authenticate caller based on IP ??



Thanks,

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


[OpenSIPS-Users] Authentication problem

2010-09-04 Thread vishu gaddi
Yes i am using permission module which uses address tables for IP
authentication.

and permission module's function check_source_address is using for IP
checking in address table, but its not working.

i have pasted my code in last message, please look into it whats wrong ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Authentication problem

2010-09-06 Thread vishu gaddi
Here is my code from opensips.cfg:

*
*
* if (!(method=="REGISTER") && is_from_local())  /*multidomain version*/*
*{*
*if(!check_source_address("0")){*
*if (!proxy_authorize("", "subscriber")) {*
*proxy_challenge("", "0");*
*exit;*
*}*
*if (!db_check_from()) {*
*sl_send_reply("403","Forbidden auth ID");*
*exit;*
*}*
*
*
*consume_credentials();*
*# caller authenticated*
*}*
* }*
*
*


and here is debug level 5. call is made from IP  216.214.25.18 to Opensips
server(IP 215.63.71.144). call is accepted by opensips even caller
ip 216.214.25.18 is not inserted in address table, in fact my address table
is empty this time.

*DEBUG:*
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_msg: SIP
Request:
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_msg:  method:
 
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_msg:  uri:
  >
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_msg:
 version: 
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers:
flags=2
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:get_hdr_field: cseq
: <1> 
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_via_param:
found param type 232,  = ; state=16
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_via: end of
header reached, state=5
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers: via
found, flags=2
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers: this
is the first via
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:receive_msg: After
parse_msg...
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:receive_msg:
preparing to run routing scripts...
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers:
flags=100
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_to: end of
header reached, state=10
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_to:
display={}, 
ruri={sip:01112127773...@215.63.71.144
}
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:get_hdr_field: 
[36]; uri=[sip:01112127773...@215.63.71.144
]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:get_hdr_field: to
body [
>#015#012]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:get_hdr_field:
content_length=236
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:get_hdr_field:
found end of header
Sep  6 04:55:22 opensips /sbin/opensips[22154]:
DBG:maxfwd:is_maxfwd_present: max_forwards header not found!
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:uri:has_totag: no totag
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers:
flags=78
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:tm:t_lookup_request:
start searching: hash=15721, isACK=0
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:tm:matching_3261:
RFC3261 transaction matching failed
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:tm:t_lookup_request: no
transaction found
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_to_param:
tag=060955100925637788216
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_to: end of
header reached, state=29
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_to:
display={"121212121212"}, ruri={sip:121212121...@216.214.25.18:5060}
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if host==us: 13==9 &&  [216.214.25.18] == [127.0.0.1]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if port 5060 matches port 5060
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if host==us: 13==13 &&  [216.214.25.18] == [215.63.71.144]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if port 5060 matches port 5060
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if host==us: 13==9 &&  [216.214.25.18] == [127.0.0.1]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if port 5060 matches port 5060
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if host==us: 13==13 &&  [216.214.25.18] == [215.63.71.144]
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if port 5060 matches port 5060
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:check_self: host !=
me
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:parse_headers:
flags=200
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:rr:find_first_route: No
Route headers found
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:rr:loose_route: There is
no Route HF
Sep  6 04:55:22 opensips /sbin/opensips[22154]: DBG:core:grep_sock_info:
checking if host==us: 13==9 &&  [215.63.71.14

[OpenSIPS-Users] Authentication problem

2009-12-23 Thread Daniel Goepp
I am having another issue with this latest version also, and I believe it
could perhaps be related to my last post.  Very straight forward here, I
have just two users on this new lab system.

The problem:

First register comes in, challenged with 401 no problem, then a register
with auth header, which is responded to with:

SIP/2.0 403 Forbidden auth ID.

I did an SQL trace, and the query is select password from subscriber where
username='2001':

When I execute manually, no problem:

mysql> select password from subscriber where username='2001';
+--+
| password |
+--+
| 2001 |
+--+

Did something change recently regarding how users are auth'd?  This is a
very very basic setup, pretty much out of the box.  And ideas about what
boneheaded thing I have done here?

Thanks

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


Re: [OpenSIPS-Users] Authentication problem

2010-09-03 Thread ram
how about using permission module
ram



On Fri, Sep 3, 2010 at 3:41 PM, vishu gaddi  wrote:

> Hi,
>
>
>
> I am using opensips-1.6.0. I am facing problem of authentication.
>
> Opensips server is accepting calls from any IP even IP is registered in
> address table or not, and routing them to dialplan table and so on to
> destination gateway.
>
>
>
> I want IP based authentication for incoming traffic and I am using
> check_source_address(“0”) function for this purpose of authentication, but
> is not working.
>
>
>
> Here is script from opensips.cfg
>
>
>
> *if (!(method=="REGISTER") && is_from_local()) *
>
> *{*
>
> *if(!check_source_address("0")){*
>
> *if (!proxy_authorize("", "subscriber")) {*
>
> *proxy_challenge("", "0");*
>
> *exit;*
>
> *}*
>
> *if (!db_check_from()) {*
>
> *sl_send_reply("403","Forbidden auth ID");*
>
> *exit;*
>
> *}*
>
> * *
>
> *consume_credentials();*
>
> *# caller authenticated*
>
> *}*
>
> * }*
>
>
>
>
>
> Please revert how to use this function to authenticate caller based on IP
> ??
>
>
>
> Thanks,
>
> Vishu
>
> ___
> 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] Authentication problem

2010-09-04 Thread ram
paste the part of the code and some debug logs will help to suggest

On Sat, Sep 4, 2010 at 4:58 PM, vishu gaddi  wrote:

> Yes i am using permission module which uses address tables for IP
> authentication.
>
> and permission module's function check_source_address is using for IP
> checking in address table, but its not working.
>
> i have pasted my code in last message, please look into it whats wrong ?
>
>
>
> ___
> 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] Authentication problem

2009-12-24 Thread Bogdan-Andrei Iancu
Hi Daniel,

The auth part is not sending by itself a 403 -> probably this is 
explicitly sent from the script, so you need to check what function is 
failing triggering the 403 in script -> is it the db_check_to()  ?

Regards,
Bogdan

Daniel Goepp wrote:
> I am having another issue with this latest version also, and I believe 
> it could perhaps be related to my last post.  Very straight forward 
> here, I have just two users on this new lab system.
>
> The problem:
>
> First register comes in, challenged with 401 no problem, then a 
> register with auth header, which is responded to with:
>
> SIP/2.0 403 Forbidden auth ID.
>
> I did an SQL trace, and the query is select password from subscriber 
> where username='2001':
>
> When I execute manually, no problem:
>
> mysql> select password from subscriber where username='2001';
> +--+
> | password |
> +--+
> | 2001 |
> +--+
>
> Did something change recently regarding how users are auth'd?  This is 
> a very very basic setup, pretty much out of the box.  And ideas about 
> what boneheaded thing I have done here?
>
> Thanks
>
> -dg
> 
>
> ___
> 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] Authentication problem

2009-12-24 Thread Daniel Goepp
Yes, the section in the script was not modified from the default, so it is:

if (!(method=="REGISTER") && is_from_local())  /*multidomain
version*/
{
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

consume_credentials();
# caller authenticated
}

I am thinking perhaps this is to do with the domain, I don't see a query in
my sql trace log showing a query for domain, and the domain of the request
is in memory and the DB.  I did have an initial problem where I was getting
the "Preload Route denied", but I added the IP of the server to the domain
list, and that went away.

Thanks

-dg


On Thu, Dec 24, 2009 at 12:13 AM, Bogdan-Andrei Iancu <
bog...@voice-system.ro> wrote:

> Hi Daniel,
>
> The auth part is not sending by itself a 403 -> probably this is
> explicitly sent from the script, so you need to check what function is
> failing triggering the 403 in script -> is it the db_check_to()  ?
>
> Regards,
> Bogdan
>
> Daniel Goepp wrote:
> > I am having another issue with this latest version also, and I believe
> > it could perhaps be related to my last post.  Very straight forward
> > here, I have just two users on this new lab system.
> >
> > The problem:
> >
> > First register comes in, challenged with 401 no problem, then a
> > register with auth header, which is responded to with:
> >
> > SIP/2.0 403 Forbidden auth ID.
> >
> > I did an SQL trace, and the query is select password from subscriber
> > where username='2001':
> >
> > When I execute manually, no problem:
> >
> > mysql> select password from subscriber where username='2001';
> > +--+
> > | password |
> > +--+
> > | 2001 |
> > +--+
> >
> > Did something change recently regarding how users are auth'd?  This is
> > a very very basic setup, pretty much out of the box.  And ideas about
> > what boneheaded thing I have done here?
> >
> > Thanks
> >
> > -dg
> > 
> >
> > ___
> > 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] Authentication problem

2009-12-24 Thread Bogdan-Andrei Iancu
The db_check_from() (if use_uac_table is turned off) will simply check 
if the username from the FROM hdr is the same with the authentication 
username.

Regards,
Bogdan

Daniel Goepp wrote:
> Yes, the section in the script was not modified from the default, so 
> it is:
>
> if (!(method=="REGISTER") && is_from_local())  /*multidomain 
> version*/
> {
> if (!proxy_authorize("", "subscriber")) {
> proxy_challenge("", "0");
> exit;
> }
> if (!db_check_from()) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
>
> consume_credentials();
> # caller authenticated
> }
>
> I am thinking perhaps this is to do with the domain, I don't see a 
> query in my sql trace log showing a query for domain, and the domain 
> of the request is in memory and the DB.  I did have an initial problem 
> where I was getting the "Preload Route denied", but I added the IP of 
> the server to the domain list, and that went away.
>
> Thanks
>
> -dg
>
>
> On Thu, Dec 24, 2009 at 12:13 AM, Bogdan-Andrei Iancu 
> mailto:bog...@voice-system.ro>> wrote:
>
> Hi Daniel,
>
> The auth part is not sending by itself a 403 -> probably this is
> explicitly sent from the script, so you need to check what function is
> failing triggering the 403 in script -> is it the db_check_to()  ?
>
> Regards,
> Bogdan
>
> Daniel Goepp wrote:
> > I am having another issue with this latest version also, and I
> believe
> > it could perhaps be related to my last post.  Very straight forward
> > here, I have just two users on this new lab system.
> >
> > The problem:
> >
> > First register comes in, challenged with 401 no problem, then a
> > register with auth header, which is responded to with:
> >
> > SIP/2.0 403 Forbidden auth ID.
> >
> > I did an SQL trace, and the query is select password from subscriber
> > where username='2001':
> >
> > When I execute manually, no problem:
> >
> > mysql> select password from subscriber where username='2001';
> > +--+
> > | password |
> > +--+
> > | 2001 |
> > +--+
> >
> > Did something change recently regarding how users are auth'd?
>  This is
> > a very very basic setup, pretty much out of the box.  And ideas
> about
> > what boneheaded thing I have done here?
> >
> > Thanks
>


-- 
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] Authentication problem

2009-12-24 Thread Daniel Goepp
Definitely turned off:

# - uri params -
modparam("uri", "use_uri_table", 0)

But thanks for the comment, that helped me find exactly what the problem was
and I fixed it.

-dg


On Thu, Dec 24, 2009 at 11:06 AM, Bogdan-Andrei Iancu <
bog...@voice-system.ro> wrote:

> The db_check_from() (if use_uac_table is turned off) will simply check
> if the username from the FROM hdr is the same with the authentication
> username.
>
> Regards,
> Bogdan
>
> Daniel Goepp wrote:
> > Yes, the section in the script was not modified from the default, so
> > it is:
> >
> > if (!(method=="REGISTER") && is_from_local())  /*multidomain
> > version*/
> > {
> > if (!proxy_authorize("", "subscriber")) {
> > proxy_challenge("", "0");
> > exit;
> > }
> > if (!db_check_from()) {
> > sl_send_reply("403","Forbidden auth ID");
> > exit;
> > }
> >
> > consume_credentials();
> > # caller authenticated
> > }
> >
> > I am thinking perhaps this is to do with the domain, I don't see a
> > query in my sql trace log showing a query for domain, and the domain
> > of the request is in memory and the DB.  I did have an initial problem
> > where I was getting the "Preload Route denied", but I added the IP of
> > the server to the domain list, and that went away.
> >
> > Thanks
> >
> > -dg
> >
> >
> > On Thu, Dec 24, 2009 at 12:13 AM, Bogdan-Andrei Iancu
> > mailto:bog...@voice-system.ro>> wrote:
> >
> > Hi Daniel,
> >
> > The auth part is not sending by itself a 403 -> probably this is
> > explicitly sent from the script, so you need to check what function
> is
> > failing triggering the 403 in script -> is it the db_check_to()  ?
> >
> > Regards,
> > Bogdan
> >
> > Daniel Goepp wrote:
> > > I am having another issue with this latest version also, and I
> > believe
> > > it could perhaps be related to my last post.  Very straight forward
> > > here, I have just two users on this new lab system.
> > >
> > > The problem:
> > >
> > > First register comes in, challenged with 401 no problem, then a
> > > register with auth header, which is responded to with:
> > >
> > > SIP/2.0 403 Forbidden auth ID.
> > >
> > > I did an SQL trace, and the query is select password from
> subscriber
> > > where username='2001':
> > >
> > > When I execute manually, no problem:
> > >
> > > mysql> select password from subscriber where username='2001';
> > > +--+
> > > | password |
> > > +--+
> > > | 2001 |
> > > +--+
> > >
> > > Did something change recently regarding how users are auth'd?
> >  This is
> > > a very very basic setup, pretty much out of the box.  And ideas
> > about
> > > what boneheaded thing I have done here?
> > >
> > > Thanks
> >
>
>
> --
> 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


[OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread mmarzuola

I want that all INVITE created by a local subscriber should be authenticated by 
my proxy.
I have installed more softphones in the same machine and the port number is 
automatically assigned (5060/5061/5062).
Sniffing the traffic I have realized that only some INVITE are authenticated.
By analyzing the headers of the INVITE not authenticated, I have noticed that 
the softphone X-Lite inserts in the From the number of port in addition to URI 
(sip:[EMAIL PROTECTED]:port).
In the opensips.cfg the lines that allow authentication of these messages are 
in the main route:

if (!(method=="REGISTER") && from_uri==myself)
   {
   if (!proxy_authorize("", "subscriber")) {
   proxy_challenge("", "0");
   exit;
   }
   if (!check_from()) {
  sl_send_reply("403","Forbidden auth ID");
  exit;
   }

   consume_credentials();
# caller authenticated
   }

Obviously the control "from_uri==myself" does not work for INVITE that have the 
from URI with the port number.
I tried to use the uac_replace_from(uri) function of the uac module to change 
the uri of the From by removing the port:

if(is_method("INVITE") && $(fu{s.select,2,:})!="") {
   $avp(s:fromURI)="sip:"+$(fu{s.select,1,:});
   uac_replace_from("$avp(s:fromURI)");
}

if (!(method=="REGISTER") && from_uri==myself) {
**
**
**

But in this way only the from uri of the INVITE ranging from proxy to an 
end-system have changed the uri while those departing from softphone remain 
unchanged.
Is a limitation of the uac module or I make a configuration error?  

I also tried to make the comparison between the avp variable created and 
myself, but I get the error syslog:

CRITICAL:core:comp_scriptvar: invalid operation 20/11
opensips-lab /usr/local/sbin/opensips[2655]: WARNING:core:do_action: error in 
expression (l=296)

I tried to replace == with =~ but I get a syntax error.
"myself" allow to make the comparison with a string or is there a way to make 
this comparison?

Thank you in advance.

Marzuola Matteo.



Vuoi essere presente online? 
Vuoi dare voce alla tua attivita`? 
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro



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


Re: [OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread Iñaki Baz Castillo
2008/12/11  <[EMAIL PROTECTED]>:
>
> I want that all INVITE created by a local subscriber should be authenticated 
> by my proxy.
> I have installed more softphones in the same machine and the port number is 
> automatically assigned (5060/5061/5062).
> Sniffing the traffic I have realized that only some INVITE are authenticated.
> By analyzing the headers of the INVITE not authenticated, I have noticed that 
> the softphone X-Lite inserts in the From the number of port in addition to 
> URI (sip:[EMAIL PROTECTED]:port).

This shouldn't occur at all. The From URI never depends on the local
port of the phone. You should fix it instead of changing your OpenSIPS
script.
How are you configuring your phone?

-- 
Iñaki Baz Castillo
<[EMAIL PROTECTED]>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread mmarzuola


I know that the port should not be present in the from uri because this 
information is not used by anyone.
The configuration of the softphone X-Lite is the following:

SIP PROXY-->[Default]:mysip.com--> Enabled: yes
   Display Name: X-Lite User
   User: 1001
   Authorization User: 1001
   Password: 
   Domain/Realm: mysip.com
   Sip Proxy: 10.10.45.146
   Out Bound Proxy:
   Use Out Bound Proxy: Default
   Send Internal Ip: Default
   Register: Default

Thanks.

Marzuola Matteo



Vuoi essere presente online? 
Vuoi dare voce alla tua attivita`? 
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro



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


Re: [OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread mmarzuola

If the port 5060 is assigned to the X-Lite softphone the from uri is correct 
while if the port number is different from 5060 the uri becomes: sip:[EMAIL 
PROTECTED]:5061
Softphones and proxy are in the same domain.
 
Marzuola Matteo




Vuoi essere presente online? 
Vuoi dare voce alla tua attivita`? 
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro



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


Re: [OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread Iñaki Baz Castillo
2008/12/11  <[EMAIL PROTECTED]>:
>
> If the port 5060 is assigned to the X-Lite softphone the from uri is correct 
> while if the port number is different from 5060 the uri becomes: sip:[EMAIL 
> PROTECTED]:5061
> Softphones and proxy are in the same domain.

Ok, very estrange anyway.

I'm not sure about if "myself" also matches the port, I 'd say that it
doesn't do it, but if you say...

Instead of:
  if ( from_uri==myself )

Use:
  if ( $rd == DOMAIN )

Of course, this is just valid if you have just few domains:
  if ( $rd == DOMAIN_1 || $rd == DOMAIN_2 )

If not, you can use "domain" module that uses a DB table to store all
the domains and provide simple functions to match the RURI or From
domain against existing domains in the table.


-- 
Iñaki Baz Castillo
<[EMAIL PROTECTED]>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Authentication problem with softphone X-Lite

2008-12-11 Thread mmarzuola

Hi.
I have solved using the function is_uri_host_local () of the domain module.

Thanks.

Marzuola Matteo

>
> If the port 5060 is assigned to the X-Lite softphone the from uri >is correct 
> while if the port number is different from 5060 the uri >becomes: sip:[EMAIL 
> PROTECTED]:5061
> Softphones and proxy are in the same domain.

>Ok, very estrange anyway.

>I'm not sure about if "myself" also matches the port, I 'd say that 
>it doesn't do it, but if you say...

>Instead of:
> if ( from_uri==myself )

>Use:
>if ( $rd == DOMAIN )

>Of course, this is just valid if you have just few domains:
>if ( $rd == DOMAIN_1 || $rd == DOMAIN_2 )

>If not, you can use "domain" module that uses a DB table to store >all
>the domains and provide simple functions to match the RURI or From
>domain against existing domains in the table.


-- 
Iaki Baz Castillo

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




Vuoi essere presente online? 
Vuoi dare voce alla tua attivita`? 
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro



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