Re: [OpenSIPS-Users] IPv6 SIP URI in Dispatcher List (destination set)

2009-09-15 Thread Alain Bernard
Hi Bogdan,

Thanks for taking care of this bug. Now it works fine after few tests. Will
let you know if other issue show up after deep tests.

I assume that this update applies also for Load Balancing module when
setting destination set (dst_uri as IPv6 SIP URI), since the syntax is
similar.

Thanks again and best regards,

Alain

On Tue, Sep 15, 2009 at 10:34 AM, Bogdan-Andrei Iancu <
bog...@voice-system.ro> wrote:

> Hi Alain,
>
> I did a small fix on the SVN in regards to dealing with IPv6 IP
> addresses in the dispatcher module. According to my tests, it should
> work now.
>
> So, please update from SVN and give it a try.
>
> Thanks for report and regards,
> Bogdan
>
> alain bernard wrote:
> > Folks,
> >
> > We are using dispatcher module for load balancing for a while with
> > IPv4.  Now, we are moving to IPv6, we would like to use these features
> > again. However, by specifying IPv6 SIP URI in the dispatcher.list for
> > the destination host, the URI can't be resolved. Below is the debug log.
> >
> > A simple destination set in dispatcher.list is:
> >
> > 1 sip:[2001:430:1403:3::1]:5081
> > 1 sip:[2001:430:1403:3::2]:5082
> >
> > We tried other IPv6 SIP URI syntaxes without success.
> >
> > Any thoughts how to solve this issue or how to use IPv6 SIP URI in
> > dispatcher.list for destination hosts/set.
> >
> > Regards,
> >
> > Alain
> >
> >
> -
> >
> > Sep 11 06:58:04 [32571] INFO:core:init_tcp: using epoll_lt as the TCP
> > io watch method (auto detected)
> > [r...@pctest opensips]# Sep 11 06:58:04 [32573] NOTICE:core:main:
> > version: opensips 1.5.2-notls (i386/linux)
> > Sep 11 06:58:04 [32573] INFO:core:main: using 32 Mb shared memory
> > Sep 11 06:58:04 [32573] INFO:core:main: using 1 Mb private memory per
> > process
> > Sep 11 06:58:04 [32573] NOTICE:signaling:mod_init: initializing module
> ...
> > Sep 11 06:58:04 [32573] INFO:sl:mod_init: Initializing StateLess engine
> > Sep 11 06:58:04 [32573] INFO:tm:mod_init: TM - initializing...
> > Sep 11 06:58:04 [32573] INFO:maxfwd:mod_init: initializing...
> > Sep 11 06:58:04 [32573] INFO:usrloc:ul_init_locks: locks array size 512
> > Sep 11 06:58:04 [32573] INFO:registrar:mod_init: initializing...
> > Sep 11 06:58:04 [32573] INFO:textops:mod_init: initializing...
> > Sep 11 06:58:04 [32573] INFO:xlog:mod_init: initializing...
> > Sep 11 06:58:04 [32573] INFO:acc:mod_init: initializing...
> > Sep 11 06:58:04 [32573] ERROR:dispatcher:add_dest2list: could not
> > resolve [2001:430:1403:3::1]
> > Sep 11 06:58:04 [32573] ERROR:dispatcher:mod_init: no dispatching list
> > loaded from file
> > Sep 11 06:58:04 [32573] ERROR:core:init_mod: failed to initialize
> > module dispatcher
> > Sep 11 06:58:04 [32573] ERROR:core:main: error while initializing modules
> >
> >
> >
> >
> > 
> >
> > ___
> > 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] Subscriber Database email_address usage

2009-09-15 Thread osiris123d

Ok.  For a second I thought my question was going to be one of those "it's
right here in the documentation", but I was positive that I couldn't find
anything about it.

Appreciate it.




Iñaki Baz Castillo wrote:
> 
> El Martes, 15 de Septiembre de 2009, osiris123d escribió:
>> How do you use the email_address field in the Subscriber table?  Looks
>> like
>> there is not a "opensipsctl fifo" command for adding or editing this
>> field
>> so that means the only way is to get into the database and add it
>> manually
>> which would require you to restart openSIPS.  I also can't seem to find
>> any
>> "Scripting Variable" that would represent the email_address string in the
>> table, or any type of function that would load it.
>> 
>> Is this for future use?
>> 
> 
> Most probably it exists because some web application managing OpenSIPS
> makes 
> use of it, but it has nothing to do with OpenSIPS itself so you are free
> to 
> delete it.
> 
> -- 
> Iñaki Baz Castillo 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Subscriber-Database-email-address-usage-tp3652195p3652296.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] Subscriber Database email_address usage

2009-09-15 Thread Iñaki Baz Castillo
El Martes, 15 de Septiembre de 2009, osiris123d escribió:
> How do you use the email_address field in the Subscriber table?  Looks like
> there is not a "opensipsctl fifo" command for adding or editing this field
> so that means the only way is to get into the database and add it manually
> which would require you to restart openSIPS.  I also can't seem to find any
> "Scripting Variable" that would represent the email_address string in the
> table, or any type of function that would load it.
> 
> Is this for future use?
> 

Most probably it exists because some web application managing OpenSIPS makes 
use of it, but it has nothing to do with OpenSIPS itself so you are free to 
delete it.

-- 
Iñaki Baz Castillo 

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


[OpenSIPS-Users] Subscriber Database email_address usage

2009-09-15 Thread osiris123d

How do you use the email_address field in the Subscriber table?  Looks like
there is not a "opensipsctl fifo" command for adding or editing this field
so that means the only way is to get into the database and add it manually
which would require you to restart openSIPS.  I also can't seem to find any
"Scripting Variable" that would represent the email_address string in the
table, or any type of function that would load it.

Is this for future use?
-- 
View this message in context: 
http://n2.nabble.com/Subscriber-Database-email-address-usage-tp3652195p3652195.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] rtpproxy

2009-09-15 Thread Iñaki Baz Castillo
El Martes, 15 de Septiembre de 2009, michel freiha escribió:
> Dear All,
> 
> I'm developing a Softphone from scratch and I'm using PJSIP sip
>  stackI'm using OpenSIPS as proxy server with rtpproxy...
> My question is:
> 
> Can rtpproxy handle the NAT traversal issue without intervention of a
> standalone STUN/TURN/ICE solution or I should have my own STUN/TURN/ICE
> installed on a standalone server that will take care about NAT Traversal?

If OpenSIPS "fixes" the signalling (SIP) NAT issue and rtpproxy fixes the 
media NAT issue then the phone doesn't require to use STUN/TURN/ICE at all.

-- 
Iñaki Baz Castillo 

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


[OpenSIPS-Users] rtpproxy

2009-09-15 Thread michel freiha
Dear All,

I'm developing a Softphone from scratch and I'm using PJSIP sip stackI'm
using OpenSIPS as proxy server with rtpproxy...
My question is:

Can rtpproxy handle the NAT traversal issue without intervention of a
standalone STUN/TURN/ICE solution or I should have my own STUN/TURN/ICE
installed on a standalone server that will take care about NAT Traversal?

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


[OpenSIPS-Users] Authorizing Register messages for multiple domains

2009-09-15 Thread Srikanth Rajagopalan
Hi All,
 
I need some help with implementing multi-domain authorization for register 
messages. I went through the documentation available and made changes to the 
config file as is directed in the config file. I also added the new domain to 
the domain table. Now when I try to register any user it complains saying too 
many hops. I am not sure how to get this working.
 
It would really be great if someone could tell me what changes other than those 
mentioned in the config file. 

Thanks,
Srikanth Rajagopalan


  Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] b2bua top hiding + authentication

2009-09-15 Thread Jeff Pyle
Following up... I did have a bad IP address in the server_address module
parameter.  Fixing it did not help the situation.

With the top-hiding scenario called before auth, I notice a bunch of error
messages in the log at debug=3 including:

ERROR:tm:_reply_light: failed to generate 407 reply when a final 407 was
sent out
ERROR:b2b_entities:b2b_send_reply: failed to send reply with tm
ERROR:b2b_entities:b2b_prescript_f: No dialog found

My script runs create_dialog() after authentication, so the b2b scenario
starting before auth, it also starts before there is a dialog.

I don't know where to go from here.


- Jeff




On 9/15/09 3:51 PM, "Jeff Pyle"  wrote:

> Hi Bogdan,
> 
> I tried it first after the auth for initial INVITEs.  It seems to re-auth
> (another 407 is sent to the UAC), but then forwards the INVITE upstream to
> the UAS.  In this case the call UAS sends 100, 180, then 200.  Opensips
> appears to forward only the 200 and not the 180.  The UAC ignores the 200
> because as far as it knows the transaction ended in a 407 (which the UAC
> ACK'd).
> 
> Next, I put it before the auth for initial INVITEs only.  It appears to be
> the same story as when it is in place before the auth.
> 
> 
> - Jeff
> 
> 
> 
> 
> On 9/15/09 11:06 AM, "Jeff Pyle"  wrote:
> 
>> Hi Bogdan,
>> 
>> I had tried both.  I'm compiling the latest 1.6; when that completes I'll
>> try again.  Which way is recommended?
>> 
>> I have a functioning configuration otherwise.  If I simply want topology
>> hiding between the UAC and UAS, it is as simple as invoking the b2bua at
>> some point and the rest will simply work as it did previously?  or am I
>> missing something?
>> 
>> 
>> - Jeff
>> 
>> 
>> 
>> On 9/15/09 11:03 AM, "Bogdan-Andrei Iancu"  wrote:
>> 
>>> Hi Jeff,
>>> 
>>> How are the auth and b2bua chained ? you first do auth and after that
>>> invoke the b2bua ? or?
>>> 
>>> Regards,
>>> Bogdan
>>> 
>>> Jeff Pyle wrote:
 Hello,
 
 What impact does authentication have on the b2bua modules?  When I put
 b2b_init_request("top hiding") into my otherwise functioning script, very
 strange things happen.
 
 In order to achieve topology hiding, is it as simple as inserting this init
 line at some point, or is there more to it?
 
 
 - Jeff
 
 
 ___
 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


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


Re: [OpenSIPS-Users] b2bua top hiding + authentication

2009-09-15 Thread Jeff Pyle
Hi Bogdan,

I tried it first after the auth for initial INVITEs.  It seems to re-auth
(another 407 is sent to the UAC), but then forwards the INVITE upstream to
the UAS.  In this case the call UAS sends 100, 180, then 200.  Opensips
appears to forward only the 200 and not the 180.  The UAC ignores the 200
because as far as it knows the transaction ended in a 407 (which the UAC
ACK'd).

Next, I put it before the auth for initial INVITEs only.  It appears to be
the same story as when it is in place before the auth.


- Jeff




On 9/15/09 11:06 AM, "Jeff Pyle"  wrote:

> Hi Bogdan,
> 
> I had tried both.  I'm compiling the latest 1.6; when that completes I'll
> try again.  Which way is recommended?
> 
> I have a functioning configuration otherwise.  If I simply want topology
> hiding between the UAC and UAS, it is as simple as invoking the b2bua at
> some point and the rest will simply work as it did previously?  or am I
> missing something?
> 
> 
> - Jeff
> 
> 
> 
> On 9/15/09 11:03 AM, "Bogdan-Andrei Iancu"  wrote:
> 
>> Hi Jeff,
>> 
>> How are the auth and b2bua chained ? you first do auth and after that
>> invoke the b2bua ? or?
>> 
>> Regards,
>> Bogdan
>> 
>> Jeff Pyle wrote:
>>> Hello,
>>> 
>>> What impact does authentication have on the b2bua modules?  When I put
>>> b2b_init_request("top hiding") into my otherwise functioning script, very
>>> strange things happen.
>>> 
>>> In order to achieve topology hiding, is it as simple as inserting this init
>>> line at some point, or is there more to it?
>>> 
>>> 
>>> - Jeff
>>> 
>>> 
>>> ___
>>> 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] CANCEL handling in 1.6

2009-09-15 Thread Jeff Pyle
Hi Bogdan,

1.6 revision 6127 seems to handle the CANCELs just fine on my system.


- Jeff



On 9/15/09 9:08 AM, "Bogdan-Andrei Iancu"  wrote:

> Hi Jeff,
> 
> I just run a fast CANCEL test (made a call and cancelled it) and it
> looks ok (using the default opensips script).
> 
> If the update did not fix your issue, just let me know.
> 
> Regards,
> Bogdan
> 
> Jeff Pyle wrote:
>> Hi Bogdan,
>> 
>> 
>> On 9/15/09 2:39 AM, "Bogdan-Andrei Iancu"  wrote:
>> 
>>   
>>> so you actually do not get any CANCEL in your script? do you see it at
>>> network level getting to your server? also tried to place some xlog  in
>>> the very beginning of the script?
>>> 
>> 
>> Right.  I had something like this at the very beginning:
>>   xlog("L_INFO", "Top - M=$rm\n");
>> 
>> and I never saw the cancels.  I did see them entering the interface with
>> ngrep.
>> 
>>   
>>> even if thers is no CANCEL related, try upgrading to the latest SVN.
>>> 
>> 
>> That would make sense.  My problem is the dev box for this project is an old
>> Ultrasparc-III and it takes 45 minutes to make the deb packages.  :/  Once I
>> finish whining I will do exactly as you suggest.
>> 
>> 
>> - Jeff
>> 
>> 
>> 
>> 
>> ___
>> 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] Dynamic Binding on ldap module

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Juan,

There is somebody working on that, hopefully will be ready before the 
svn freeze (on Thursaday).

Regards,
Bogdan

Juan Jose Lopez Juarez wrote:
> Hi.
>
> I'm trying to authenticate using dynamic bind to the ldap.
>
> I've seen that the feature it is been requested on:
>
> http://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2822174&group_id=232389
>
> But it doesn't seem to have any progress.
>
> Any idea if this functionality is going to be implemented?
>
>   


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


[OpenSIPS-Users] NAT_TRAVERSAL Module and keep-alive mechanism

2009-09-15 Thread Mauro Davì

Hi All,

in the NAT_TRAVERSAL module is present a |nat_keepalive()| function to 
enable the keepalive mechanism Vs. an UA.


The question is... After that i call the nat_keepalive() function, how I 
can stop the keepalive mechanism??


I see that when an UA send a De-Registration SIP Message, the border 
proxy (i'm in a multi-proxy environment) continues to send the OPTIONS 
SIP messages, but I haven't a stop_nat_keepalive() function...


Thanks in advance
   MD
--

*Mauro Davì*
mailto:mauro.d...@acotel.com
*Noverca Srl*
http://www.noverca.com
Via della Valle dei Fontanili, 29
00168 Roma
Tel +390661141222
Fax +39066149936


Le informazioni contenute nella comunicazione che precede possono essere 
riservate e sono, comunque, destinate esclusivamente alla persona o 
all'ente sopraindicati. La diffusione, distribuzione e/o copiatura non 
autorizzata del documento trasmesso da parte di qualsiasi soggetto è 
proibita. La sicurezza e la correttezza dei messaggi di posta 
elettronica non possono essere garantite. Se avete ricevuto questo 
messaggio per errore, Vi preghiamo di contattarci immediatamente. Grazie.


This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No 
confidentiality or privilege is waived or lost by any transmission. If 
you receive this message in error, please immediately delete it and all 
copies of it from your system, destroy any hard copies of it and notify 
the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. Thanks


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


Re: [OpenSIPS-Users] Problem with Routing (extension -> opensips -> isp)

2009-09-15 Thread Sheran Corera
Hi Bogdan et all,

Any luck with this?

Thanks,
Sheran

On Tue, Sep 15, 2009 at 6:01 PM, Sheran Corera  wrote:
> Hi,
>
> I am trying to use my opensips application to work as a router whereby
> extensions would be registered in my opensips box and the REGISTER
> request would be forwarded to my ISP. If the ISP is down it would
> connect to a secondary ISP. So essentially what I am trying to do is
> route the REGISTER messages of a given extension to multiple ISPs..
>
> Currently what I have done is this in my opensips.cfg file is this
>
> route{
>
>     if (!mf_process_maxfwd_header("10")) {
>     sl_send_reply("483","Too Many Hops");
>     exit;
>     }
>
>     if (src_ip == 192.168.7.48) {
>
>     #remove misleading CONTACT header line
>     remove_hf("Contact");
>     #remove UTF-8 information, as * is not able to process
> it properly
>     subst("/^(CONTENT-TYPE:.*);[ ]*charset=utf-8(.*)/\1\2/");
>     #relay request to
>
>                #relay register to server 1
>     if (!t_relay("udp:192.168.15.41:5060")) {
>     xlog("LOG: Goto asterisk  \n");
>     sl_reply_error();
>     }
>
>                #relay register to server 2
>                if (!t_relay("udp:192.168.15.42:5060")) {
>                        xlog("LOG: Goto asterisk  \n");
>                        sl_reply_error();
>                }
>         }
> }
>
> so that registrations are now forwarded to the relay point (for
> testing purposes i have setup 2 asterisk installations). This works
> fine but asterisk registers the extension with the opensips domain.
> How do I change the domain part so that opensips passes the src_ip
> (the ip of the extension) to asterisk (external ISP) instead? (so that
> I would be able to register the extension on multiple ISPs and switch
> between them when i want without having to re register each time and
> the ISP would be able to communicate with the local extension to passs
> incoming calls directly to it)
>
> An alternative solution would be to make my opensips to work as an
> inbound server but that seems quite complicated. The help given is
> very much appreciated.
>
> Cheers..
> Sheran
>
> P.S - Sorry for the capitals..
>

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


[OpenSIPS-Users] NAT Module and keep-alive mechanism

2009-09-15 Thread Mauro Davì

Hi All,

in the NAT_TRAVERSAL module is present a |nat_keepalive()| function to 
enable the keepalive mechanism Vs. an UA.


The question is... After that i call the nat_keepalive() function, how I 
can stop the keepalive mechanism??


I see that when an UA send a De-Registration SIP Message, the border 
proxy (i'm in a multi-proxy environment) continues to send the OPTIONS 
SIP messages, but I haven't a stop_nat_keepalive() function...


Thanks in advance
   MD


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


[OpenSIPS-Users] Dynamic Binding on ldap module

2009-09-15 Thread Juan Jose Lopez Juarez
Hi.

I'm trying to authenticate using dynamic bind to the ldap.

I've seen that the feature it is been requested on:

http://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2822174&group_id=232389

But it doesn't seem to have any progress.

Any idea if this functionality is going to be implemented?

-- 
Juan Jose Lopez Juarez
jua...@orcasitas.com
http://luy.orcasitas.com


Knowledge is knowing a tomato is a fruit; Wisdom is not putting it in
a fruit salad.

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


Re: [OpenSIPS-Users] opensips with asterisk => relay REGISTER

2009-09-15 Thread Bogdan-Andrei Iancu
In that example, Asterisk has nothing to do with AUTH.
1) opensips get the REGISTER and sends back a challange
2) opensips get the REGISTER with credentials
3) opensips does the auth and forwards the REGISTER to *

Regards,
Bogdan

Uwe Kastens wrote:
> Hello Bogdan,
>
> Thank you for the example. In that case the asterisk have to accept the
> registration without starting a auth itself?
>
> BR
>
> Uwe
>
>
> Bogdan-Andrei Iancu schrieb:
>   
>> Hi Uwe,
>>
>> If you look at the default opensips script, you have a section (by 
>> default commented out) where the REGISTER requests are authenticated and 
>> if passing the auth doing save("location").
>>
>> What you have to do is, after the REGISTER auth, instead of pushing the 
>> REGISTER to the local registrar (via save()), simply forward it further 
>> to Asterisk:
>>
>>
>>  if (is_method("REGISTER"))   {
>> # authenticate the REGISTER requests
>> if (!www_authorize("", "subscriber")) {
>> www_challenge("", "0");
>> exit;
>> }
>>
>> if (!check_to()) {
>> sl_send_reply("403","Forbidden auth ID");
>> exit;
>> }
>>
>> # auth done -> send it to registrar
>> consume_credentials();
>> $du = "sip:ASTERISK_IP:ASTERISK_PORT";
>> t_relay();
>>
>> exit;
>> }
>>
>>
>> Regards,
>> Bogdan
>>
>>
>> Uwe Kastens wrote:
>> 
>>> Hello,
>>>
>>> Has anybody a starting point for me to achieve the following:
>>>
>>> UAC should register with asterisk put should be "pre-authorized" with
>>> opensips. I saw an EMail from Bogdan, that this should be possible but
>>> ATM I could only use opensips as a registrar or route all sip messages
>>> through opensips.
>>>
>>> Anyone has maybe a hint where to start or maybe an example?
>>>
>>> BR
>>>
>>> Uwe
>>>
>>>   
>>>   
>> ___
>> 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] opensips with asterisk => relay REGISTER

2009-09-15 Thread Uwe Kastens
Hello Bogdan,

Thank you for the example. In that case the asterisk have to accept the
registration without starting a auth itself?

BR

Uwe


Bogdan-Andrei Iancu schrieb:
> Hi Uwe,
> 
> If you look at the default opensips script, you have a section (by 
> default commented out) where the REGISTER requests are authenticated and 
> if passing the auth doing save("location").
> 
> What you have to do is, after the REGISTER auth, instead of pushing the 
> REGISTER to the local registrar (via save()), simply forward it further 
> to Asterisk:
> 
> 
>  if (is_method("REGISTER"))   {
> # authenticate the REGISTER requests
> if (!www_authorize("", "subscriber")) {
> www_challenge("", "0");
> exit;
> }
>
> if (!check_to()) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> 
> # auth done -> send it to registrar
> consume_credentials();
> $du = "sip:ASTERISK_IP:ASTERISK_PORT";
> t_relay();
> 
> exit;
> }
> 
> 
> Regards,
> Bogdan
> 
> 
> Uwe Kastens wrote:
>> Hello,
>>
>> Has anybody a starting point for me to achieve the following:
>>
>> UAC should register with asterisk put should be "pre-authorized" with
>> opensips. I saw an EMail from Bogdan, that this should be possible but
>> ATM I could only use opensips as a registrar or route all sip messages
>> through opensips.
>>
>> Anyone has maybe a hint where to start or maybe an example?
>>
>> BR
>>
>> Uwe
>>
>>   
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586

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


Re: [OpenSIPS-Users] b2bua top hiding + authentication

2009-09-15 Thread Jeff Pyle
Hi Bogdan,

I had tried both.  I'm compiling the latest 1.6; when that completes I'll
try again.  Which way is recommended?

I have a functioning configuration otherwise.  If I simply want topology
hiding between the UAC and UAS, it is as simple as invoking the b2bua at
some point and the rest will simply work as it did previously?  or am I
missing something?


- Jeff



On 9/15/09 11:03 AM, "Bogdan-Andrei Iancu"  wrote:

> Hi Jeff,
> 
> How are the auth and b2bua chained ? you first do auth and after that
> invoke the b2bua ? or?
> 
> Regards,
> Bogdan
> 
> Jeff Pyle wrote:
>> Hello,
>> 
>> What impact does authentication have on the b2bua modules?  When I put
>> b2b_init_request("top hiding") into my otherwise functioning script, very
>> strange things happen.
>> 
>> In order to achieve topology hiding, is it as simple as inserting this init
>> line at some point, or is there more to it?
>> 
>> 
>> - Jeff
>> 
>> 
>> ___
>> 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] b2bua top hiding + authentication

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Jeff,

How are the auth and b2bua chained ? you first do auth and after that 
invoke the b2bua ? or?

Regards,
Bogdan

Jeff Pyle wrote:
> Hello,
>
> What impact does authentication have on the b2bua modules?  When I put
> b2b_init_request("top hiding") into my otherwise functioning script, very
> strange things happen.
>
> In order to achieve topology hiding, is it as simple as inserting this init
> line at some point, or is there more to it?
>
>
> - Jeff
>
>
> ___
> 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] opensips with asterisk => relay REGISTER

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Uwe,

If you look at the default opensips script, you have a section (by 
default commented out) where the REGISTER requests are authenticated and 
if passing the auth doing save("location").

What you have to do is, after the REGISTER auth, instead of pushing the 
REGISTER to the local registrar (via save()), simply forward it further 
to Asterisk:


 if (is_method("REGISTER"))   {
# authenticate the REGISTER requests
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
}
   
if (!check_to()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}

# auth done -> send it to registrar
consume_credentials();
$du = "sip:ASTERISK_IP:ASTERISK_PORT";
t_relay();

exit;
}


Regards,
Bogdan


Uwe Kastens wrote:
> Hello,
>
> Has anybody a starting point for me to achieve the following:
>
> UAC should register with asterisk put should be "pre-authorized" with
> opensips. I saw an EMail from Bogdan, that this should be possible but
> ATM I could only use opensips as a registrar or route all sip messages
> through opensips.
>
> Anyone has maybe a hint where to start or maybe an example?
>
> BR
>
> Uwe
>
>   


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


Re: [OpenSIPS-Users] Voicemail doesn't work with Mediaproxy

2009-09-15 Thread osiris123d

Thanks for the extra info.





Bogdan-Andrei Iancu wrote:
> 
> Hi Duane,
> 
> In opensips 1.5.x, the usage of append_branch is slightly different than 
> before. Actually its usage from failure_route was aligned  to the usage 
> from request route.
> 
> See: http://www.opensips.org/Resources/DocsMigration14to15
>   http://www.opensips.org/Resources/DocsMigration14to15#toc4
> 
> Regards,
> Bogdan
> 
> Duane Larson wrote:
>> I am running OpenSIPS version 1.5.1
>>  
>> I am sure I found the append_branch command from someone's code I 
>> found online.
>>  
>> I did have voicemail working to where there was two-way audio.  I 
>> thought I had solved everything, but then I came back from the weekend 
>> holiday, tried to make a call between two natted devices and noticed 
>> that I had broken that.  I forget what I did to make voicemail work, 
>> but I will try and find out again.  I will do like you say and make 
>> sure I am placing "use_media_proxy" in all the proper routes.  I will 
>> post once I figure it out.  I hate it when people on this mailing list 
>> figure it out and all the post is "Fixed it" without mentioning what 
>> they did.
>>
>> On Thu, Sep 10, 2009 at 5:35 PM, Thomas Gelf > > wrote:
>>
>> osiris123d wrote:
>> > I am trying to use fix_nated_sdp("3", "ip of mediaproxy"0), but
>> I am sure I
>> > am placing it and using it in the wrong spot in my script.
>>
>> Don't do that. If you are using fix_nated_sdp together with
>> mediaproxy,
>> you will for sure mess up something. Calling "use_media_proxy" in
>> your
>> INVITE route, your reply route and also for your in-dialog ReINVITES
>> will automagically fix your SDP.
>>
>> > failure_route[1] {
>> >   ...
>> >   append_branch();
>>
>> What OpenSIPS version are you using? In recent versions append_branch
>> is not needed here.
>>
>> Best regards,
>> Thomas Gelf
>>
>> --
>>  mail: tho...@gelf.net 
>>  web: http://thomas.gelf.net/
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org 
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>
>> -- 
>> --
>> *--*--*--*--*--*
>> Duane
>> *--*--*--*--*--*
>> --
>> 
>>
>> ___
>> 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
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Voicemail-doesn-t-work-with-Mediaproxy-tp3618910p3649506.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] RTP traffic opensips

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Jonathan,

Jonathan González wrote:
> Hi there,
>
> I have been configuring OpenSIPS for a while the last 2 days and I 
> have been able to configure a simple server that register clients 
> against a Database. The problem I am facing is that when the call is 
> established there's no Audio. I can see RTP traffic from one client to 
> the SIP Proxy and from the other client to the SIP Proxy. On the 
> server where opensips is running I can see both RTP traffics but 
> nothing goes from OpenSIPS to the clients.
Strange , as the RTP goes directly between the end points bypassing the 
proxy - are by mistake using some functions from nathelper or mediaproxy 
to alter the SDP content?
>
> The configuration I am using is the the one that comes with the 
> installation, changed to support mysql. I have followed this tutorial 
> http://www.voip-info.org/wiki/view/Opensips+Installation,+How+to.
h, I cannot find this pageI was looking to see if I can work a 
bit on it ;)
>
> As far as I understand, OpenSIPS should act as SIP proxy so RTP 
> traffic should be between clients.
That is correct.

Regards,
Bogdan
>
> Any help would be apprecieted.
>
> Thanks in advance,
> Jonathan
>
> -- 
> Personal webpage - www.jonbaraq.eu
> 
>
> ___
> 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] Dynamic Routing - routing using source IPaddress

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Julien,

Julien Chavanton wrote:
> Thank you, I will look further after using group, I am also facig some 
> requirements to append prefix, when a call comes in from a defined 
> Gateway.
> Here is a recap, of what I understand after reading testing Dynamic 
> Routing :
>  
> When a call is comming from a given Gateway we can not use Dynamic 
> Routing to append/strip prefixes, DR module only work on destination 
> Gateway.
well, you can do it, but only if the source is also a GW defined in DR 
module. See the is_from_gw() function:
  
http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id272680

Regards,
Bogdan



>  
> Therefore I selected to use Dial Plan for append/strip prefix on 
> inbound calls.
>  
>  
> Outbound number manipulation prefix append/strip : module (Dynamic 
> Routing)
> 
> "STRIP" : striped from the RURI when the call is going to the target 
> gateway
> "PRI Prefix" : assigned to the RURI when the call is going to the 
> target gateway
>  
>  
> Inbound number manipulation prefix append/strip : module (Dial Plan)
> --
> Prefix : a lookup in the dialplan table for the source IP address will 
> return a prefix to append if any
>  
> Example:
>  # find if there is a prefix for traffic from the IP address
>  dp_translate("0", "$src_ip/$avp(s:prefix)");
>  if($avp(s:prefix) && method=="INVITE" && !has_totag()){
>   xlog("prefix for IP[$src_ip]=[$avp(s:prefix)]\n");
>   $rU  =  $avp(s:prefix) + $rU ;
>  }
>  else{
>   xlog("no prefix for IP[$src_ip]\n");
>  }
>  
>
> 
> *From:* users-boun...@lists.opensips.org on behalf of Brett Nemeroff
> *Sent:* Thu 10/09/2009 4:18 PM
> *To:* OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Dynamic Routing - routing using source 
> IPaddress
>
> Usually you set the group based on something else. I use memcache for 
> this.. so I toss the IP against memcache, which returns a group id, 
> then I use that in the do_routing() cmd. 
>
> Of course, this requires pre-populating the cache src_ip => group_id
>
> The newly released startup_route can do that for you now. :D
>
> -Brett
>
>
> On Thu, Sep 10, 2009 at 8:00 AM, Julien Chavanton  > wrote:
>
> With Dynamic Routing, how can we route based on source IP
> address/Gateway ?
>
> ___
> 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] Voicemail doesn't work with Mediaproxy

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Duane,

In opensips 1.5.x, the usage of append_branch is slightly different than 
before. Actually its usage from failure_route was aligned  to the usage 
from request route.

See: http://www.opensips.org/Resources/DocsMigration14to15
  http://www.opensips.org/Resources/DocsMigration14to15#toc4

Regards,
Bogdan

Duane Larson wrote:
> I am running OpenSIPS version 1.5.1
>  
> I am sure I found the append_branch command from someone's code I 
> found online.
>  
> I did have voicemail working to where there was two-way audio.  I 
> thought I had solved everything, but then I came back from the weekend 
> holiday, tried to make a call between two natted devices and noticed 
> that I had broken that.  I forget what I did to make voicemail work, 
> but I will try and find out again.  I will do like you say and make 
> sure I am placing "use_media_proxy" in all the proper routes.  I will 
> post once I figure it out.  I hate it when people on this mailing list 
> figure it out and all the post is "Fixed it" without mentioning what 
> they did.
>
> On Thu, Sep 10, 2009 at 5:35 PM, Thomas Gelf  > wrote:
>
> osiris123d wrote:
> > I am trying to use fix_nated_sdp("3", "ip of mediaproxy"0), but
> I am sure I
> > am placing it and using it in the wrong spot in my script.
>
> Don't do that. If you are using fix_nated_sdp together with
> mediaproxy,
> you will for sure mess up something. Calling "use_media_proxy" in your
> INVITE route, your reply route and also for your in-dialog ReINVITES
> will automagically fix your SDP.
>
> > failure_route[1] {
> >   ...
> >   append_branch();
>
> What OpenSIPS version are you using? In recent versions append_branch
> is not needed here.
>
> Best regards,
> Thomas Gelf
>
> --
>  mail: tho...@gelf.net 
>  web: http://thomas.gelf.net/
>
>
> ___
> Users mailing list
> Users@lists.opensips.org 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> -- 
> --
> *--*--*--*--*--*
> Duane
> *--*--*--*--*--*
> --
> 
>
> ___
> 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] IPv6 SIP URI in Dispatcher List (destination set)

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Alain,

I did a small fix on the SVN in regards to dealing with IPv6 IP 
addresses in the dispatcher module. According to my tests, it should 
work now.

So, please update from SVN and give it a try.

Thanks for report and regards,
Bogdan

alain bernard wrote:
> Folks,
>
> We are using dispatcher module for load balancing for a while with 
> IPv4.  Now, we are moving to IPv6, we would like to use these features 
> again. However, by specifying IPv6 SIP URI in the dispatcher.list for 
> the destination host, the URI can't be resolved. Below is the debug log.
>
> A simple destination set in dispatcher.list is:
>
> 1 sip:[2001:430:1403:3::1]:5081
> 1 sip:[2001:430:1403:3::2]:5082
>
> We tried other IPv6 SIP URI syntaxes without success.
>
> Any thoughts how to solve this issue or how to use IPv6 SIP URI in 
> dispatcher.list for destination hosts/set.
>
> Regards,
>
> Alain
>
> -
>
> Sep 11 06:58:04 [32571] INFO:core:init_tcp: using epoll_lt as the TCP 
> io watch method (auto detected)
> [r...@pctest opensips]# Sep 11 06:58:04 [32573] NOTICE:core:main: 
> version: opensips 1.5.2-notls (i386/linux)
> Sep 11 06:58:04 [32573] INFO:core:main: using 32 Mb shared memory
> Sep 11 06:58:04 [32573] INFO:core:main: using 1 Mb private memory per 
> process
> Sep 11 06:58:04 [32573] NOTICE:signaling:mod_init: initializing module ...
> Sep 11 06:58:04 [32573] INFO:sl:mod_init: Initializing StateLess engine
> Sep 11 06:58:04 [32573] INFO:tm:mod_init: TM - initializing...
> Sep 11 06:58:04 [32573] INFO:maxfwd:mod_init: initializing...
> Sep 11 06:58:04 [32573] INFO:usrloc:ul_init_locks: locks array size 512
> Sep 11 06:58:04 [32573] INFO:registrar:mod_init: initializing...
> Sep 11 06:58:04 [32573] INFO:textops:mod_init: initializing...
> Sep 11 06:58:04 [32573] INFO:xlog:mod_init: initializing...
> Sep 11 06:58:04 [32573] INFO:acc:mod_init: initializing...
> Sep 11 06:58:04 [32573] ERROR:dispatcher:add_dest2list: could not 
> resolve [2001:430:1403:3::1]
> Sep 11 06:58:04 [32573] ERROR:dispatcher:mod_init: no dispatching list 
> loaded from file
> Sep 11 06:58:04 [32573] ERROR:core:init_mod: failed to initialize 
> module dispatcher
> Sep 11 06:58:04 [32573] ERROR:core:main: error while initializing modules
>
>
>
>
> 
>
> ___
> 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 using LDAP attribute with MD5 hash.

2009-09-15 Thread Bogdan-Andrei Iancu
Hello João,


João Antunes wrote:
> Hi!
>
> I would like to know if it's possible to use the LDAP module along with
> the AUTH module to use LDAP for authenticating SIP users. Of course that
> an attribute with the MD5 hash is needed in the LDAP, but i already have
> that.
>   
yes, you can have either raw text password,  either the pre-calculated 
HA1 (MD5).
> My preliminary research points me in the direction of making a query
> with the LDAP code to retrieve the hash and then use some function of
> AUTH like pv_www_authorize
> (http://www.opensips.org/html/docs/modules/1.5.x/auth.html#id271238)
> where the $vars were set through the query to the LDAP. Also I think i
> would have to set the parameter calculate_ha1
> (http://www.opensips.org/html/docs/modules/1.5.x/auth.html#id228275) not
> to calculate the ha1 as it's possible to use the hash as it is straight
> from the LDAP query. Am I right about this?

yes, that is perfectly correct.
>  I figured that there should
> be already lots of people that implemented or tried to implement LDAP
> authentication with OPENSIPS without the need to use RADIUS, so here are
> my questions:
>
> Are the previous assumptions correct?
>   
yes
> Is it possible to do LDAP authentication with OpenSIPS without the use
> of the RADIUS server?
if you do LDAP,why should you need RADIUS? the ldap support in OpenSIPS 
can directly connect to a LDAP server.
>  is it convenient to do so? is there some kind of
> catch for me not to have found anything related with that kind of direct
> authentication (without the use of RADIUS) with LDAP?
>   
maybe because it is not such a complicated thing :) (as you discover by 
yourself)
> Is this a good way to do this?
> Am I missing something on what i need to do, would that suffice, is
> there some kind of documentation, webpage, mail thread anybody can point
> me to?
>   
for simple auth purposes, I think you already found all the info.

You might find useful the tutorial on auth with memcaching - there is an 
example of how to use the pv_auth function:
 http://www.opensips.org/Resources/DocsTutMemcache

Regards,
Bogdan
>
> Thanks in advance,
> João Antunes
>
>
> ___
> 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] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Iñaki Baz Castillo
2009/9/15 Bogdan-Andrei Iancu :
>> So in case time selection is null in botrules, priority mechanism
>> doesn't matter, right?
>> If so, I suggest to explain it in the documentation, as I couldn't
>> understand it after several reads :)
>>
>
> Let me tell you a joke:
>  Q: "What do engineers and dogs have in common ? "
>  A: "They both have an intelligent eyes/look, but none of them can
> express themselves"

XD



>> Yes, but if all the gws in a rule (prio 10) fail (so "use_next_gw"
>> returns false) then this rule (or its gws) would be automatically
>> included in a blacklist, so if then I call again
>> "do_routing(SAME_GROUPID)" then the next rule (minor priority) would
>> be taken, am I right?
>>
> yes, make sense - probably we can add it for 1.7 for 1.6 is a bit
> too late.

Ops, I expected that was the current and already implemented behaviour !

Ok, thanks.


-- 
Iñaki Baz Castillo


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


Re: [OpenSIPS-Users] CANCEL handling in 1.6

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Jeff,

I just run a fast CANCEL test (made a call and cancelled it) and it 
looks ok (using the default opensips script).

If the update did not fix your issue, just let me know.

Regards,
Bogdan

Jeff Pyle wrote:
> Hi Bogdan,
>
>
> On 9/15/09 2:39 AM, "Bogdan-Andrei Iancu"  wrote:
>
>   
>> so you actually do not get any CANCEL in your script? do you see it at
>> network level getting to your server? also tried to place some xlog  in
>> the very beginning of the script?
>> 
>
> Right.  I had something like this at the very beginning:
>   xlog("L_INFO", "Top - M=$rm\n");
>
> and I never saw the cancels.  I did see them entering the interface with
> ngrep.
>
>   
>> even if thers is no CANCEL related, try upgrading to the latest SVN.
>> 
>
> That would make sense.  My problem is the dev box for this project is an old
> Ultrasparc-III and it takes 45 minutes to make the deb packages.  :/  Once I
> finish whining I will do exactly as you suggest.
>
>
> - Jeff
>
>
>
>
> ___
> 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] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Bogdan-Andrei Iancu
Iñaki Baz Castillo wrote:
> 2009/9/15 Bogdan-Andrei Iancu :
>   
>> Hi Iñaki,
>>
>> priority applies only to rules that overlap - this can happens only when
>> time selection is used for the rules:
>>
>> Ex: RULE1:  for prefix 1234, all the time,  use GW1, prio =1
>>  RULE2:  for prefix 1234, during weekend, use GW1, prio = 4
>>
>> Here the rules will overlap during the weekend - they both match; in
>> this interval, the highest priority rule will be used.
>>
>> The priority mechanism is used exclusively for this case.
>> 
>
> So in case time selection is null in botrules, priority mechanism
> doesn't matter, right?
> If so, I suggest to explain it in the documentation, as I couldn't
> understand it after several reads :)
>   

Let me tell you a joke: 
  Q: "What do engineers and dogs have in common ? "
  A: "They both have an intelligent eyes/look, but none of them can 
express themselves"

So, I will try to re-work the explanation there.

>
>   
>> The module does not do any rule fallback - once a rule is match, it will
>> use only the destination from the rules and it will not try to re-match
>> a different rule.
>> 
>
> Yes, but if all the gws in a rule (prio 10) fail (so "use_next_gw"
> returns false) then this rule (or its gws) would be automatically
> included in a blacklist, so if then I call again
> "do_routing(SAME_GROUPID)" then the next rule (minor priority) would
> be taken, am I right?
>   
yes, make sense - probably we can add it for 1.7 for 1.6 is a bit 
too late.


Best regards,
Bogdan



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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Iñaki Baz Castillo
2009/9/15 Bogdan-Andrei Iancu :
> The module does not support native weight, but you can simulate it (with
> order 1) :
>  RULE1  -> GW: gw1,gw1,gw2,gw2,gw2
>
> this will give you a 40% 60% distribution for the first selected GW from
> the set.

ok, it's enough for my needs :)


-- 
Iñaki Baz Castillo


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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Iñaki Baz Castillo
2009/9/15 Bogdan-Andrei Iancu :
> Hi Iñaki,
>
> priority applies only to rules that overlap - this can happens only when
> time selection is used for the rules:
>
> Ex: RULE1:  for prefix 1234, all the time,  use GW1, prio =1
>      RULE2:  for prefix 1234, during weekend, use GW1, prio = 4
>
> Here the rules will overlap during the weekend - they both match; in
> this interval, the highest priority rule will be used.
>
> The priority mechanism is used exclusively for this case.

So in case time selection is null in botrules, priority mechanism
doesn't matter, right?
If so, I suggest to explain it in the documentation, as I couldn't
understand it after several reads :)


> The module does not do any rule fallback - once a rule is match, it will
> use only the destination from the rules and it will not try to re-match
> a different rule.

Yes, but if all the gws in a rule (prio 10) fail (so "use_next_gw"
returns false) then this rule (or its gws) would be automatically
included in a blacklist, so if then I call again
"do_routing(SAME_GROUPID)" then the next rule (minor priority) would
be taken, am I right?


Thanks a lot.


-- 
Iñaki Baz Castillo


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


Re: [OpenSIPS-Users] CANCEL handling in 1.6

2009-09-15 Thread Jeff Pyle
Hi Bogdan,


On 9/15/09 2:39 AM, "Bogdan-Andrei Iancu"  wrote:

> so you actually do not get any CANCEL in your script? do you see it at
> network level getting to your server? also tried to place some xlog  in
> the very beginning of the script?

Right.  I had something like this at the very beginning:
  xlog("L_INFO", "Top - M=$rm\n");

and I never saw the cancels.  I did see them entering the interface with
ngrep.

> even if thers is no CANCEL related, try upgrading to the latest SVN.

That would make sense.  My problem is the dev box for this project is an old
Ultrasparc-III and it takes 45 minutes to make the deb packages.  :/  Once I
finish whining I will do exactly as you suggest.


- Jeff




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


[OpenSIPS-Users] Problem with Routing (extension -> opensips -> isp)

2009-09-15 Thread Sheran Corera
Hi,

I am trying to use my opensips application to work as a router whereby
extensions would be registered in my opensips box and the REGISTER
request would be forwarded to my ISP. If the ISP is down it would
connect to a secondary ISP. So essentially what I am trying to do is
route the REGISTER messages of a given extension to multiple ISPs..

Currently what I have done is this in my opensips.cfg file is this

route{

    if (!mf_process_maxfwd_header("10")) {
    sl_send_reply("483","Too Many Hops");
    exit;
    }

    if (src_ip == 192.168.7.48) {

    #remove misleading CONTACT header line
    remove_hf("Contact");
    #remove UTF-8 information, as * is not able to process
it properly
    subst("/^(CONTENT-TYPE:.*);[ ]*charset=utf-8(.*)/\1\2/");
    #relay request to

#relay register to server 1
    if (!t_relay("udp:192.168.15.41:5060")) {
    xlog("LOG: Goto asterisk  \n");
    sl_reply_error();
    }

#relay register to server 2
if (!t_relay("udp:192.168.15.42:5060")) {
xlog("LOG: Goto asterisk  \n");
sl_reply_error();
}
 }
}

so that registrations are now forwarded to the relay point (for
testing purposes i have setup 2 asterisk installations). This works
fine but asterisk registers the extension with the opensips domain.
How do I change the domain part so that opensips passes the src_ip
(the ip of the extension) to asterisk (external ISP) instead? (so that
I would be able to register the extension on multiple ISPs and switch
between them when i want without having to re register each time and
the ISP would be able to communicate with the local extension to passs
incoming calls directly to it)

An alternative solution would be to make my opensips to work as an
inbound server but that seems quite complicated. The help given is
very much appreciated.

Cheers..
Sheran

P.S - Sorry for the capitals..

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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Bogdan-Andrei Iancu
Iñaki Baz Castillo wrote:
> 2009/9/14 Iñaki Baz Castillo :
>   
>> 2009/9/14 Iñaki Baz Castillo :
>> 
>>> In my example call the rule 1 is choosen (since it has highest prioriry).
>>> Gateways 1 and 2 fail (reply 503 code) and there is no more failover, this 
>>> is:
>>> servers 3 and 4 are not tryed, is it the expected behaviour?
>>>   
>> After more testing I cannot get it working (just the rule with highest
>> priority is retrieved) so why does "priority" field exist?
>>
>> Also, I fail to understand how could I configure a balancing system
>> with different weight, something as:
>>
>>  gw1 => 60%
>>  gw2 => 40%
>>
>> The only I can get is a 50% distribution by setting gw1 and gw2 in a
>> dr_rule (and selecting "order" != 0).
>> 
>
> Drouting modules is, theorically, more powerful than LCR module, but
> the fact is I can't do a simple weight balancing (60% - 40%) as I
> explained above.
> Do I miss something?
>
> Any help please?
>   
Sorry for delay - I was caught with Andrei, for the last 3 hours in a 
debugging and fixing of TM module - some race condition in 
retransmission algorithm.

Please see my previous email.

Regards,
Bogdan


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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Iñaki,

Iñaki Baz Castillo wrote:
> 2009/9/14 Iñaki Baz Castillo :
>   
>> In my example call the rule 1 is choosen (since it has highest prioriry).
>> Gateways 1 and 2 fail (reply 503 code) and there is no more failover, this 
>> is:
>> servers 3 and 4 are not tryed, is it the expected behaviour?
>> 
>
> After more testing I cannot get it working (just the rule with highest
> priority is retrieved) so why does "priority" field exist?
>
> Also, I fail to understand how could I configure a balancing system
> with different weight, something as:
>
>   gw1 => 60%
>   gw2 => 40%
>
> The only I can get is a 50% distribution by setting gw1 and gw2 in a
> dr_rule (and selecting "order" != 0).
>   
The module does not support native weight, but you can simulate it (with 
order 1) :
 RULE1  -> GW: gw1,gw1,gw2,gw2,gw2

this will give you a 40% 60% distribution for the first selected GW from 
the set.

Regards,
Bogdan

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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Bogdan-Andrei Iancu
Hi Iñaki,

priority applies only to rules that overlap - this can happens only when 
time selection is used for the rules:

Ex: RULE1:  for prefix 1234, all the time,  use GW1, prio =1
  RULE2:  for prefix 1234, during weekend, use GW1, prio = 4

Here the rules will overlap during the weekend - they both match; in 
this interval, the highest priority rule will be used.

The priority mechanism is used exclusively for this case.

The module does not do any rule fallback - once a rule is match, it will 
use only the destination from the rules and it will not try to re-match 
a different rule.

Regards,
Bogdan

Iñaki Baz Castillo wrote:
> Hi, I'm trying to figure if it makes sense and it's possible to set various 
> entries in 'dr_rules' table with same 'groupid' but different 'priority' so 
> after trying all the gateways in the rule with highest priority, the gateways 
> in the second rule would be tryed.
>
> However it seems that I'm wrong since it doesn't work. Just the rule with 
> highest priority is taken (and all its configured gateways or list of 
> gateways).
>
> In the doc I read:
>
> --
> 1.1.5. Routing Rule Processing
>
> within the set of rules is applied the time criteria, and the rule which has 
> the highest priority and matches the time criteria is selected to drive the 
> routing.
> --
>
> But it doesn't work for me. I've two rules:
>
> rule 1:
> - groupid = 1
> - priority = 10 (highest)
> - gwlist = 1,2
>
> rule 2:
> - groupid = 1
> - priority = 5
> - gwlist = 3,4
>
>
> Then in the script I do:
>
>   do_routing("1");
>   t_relay();
>
> and in failure route:
>   if t_check_status("408|503") {
> use_next_gw();
> t_relay();
>   }
>
>
> In my example call the rule 1 is choosen (since it has highest prioriry). 
> Gateways 1 and 2 fail (reply 503 code) and there is no more failover, this 
> is: 
> servers 3 and 4 are not tryed, is it the expected behaviour?
>
>
> Thanks.
>
>
>   


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


Re: [OpenSIPS-Users] drouting: varios entries in 'dr_rules' with some "groupid', not possible?

2009-09-15 Thread Iñaki Baz Castillo
2009/9/14 Iñaki Baz Castillo :
> 2009/9/14 Iñaki Baz Castillo :
>> In my example call the rule 1 is choosen (since it has highest prioriry).
>> Gateways 1 and 2 fail (reply 503 code) and there is no more failover, this 
>> is:
>> servers 3 and 4 are not tryed, is it the expected behaviour?
>
> After more testing I cannot get it working (just the rule with highest
> priority is retrieved) so why does "priority" field exist?
>
> Also, I fail to understand how could I configure a balancing system
> with different weight, something as:
>
>  gw1 => 60%
>  gw2 => 40%
>
> The only I can get is a 50% distribution by setting gw1 and gw2 in a
> dr_rule (and selecting "order" != 0).

Drouting modules is, theorically, more powerful than LCR module, but
the fact is I can't do a simple weight balancing (60% - 40%) as I
explained above.
Do I miss something?

Any help please?



-- 
Iñaki Baz Castillo


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


Re: [OpenSIPS-Users] OpenSIPS maximum performance in a multiprocessor machine (SMP)

2009-09-15 Thread Bogdan-Andrei Iancu
Italo Dacosta wrote:
>> Ok - that's the first problem. Number of children == number of
>> processes. You cannot handle more than 4 messages at one time right
>> now.
>> 
>
> I forgot to mention that I tested with several number of children
> already. Surprisingly, increasing the number of processes seems to
> reduce performance. With 8 children processes the maximum call rate I
> measured was around 17,000 cps. I think that the performance is lower
> due to the overheads associated with context switching.
>   
Here there is a whole theory.

Starting first with the concept of parallel computation: ideally you 
assume an application has an 100% of parallelism (if you have a core, 
you get a performance of N, if you have X cores, you get a performance 
of X*N) - in reality, most of the application have a much lower degree 
of parallelism, mainly due shared data, access on common resources 
(sockets), synchronization between processes, etc .

So, the first conclusion we can have is that, for an ideal application, 
it is enough to have to a number of procs equal with the number of cores 
you have on the machine.


Now, second part is about the CPU computation ops via I/O blocking ops - 
the above conclusion is correct as time as the application is doing pure 
computation (no I/O). Once the app starts doing I/O, you have wait time 
in kernel, rescheduling - more or less "dead time" from your application 
point of view. In practice, this "dead time" can be compensated by a 
higher number of processes. For ex. while a process is blocked in doing 
some DB I/O, and blocking DNS query, etc, another process may use the 
CPU and do some non-I/O ops.

So, the second conclusion is that you should increase the number of 
procs directly proportional with the degree of I/Os performed by your app.



In your particular case, the I/O delay is low - you do not use DNS, no 
DB module, etc - only I/O is on the network sockets where the sharing of 
these sockets between the procs is done by kernel.

Regards,
Bogdan


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