Re: [OpenSIPS-Users] Location table info

2010-08-01 Thread Premalatha Kuppan
Thats what i was thinking too...i dono whether it can be done at
opensips.cfg file level or code level ?

On Mon, Aug 2, 2010 at 2:38 AM, Bogdan-Andrei Iancu
wrote:

> Hi Premalatha,
>
> What about using DB triggers on DELETE event (on location table) to
> delete the record in your table also ?
>
> Regards,
> Bogdan
>
> Premalatha Kuppan wrote:
> > Hi Bogdan,
> >
> > I have a question on location table.
> >
> > I have added a table to OPENSIPS DB. This table entry should get
> > deleted when the corresponding entries in location table is deleted.
> >
> > say for example: user  is registerd and its info is stored in
> > location table. When it crashes, entries gets deleted from location
> > table, when this entry isn't found i have to delete that
> > corresponding entry from my created table.
> >
> > How to do this ?
> >
> > Thanks,
> > Premalatha
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] [NEW] OpenSIPS 1.6.3 major release is out

2010-08-01 Thread Bogdan-Andrei Iancu
Hello all,

OpenSIPS 1.6.3 is a major release and it is the second release following 
the new release policy .

1.6.3 release brings both new features / enhancement and a lot of fixes. 
The 1.6.3 contains several critical fixes in core and module, better 
integration of various functionalities (presence, dialog, etc) and new 
enhancements (like b2bua) - the listing with all additions and fixes is 
available under http://www.opensips.org/Main/Ver163.

Migration documentation (from 1.6.2 to 1.6.3) can be found under 
http://www.opensips.org/Resources/DocsMigration162to163

OpenSIPS 1.6.3 is now ready for download on project web site and SF 
download system.

The full Changelog is available under 
http://opensips.org/pub/opensips/1.6.3/src/ChangeLog

To get the OpenSIPS 1.6.3 version, see the Downloads page - 
http://www.opensips.org/Resources/Downloads


Enjoy,
Bogdan

-- 
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] proxy_authorize("","subscriber") bug ??

2010-08-01 Thread Pasan Meemaduma
Hi Bogdan,

I will try the modified auth route today and get back with results.

Thanks for the information.






From: Bogdan-Andrei Iancu 
To: OpenSIPS users mailling list 
Sent: Sunday, August 1, 2010 20:29:11
Subject: Re: [OpenSIPS-Users] proxy_authorize("","subscriber") bug ??

Hi Pasan,

Pasan Meemaduma wrote:
> Hi Bogdan,
>
> I'm bit confused.
>
> If I add t_newtran() as follow to by authentication route will it 
> affect the original INVITEs ?
no, it will not.
>
> There's no much details about t_newtran() function in documentation.
It just create the transaction
>
> will this function create a new transaction for retransmitted INVITEs 
> and allow to by pass the proxy_authorize("","subscriber")?
I advice you to read the SIP RFC3261 - all retransmissions of a request 
belong to the same transaction.
>
> will this affect the accounting anyway ?
no.

Regards,
Bogdan

>
> thanks
>
> 
> *From:* Bogdan-Andrei Iancu 
> *To:* OpenSIPS users mailling list 
> *Sent:* Thursday, July 29, 2010 15:26:47
> *Subject:* Re: [OpenSIPS-Users] proxy_authorize("","subscriber") bug ??
>
> Hi Pasan,
>
> Better try something like:
>
>
>   if (!allow_trusted()) {
> t_newtran();
> if (!proxy_authorize("","subscriber")) {
> if(!lookup("location") ){
> proxy_challenge("","0");
> exit;
> }
> } else if (!check_from()) {
> sl_send_reply("403", "Spoofed From-URI detected");
> xlog("L_INFO","Spoofed From-URI detected ! from --> $fu
> -- IP $si PORT:$sp");
> exit;
> }
> if(is_present_hf("Proxy-Authorization")){
> consume_credentials();
> }
> }
>
>
> the t_check_tran() function check is the transaction already exists (for
> retransmissions), but it is not creating the transaction.
>
> Best regards,
> Bogdan
>
>
> Pasan Meemaduma wrote:
> > Hi Bogdan,
> >
> > My authentication route is as follow,
> >
> >if (!allow_trusted()) {
> >  if (!proxy_authorize("","subscriber")) {
> >if(!lookup("location") ){
> >proxy_challenge("","0");
> >exit;
> >}
> >} else if (!check_from()) {
> >sl_send_reply("403", "Spoofed From-URI detected");
> >xlog("L_INFO","Spoofed From-URI detected ! from -->
> > $fu -- IP $si PORT:$sp");
> >exit;
> >}
> >if(is_present_hf("Proxy-Authorization")){
> >consume_credentials();
> >}
> >}
> >
> > This route is before the dispatch route (t_relay())
> > I think retransmitted INVITEs get block by this route so If I use the
> > t_check_trans()  as follow will I able to absorb the retransmitted
> > INVITE ?
> >
> >if (!allow_trusted()) {
> >  if (!proxy_authorize("","subscriber")) {
> >if(!lookup("location") && ! t_check_trans() ){
> >proxy_challenge("","0");
> >exit;
> >}
> >} else if (!check_from()) {
> >sl_send_reply("403", "Spoofed From-URI detected");
> >xlog("L_INFO","Spoofed From-URI detected ! from -->
> > $fu -- IP $si PORT:$sp");
> >exit;
> >}
> >if(is_present_hf("Proxy-Authorization")){
> >consume_credentials();
> >}
> >}
> >
> > modparam("auth", "disable_nonce_check", 1) setting this is not a good
> > idea i think.
> >
> > thanks
> >
> >
> > 
> > *From:* Pasan Meemaduma mailto:pasan...@ymail.com>>
> > *To:* OpenSIPS users mailling list  >
> > *Sent:* Monday, July 12, 2010 16:46:26
> > *Subject:* Re: [OpenSIPS-Users] proxy_authorize("","subscriber") bug ??
> >
> > Hi Bogdan,
> >
> > Thanks for the quick reply,
> >
> > What I now suspect is the security mechanism for stale nonces
> > introduced in later 1.4 causing this. The identical configuration
> > works fine with opensips 1.4
> >
> > This problem started to appear after I upgrade server from openser to
> > opensips about a month ago.
> >
> > Loosing registration is the most worst problem since its affecting
> > incoming calls.
> >
> > For the moment what I did was add the following in my opensips.cfg
> > after going through the mailing list archives.
> >
> >
> > modparam("auth", "disable_nonce_check", 1)
> >
> > As I understood opensips reject nonce which is used before even if it
> > send with correct credentials. This could be the problem that
> > Re-INVITEs get 407 .
> >
> > I can't do much changes to observe more debuging information like
> > setting set debug =6  as this is a production server.
> >
> > I'm going to apply the new setting modparam("auth",
> > "disable_nonce_check", 1) tomorrow on our offpeak time and see whether
> > it will resolve the problem.
> >
> > I'll get back to here

Re: [OpenSIPS-Users] Location table info

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Premalatha,

What about using DB triggers on DELETE event (on location table) to 
delete the record in your table also ?

Regards,
Bogdan

Premalatha Kuppan wrote:
> Hi Bogdan,
>  
> I have a question on location table.
>  
> I have added a table to OPENSIPS DB. This table entry should get 
> deleted when the corresponding entries in location table is deleted.
>  
> say for example: user  is registerd and its info is stored in 
> location table. When it crashes, entries gets deleted from location 
> table, when this entry isn't found i have to delete that 
> corresponding entry from my created table.
>  
> How to do this ?
>  
> Thanks,
> Premalatha
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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


[OpenSIPS-Users] Location table info

2010-08-01 Thread Premalatha Kuppan
Hi Bogdan,

I have a question on location table.

I have added a table to OPENSIPS DB. This table entry should get deleted
when the corresponding entries in location table is deleted.

say for example: user  is registerd and its info is stored in location
table. When it crashes, entries gets deleted from location table, when this
entry isn't found i have to delete that corresponding entry from my created
table.

How to do this ?

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


Re: [OpenSIPS-Users] Location info when using OpenSIPS as outbound proxy

2010-08-01 Thread Nauman Sulaiman
Hi Bogan

Thanks for the replies, we are basically registering with a third party 
provider and the save location on the Opensips isn't really to keep track of 
registration state, its just to keep track of the location of the UAC 
irrespective of whether its registered or not. 

we now have the following code in route(1) of sample script

if (method=="REGISTER")
{   
 xlog("saving AoR non local domain \n");

 if (!save("location","mr"))
 {
xlog("couldn't save location in route 1 \n");
sl_reply_error();
 }


if (!t_relay()) {
   sl_reply_error();
}

   exit;
}

we are not challenging the UAC if the domain is not the opensips proxy, we just 
let it go through and save location. We take it if you issue a challenge here 
you need a copy of the credentials of the UAC on the opensips proxy, as we will 
not have this, is the above valid?

--- On Sun, 1/8/10, Bogdan-Andrei Iancu  wrote:

> From: Bogdan-Andrei Iancu 
> Subject: Re: [OpenSIPS-Users] Location info when using OpenSIPS as outbound 
> proxy
> To: "OpenSIPS users mailling list" 
> Date: Sunday, 1 August, 2010, 19:14
> Hi Andrew,
> 
> what you are doing is dangerous :)
> 
> Even if the contacts+expires values will be properly
> extracted from the 
> reply, other data will be bogus, like:
>     - user agent
>     - socket info (only if you do change it
> before relaying the register)
>     - path info
>     - received value + branch flags (if some
> forking is done)
> 
> Regards,
> Bogdan
> 
> Andrew Pogrebennyk wrote:
> > On 01.08.2010 20:37, Bogdan-Andrei Iancu wrote:
> >   
> >> 2) ideally, for an outbound proxy, you should do
> the registration 
> >> processing at reply time, once the main registrar
> accepted the 
> >> registration and eventually made all the changes
> over it. But right 
> >> now 
> >> opensips does not accept registration processing
> for replies.
> >>     
> >
> > Just in case - some time ago I did something like:
> >
> > onreply_route[3] {
> >     # Here we handle REGISTER replies
> >     xlog("L_INFO", "[$mi] [$rs
> $rr]\n");
> >     if (status=~"200") {
> >         route(3);
> >     };
> >
> > route[3] {
> >     # workaround for location saving
> >     xlog("L_INFO", "saving
> location\n");
> >     save("location","0x02");
> > }
> >
> >
> > 0x02 - do not generate a SIP reply to the current
> REGISTER request.
> >
> >   
> 
> 
> -- 
> 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
> 


  

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


Re: [OpenSIPS-Users] TCP CONNECT ERROR;

2010-08-01 Thread Premalatha Kuppan
Still i couldn't make TCP to work. Iam using Opensips 1.6.2 (TLS) enabled.

But TLS is working. I wonder even for TLS; TC handshake is done and
certificate exchane is  successful and can make call.

But for TCP, i couldn't even register my client (Qjsimple) behind the NAT
with OPENSIPS. At client side iam getting 503 service unavailable.
But it works for PJSIPUA in same network without NAT.

What is that am i missing ?

I appreciate some help on this.

On Wed, Jul 28, 2010 at 5:47 AM, Premalatha Kuppan
wrote:

> Hi,
>
> Have you seen my cfg file ? I have tried fix_nat_contact() and
> fix_nat_register also...:(
>
> Am i missing anything ?
>
> /* uncomment the next line to disable TCP (default on) */
> disable_tcp=no
> tcp_children=10
> tcp_connect_timeout=1
> tcp_send_timeout=3
> tcp_accept_aliases=1
>
> # - registrar params -
> /* uncomment the next line not to allow more than 10 contacts per AOR */
> #modparam("registrar", "max_contacts", 10)
> modparam("registrar","tcp_persistent_flag",7)
> modparam("registrar", "received_avp", "$avp(s:rcv)")
>
> #---nathelper params --
> modparam("nathelper", "received_avp", "$avp(s:rcv)")
>
> Routing Logic:
>
> if (client_nat_test("3")) {
> xlog("CLIENT BEHIND NAT\n");
> if (method=="SUBSCRIBE")
> nat_keepalive();
> if (!has_totag()) {
> if (method=="REGISTER") {
> if (proto==UDP)
> nat_keepalive();
> else
> setflag(7);
> $avp(s:regrcv) = $source_uri;
> fix_nated_register();
> }
> else if (method=="INVITE") {
> nat_keepalive();
> fix_nated_contact();
> fix_nated_sdp("3");
> }
> }
> }
>
> if (is_method("REGISTER"))
> {
> xlog("REGISTER MESSAGE\n");
> xlog("$mb\n");
> # authenticate the REGISTER requests (uncomment to enable
> auth)
> if (!www_authorize("xxx", "subscriber"))
> {
> www_challenge("xx", "0");
> exit;
> }
>
> ###TCP ENABLED CLIENTS
>  if(proto==TCP)
>  {
>xlog("the SIP message was received over TCP\n");
>xlog("$(tu{uri.user})\n");
>force_tcp_alias();
>  }
>
>
> Thanks,
> Prem
>
>
>
> On Wed, Jul 28, 2010 at 2:44 PM, Premalatha Kuppan <
> premala...@ngintech.com> wrote:
>
>> Yes, i have checked. Have you seen my config file. Probably can you guide
>> me where its going wrong ?
>>
>>   On Wed, Jul 28, 2010 at 2:36 PM, Anca Vamanu  wrote:
>>
>>>   Hi,
>>>
>>> Have you  checked all the things that I told you in the first reply?
>>> Probably one of that is not matched and this is why it is not working.
>>>
>>>
>>> Regards,
>>>
>>> --
>>> Anca Vamanuwww.voice-system.ro
>>>
>>>
>>>
>>>  On 07/28/2010 10:01 AM, Premalatha Kuppan wrote:
>>>
>>> Can anyone please help me...
>>>
>>> On Wed, Jul 28, 2010 at 11:16 AM, Premalatha Kuppan <
>>> premala...@ngintech.com> wrote:
>>>
 Sorry forgot to attach the cfg file..attached now.


 On Wed, Jul 28, 2010 at 11:15 AM, Premalatha Kuppan <
 premala...@ngintech.com> wrote:

> Still call fails to TC P enabled clients.
>
> Please find my config file attached. I dono where iam doing mistake
> :(..please help
>
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER
> MESSAGE
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER
> sips:PUBLIC IP SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=14097453-6b37-4f1d-bb14-43
> Authorization: Digest username="408111", realm="PUBLIC IP",
> nonce="4c4fbe8500013046f7331a315fdc29e6f14851cbedd9", uri="sips:PUBLIC
> IP:5061 ",
> response="64375192e261bc5f3213bc6f56  ontent-Length:  0
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]:  contact
> expire= ;  header expire =300; contact uri=
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:57086;transport=tls
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: This is
> register, parsing values - 588aa6e4-2af1-4fc0-ad67-6e5c16681e771000;
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181;
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]:
> NORMAL-REGISTRATION
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: CLIENT BEHIND
> NAT
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: contact
> before update <
> >
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: via before
> update  ;rport;branch=z9hG4bKPj48764d96-c980-4584-aba4-2af5c6273165>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER
> MESSAGE
> Jul 28

[OpenSIPS-Users] Presence subscription show

2010-08-01 Thread Yaniv Vaknin

Hi,
Is there a way to see the current state/list of the subscription?
I use Opensips only as a subscribe/notify server, I know that I can check
the DB, but I noticed that even if I don't save the subscription state on
the DB, and I restart the server, It still hold the subscription state, How
can I watch it and is there a way to flush it ?

Yaniv
-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Presence-subscription-show-tp5361730p5361730.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] Location info when using OpenSIPS as outbound proxy

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Andrew,

what you are doing is dangerous :)

Even if the contacts+expires values will be properly extracted from the 
reply, other data will be bogus, like:
- user agent
- socket info (only if you do change it before relaying the register)
- path info
- received value + branch flags (if some forking is done)

Regards,
Bogdan

Andrew Pogrebennyk wrote:
> On 01.08.2010 20:37, Bogdan-Andrei Iancu wrote:
>   
>> 2) ideally, for an outbound proxy, you should do the registration 
>> processing at reply time, once the main registrar accepted the 
>> registration and eventually made all the changes over it. But right 
>> now 
>> opensips does not accept registration processing for replies.
>> 
>
> Just in case - some time ago I did something like:
>
> onreply_route[3] {
>   # Here we handle REGISTER replies
>   xlog("L_INFO", "[$mi] [$rs $rr]\n");
>   if (status=~"200") {
>   route(3);
>   };
>
> route[3] {
>   # workaround for location saving
>   xlog("L_INFO", "saving location\n");
>   save("location","0x02");
> }
>
>
> 0x02 - do not generate a SIP reply to the current REGISTER request.
>
>   


-- 
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] Load Balancer

2010-08-01 Thread Rajib Deka
Thanks a lot Bogdan.

My another question, will 1 sec time interval in RATELIMIT lead to
performance issue?

Regards
Rajib

On Sun, Aug 1, 2010 at 11:34 PM, Bogdan-Andrei Iancu  wrote:

> Hi Rajib,
>
> the load of each trunk is calculated each time the "load_balance()"
> function is called -> the load is a higly dynamic info and needs to be
> evaluated each time load balancing needs to be done. There is no way to
> cache/store any info related to previous less loaded trunk.
>
> Anyhow 100+ trunks does not mean a lot ;)
>
> Regards,
> Bogdan
>
> Rajib Deka wrote:
> > Thanks Bogdan.
> > I know that OpenSIPS will store the state info in memory. My question
> > is, Suppose I have 100 trunks as destination in memory to load balance
> > with different state info, so  when a new call (INVITE) comes to
> > OpenSIPS, will OpenSIPS go through all the 100 trunk's state info to
> > choose the least loaded one or it has some efficient search algo that
> > returns the less loaded trunk. We are using 100+ trunk (duplicate
> > entry) info to achieve some CPS limit. So our main concern is the
> > search time for OpenSIPS to choose a trunk.
> >
> > My another question, will 1 sec time interval in RATELIMIT lead to
> > performance issue?
> >
> > regards
> > Rajib
> >
> > On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu
> > mailto:bog...@voice-system.ro>> wrote:
> >
> > Hi Rajib,
> >
> > The state info kept by load balancer (the load and capacity of each
> > destination) is memory only - there are no DB ops at runtime.
> >
> > Regards,
> > Bogdan
> >
> > Rajib Deka wrote:
> > > Hi All,
> > >
> > > I have a question on load balancer,
> > >
> > > I have a 20 trunk entry in load balancer table. Once a call comes,
> > > will it check the available resources in all the trunks to find the
> > > less loaded trunk? or will it have some stack   or memory table to
> > > maintain the load info to make the search fast.
> > >
> > > Please explain me the info.
> > >
> > > --
> > > Rajib Deka
> > > Software Engineer
> > > Servion Global Solution
> > > Chennai, India
> > >
> > > Mobile No: + 91 91767 80669
> > >
> > >
> >
> 
> > >
> > > ___
> > > Users mailing list
> > > Users@lists.opensips.org 
> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> > --
> > Rajib Deka
> > Software Engineer
> > Servion Global Solution
> > Chennai, India
> >
> > Mobile No: + 91 91767 80669
> >
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> 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
>



-- 
Rajib Deka
Software Engineer
Servion Global Solution
Chennai, India

Mobile No: + 91 91767 80669
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Rajib,

the load of each trunk is calculated each time the "load_balance()" 
function is called -> the load is a higly dynamic info and needs to be 
evaluated each time load balancing needs to be done. There is no way to 
cache/store any info related to previous less loaded trunk.

Anyhow 100+ trunks does not mean a lot ;)

Regards,
Bogdan

Rajib Deka wrote:
> Thanks Bogdan.
> I know that OpenSIPS will store the state info in memory. My question 
> is, Suppose I have 100 trunks as destination in memory to load balance 
> with different state info, so  when a new call (INVITE) comes to 
> OpenSIPS, will OpenSIPS go through all the 100 trunk's state info to 
> choose the least loaded one or it has some efficient search algo that 
> returns the less loaded trunk. We are using 100+ trunk (duplicate 
> entry) info to achieve some CPS limit. So our main concern is the 
> search time for OpenSIPS to choose a trunk.
>
> My another question, will 1 sec time interval in RATELIMIT lead to 
> performance issue?
>
> regards
> Rajib
>
> On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu 
> mailto:bog...@voice-system.ro>> wrote:
>
> Hi Rajib,
>
> The state info kept by load balancer (the load and capacity of each
> destination) is memory only - there are no DB ops at runtime.
>
> Regards,
> Bogdan
>
> Rajib Deka wrote:
> > Hi All,
> >
> > I have a question on load balancer,
> >
> > I have a 20 trunk entry in load balancer table. Once a call comes,
> > will it check the available resources in all the trunks to find the
> > less loaded trunk? or will it have some stack   or memory table to
> > maintain the load info to make the search fast.
> >
> > Please explain me the info.
> >
> > --
> > Rajib Deka
> > Software Engineer
> > Servion Global Solution
> > Chennai, India
> >
> > Mobile No: + 91 91767 80669
> >
> >
> 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> 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
>
>
>
>
> -- 
> Rajib Deka
> Software Engineer
> Servion Global Solution
> Chennai, India
>
> Mobile No: + 91 91767 80669
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] Load Balancer

2010-08-01 Thread Rajib Deka
Thanks Bogdan.
I know that OpenSIPS will store the state info in memory. My question is,
Suppose I have 100 trunks as destination in memory to load balance with
different state info, so  when a new call (INVITE) comes to OpenSIPS, will
OpenSIPS go through all the 100 trunk's state info to choose the least
loaded one or it has some efficient search algo that returns the less loaded
trunk. We are using 100+ trunk (duplicate entry) info to achieve some CPS
limit. So our main concern is the search time for OpenSIPS to choose a
trunk.

My another question, will 1 sec time interval in RATELIMIT lead to
performance issue?

regards
Rajib

On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu
wrote:

> Hi Rajib,
>
> The state info kept by load balancer (the load and capacity of each
> destination) is memory only - there are no DB ops at runtime.
>
> Regards,
> Bogdan
>
> Rajib Deka wrote:
> > Hi All,
> >
> > I have a question on load balancer,
> >
> > I have a 20 trunk entry in load balancer table. Once a call comes,
> > will it check the available resources in all the trunks to find the
> > less loaded trunk? or will it have some stack   or memory table to
> > maintain the load info to make the search fast.
> >
> > Please explain me the info.
> >
> > --
> > Rajib Deka
> > Software Engineer
> > Servion Global Solution
> > Chennai, India
> >
> > Mobile No: + 91 91767 80669
> >
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> 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
>



-- 
Rajib Deka
Software Engineer
Servion Global Solution
Chennai, India

Mobile No: + 91 91767 80669
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] presence/timer related crash

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Juha,

Looking at the backtrace you sent, I found some bug in the mysql module 
- it is fixed on SVN.

Thanks ad Regards,
Bogdan

Juha Heinanen wrote:
> i have noticed a few times opensips 1.6 crashing while doing some timer
> presence/related db operations.  below is gdb output of such crash.
>
> -- juha
>
> Program terminated with signal 11, Segmentation fault.
> #0  0xb76d23e3 in db_mysql_val2bind (v=0xbf96715c, binds=0x8188a18, i=1)
> at val.c:274
> 274   *(binds[i].is_null) = 0;
> (gdb) where
> #0  0xb76d23e3 in db_mysql_val2bind (v=0xbf96715c, binds=0x8188a18, i=1)
> at val.c:274
> #1  0xb76cd93e in db_mysql_do_prepared_query (conn=, 
> v=, n=2, uv=0x0, un=0, query=)
> at dbase.c:443
> #2  0xb76cf0d5 in db_mysql_delete (_h=0x8178e40, _k=0xbf967190, 
> _o=0xbf967184, _v=0xbf967148, _n=2) at dbase.c:893
> #3  0xb737fec4 in msg_watchers_clean (ticks=3600, param=0x0)
> at subscribe.c:484
> #4  0x080b59cf in timer_ticker () at timer.c:325
> #5  run_timer_process () at timer.c:395
> #6  start_timer_processes () at timer.c:475
> #7  0x08069913 in main_loop (argc=16, argv=0xbf967354) at main.c:867
> #8  main (argc=16, argv=0xbf967354) at main.c:1388
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] Location info when using OpenSIPS as outbound proxy

2010-08-01 Thread Andrew Pogrebennyk
On 01.08.2010 20:37, Bogdan-Andrei Iancu wrote:
> 2) ideally, for an outbound proxy, you should do the registration 
> processing at reply time, once the main registrar accepted the 
> registration and eventually made all the changes over it. But right 
> now 
> opensips does not accept registration processing for replies.

Just in case - some time ago I did something like:

onreply_route[3] {
# Here we handle REGISTER replies
xlog("L_INFO", "[$mi] [$rs $rr]\n");
if (status=~"200") {
route(3);
};

route[3] {
# workaround for location saving
xlog("L_INFO", "saving location\n");
save("location","0x02");
}


0x02 - do not generate a SIP reply to the current REGISTER request.

-- 
Sincerely,
Andrew Pogrebennyk

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


Re: [OpenSIPS-Users] Command "opensipsctl dialplan reload" randomly hangs

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Dan,

Interestingthe BT shows that the reloader process is blocked waiting 
for ongoing reader processes to finish

Could you print in gdb the values:  *reload_flag and *data_refcnt  ?

Also, please check the logs to be sure that you do not have any child 
proc died .

Regards,
Bogdan

DanB wrote:
> Hi Bogdan,
>
> After so long time I finally got a debug for you (running in debug 5).
> As higher the debug is as smaller the chances are to happen. Running
> in debug 6 we could never reproduce it (even in debug 5 it took some
> time). If we run it in debug 2 we get the hang every few days.
> Let me know if you need additional traces.
>
>
> Ta,
> DanB
>
>
>
> ### Start BT
> ###
>
>   
>> sip1:~# opensipsctl ps|grep FIFO
>> Process::  ID=13 PID=3838 Type=MI FIFO
>> sip1:~# opensipsctl ps|grep FIFO
>> Process::  ID=13 PID=3838 Type=MI FIFO
>> sip1:~# opensipsctl dialplan reload
>> Terminated
>> sip1:~# /etc/init.d/
>> sip1:~# gdb /usr/sbin/opensips 3838
>> GNU gdb 6.8-debian
>> Copyright (C) 2008 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later 
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-linux-gnu"...
>> (no debugging symbols found)
>> Attaching to program: /usr/sbin/opensips, process 3838
>> Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
>> Loaded symbols for /lib/libdl.so.2
>> Reading symbols from /lib/libresolv.so.2...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /lib/libresolv.so.2
>> Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
>> Loaded symbols for /lib/libc.so.6
>> Reading symbols from /lib/ld-linux-x86-64.so.2...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /lib64/ld-linux-x86-64.so.2
>> Reading symbols from /usr/lib/opensips/modules/options.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/options.so
>> Reading symbols from /usr/lib/opensips/modules/sl.so...
>> (no debugging symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/sl.so
>> Reading symbols from /usr/lib/opensips/modules/tm.so...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/tm.so
>> Reading symbols from /usr/lib/opensips/modules/signaling.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/signaling.so
>> Reading symbols from /usr/lib/opensips/modules/db_mysql.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/db_mysql.so
>> Reading symbols from /usr/lib/libmysqlclient.so.15...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /usr/lib/libmysqlclient.so.15
>> Reading symbols from /lib/libpthread.so.0...
>> (no debugging symbols found)...done.
>> [Thread debugging using libthread_db enabled]
>> [New Thread 0x7ffac71226e0 (LWP 3838)]
>> Loaded symbols for /lib/libpthread.so.0
>> Reading symbols from /lib/libcrypt.so.1...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /lib/libcrypt.so.1
>> Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
>> Loaded symbols for /lib/libnsl.so.1
>> Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
>> Loaded symbols for /lib/libm.so.6
>> Reading symbols from /usr/lib/libz.so.1...(no debugging symbols 
>> found)...done.
>> Loaded symbols for /usr/lib/libz.so.1
>> Reading symbols from /usr/lib/opensips/modules/rr.so...
>> (no debugging symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/rr.so
>> Reading symbols from /usr/lib/opensips/modules/maxfwd.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/maxfwd.so
>> Reading symbols from /usr/lib/opensips/modules/usrloc.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/usrloc.so
>> Reading symbols from /usr/lib/opensips/modules/textops.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/textops.so
>> Reading symbols from /usr/lib/opensips/modules/mi_fifo.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/mi_fifo.so
>> Reading symbols from /usr/lib/opensips/modules/mi_datagram.so...
>> (no debugging symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/mi_datagram.so
>> Reading symbols from /usr/lib/opensips/modules/uri.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/uri.so
>> Reading symbols from /usr/lib/opensips/modules/xlog.so...(no debugging 
>> symbols found)...done.
>> Loaded symbols for /usr/lib/opensips/modules/xlog.so
>> Reading s

Re: [OpenSIPS-Users] troubleshooting memory problems

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Richard,

What you found out is really true :) - you cannot make a comment in the 
middle of the list :)...

Anyhow, now that the mem debugger is compiled in, please let me know 
when you get the mem dumps to see where the leak is coming from.

Regards,
Bogdan

Richard Revels wrote:
> Just a quick follow-up on this.  I was cleaning up this server today (plus 
> the couple problems I was having with b2bua - refer scenario were fixed with 
> last bug fix) and realized that there are times when I can be pretty dense.
>
> I was somewhat perplexed as to why I didn't get the debug output I was 
> looking for with only the DDBG_QM_MALLOC uncommented but Bogdan was pretty 
> firm that should be all that is needed.  Commenting them back out today, it 
> finally hit home it's a continued line and commenting out one line below 
> another doesn't really do anything.  : >  Move DDBG_QM_MALLOC above 
> DDBG_F_MALLOC in the file and THEN uncomment DDBG_QM_MALLOC.  
>
> Hopefully this will help someone down the road.  Should be obvious but got 
> past me for quite a while.
>
> DOAH!
>
> Richard
>
>
> On May 27, 2010, at 10:35 AM, Bogdan-Andrei Iancu wrote:
>
>   
>> Hi Richard,
>>
>> Richard Revels wrote:
>> 
>>> In Makefile.defs uncomment
>>>
>>> -DDBG_QM_MALLOC \
>>> -DDBG_F_MALLOC \
>>>
>>>   
>> use only  DDBG_QM_MALLOC !!
>> 
>>> In script set 
>>>
>>> debug=6
>>> memlog=6
>>>
>>>
>>> Restart and let run for a while.  Then 
>>>
>>> cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | 
>>> sed -e 's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: 
>>> \(.*\)/\1-malloc/' | sort | uniq -c
>>>
>>> Adjust path for wherever you are logging of course.  Your output will have 
>>> something like 
>>>
>>>   3015 parse_contact(81)-malloc
>>>   3015 parse_contact(81)-mfree
>>>   3015 parse_contacts(192)-malloc
>>>   3015 parse_contacts(192)-mfree
>>>  19592 parse_from_header(63)-malloc
>>>  19592 parse_from_header(63)-mfree
>>> 335368 parse_headers(309)-malloc
>>> 335368 parse_headers(309)-mfree
>>>
>>> for all the calls that are fine.  Then something like 
>>>
>>>  14922 do_parse_rr_body(65)-malloc
>>>   8989 do_parse_rr_body(65)-mfree
>>>
>>> or 
>>>
>>>   9016 sip_msg_cloner(437)-malloc
>>>   6003 sip_msg_cloner(437)-mfree
>>>
>>>   
>> That is not relevant as a mem block can be allocated in function X and 
>> freed in function Y, so you cannot correlate the numbers.
>> 
>>> for calls that need further looking into.  You'll probably want to go grep 
>>> out the problem values in the log to get more information about what's 
>>> calling them.
>>>
>>> I'm chasing a fairly nasty memory leak (shared memory) right now and 
>>> thought I would document / share some of the methods we use for this type 
>>> of thing.
>>>
>>>   
>> See:  http://www.opensips.org/Resources/DocsTsMem - try to get a dump to 
>> see if there are leaks.
>>
>> Regards,
>> Bogdan
>> 
>>> Richard
>>>
>>>
>>>
>>> ___
>>> 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
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] Load balancer probe _mode=1 bug?

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Bill,

How do you mark down the destination (MI ?) and what state are you setting ?

Also, after marking it down, do you see any new pings being sent to that 
destination?

Something was changed during rev 6653:
http://opensips.svn.sourceforge.net/opensips/?rev=6653&view=rev

But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is set 
when disabling the destination via MI and with this flag set, no more 
pings are sent.

Regards,
Bogdan

Bill W wrote:
> Hello Bogdan,
>
> I'm experiencing the same problem as I did before, with the load 
> balancer not re-enabling a device marked down.
>
> If I go into the database and set probe_mode = 2, it re-enables the device.
>
> I'm currently running opensips 1.6.2-tls (x86_64/linux)
>
> Did the patch get reverted?
>
> Thanks!
> Bill
>
> Bogdan-Andrei Iancu wrote:
>   
>> Super! I uploaded the fix on SVN.
>>
>> Thanks and regards,
>> Bogdan
>>
>> Bill W wrote:
>> 
>>> Hey Bogdan,
>>>
>>> It looks like that fixed it.  Thanks so much!
>>>
>>> Bill
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>   
>>>   
 Hi Bill,

 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 
 
>>> ___
>>> 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
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] CPL and Timer -->408 Timeout

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Mehdi,

Lost me a bit... If the 408 is generated by OpenSIPS, you can control it 
via the TM param fr_inv_timer (globally) or via the CPL (per call). If 
the 408 is not generated by OpenSIPS, you cannot do anything about.

Regards,
Bogdan

mehdi boudou wrote:
> Hello Bogdan,
>
> i sent you the call flow with explanations in the previous message and 
> i don't understand why there was a 408 timeout from the Opensips server.
> Is it referring to the first call or the second call and can i 
> interact with any timer to delay this 408 timeout which can permit the 
> call of the third destination?
>
> The Scenario was sequantial ringing with 3 destinations during 5 sec. 
>
> Regards,
>
> Mehdi BOUDOU
>
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] tm: set_timer error

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Jayesh,

The error you see is "translatable" to:   you received a reply for a 
transaction that already timeout.  Like you set out the request, there 
was no final replay received and 408 was generated and after that, some 
replies (from UAS) were received.

So, you need to identify why the replies are delayed in processing - it 
can be because they are received very late or because they processing is 
delayed inside opensips - like the replies are queued on socket because 
there are no available processes to read and handle them.

My guess is that you do some time expensive I/O (DB, exec, DNS ?) ops in 
your opensips and you block all you opensips procs -> the replies are 
internally delayed ad you get the logs...

So, you need to turn your eye towards DB to see why your DB queries are 
delayed.

Regards,
Bogdan

Jayesh Nambiar wrote:
> Hello,
> Very recently I've started seeing these errors in my logs:
> CRITICAL:tm:set_timer: set_timer for 1 list called on a "detached" 
> timer -- ignoring: 0x2da57728.
> Many lines like these. When these errors comes in; the opensips just 
> stops processing the messages properly and the inuse transactions just 
> keep on increasing. I used to get these errors when the DB did not 
> responsd to the opensips queries in timely fashion, but that was 
> because of the DB, but this time I dont see any DB errors or delay 
> from the DB.
> Is there a way to find out somehow that what is causing this problem. 
> Any logging or tracing method. This is a production system and hence 
> troubleshooting is a little difficult but I wish to know the ways to 
> troubleshoot it.
>
> Any help is really appreciated.
>
> Thanks,
>
> --- Jayesh
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] TM Related error on log

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Sergio,

The error you see is "translatable" to:   you received a reply for a 
transaction that already timeout.  Like you set out the request, there 
was no final replay received and 408 was generated and after that, some 
replies (from UAS) were received.

So, you need to identify why the replies are delayed in processing - it 
can be because they are received very late or because they processing is 
delayed inside opensips - like the replies are queued on socket because 
there are no available processes to read and handle them.

Can you isolate the context for these logs? like spikes of traffic ? too 
much load ? bogus UAS ? network issues ?

Regards,
Bogdan

Sergio Gutierrez wrote:
> Hello Everybody.
>
> I am getting this error on my opensips deploymebt:
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18626]: [ID 297976 
> daemon.error] ERROR:nathelper:force_rtp_proxy: incorrect port 0 in 
> reply from rtp proxy
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18626]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 377f4c88
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18621]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 37b22cb8
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18616]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 37b6c120
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18627]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 37ba7258
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18615]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 374a5eb0
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18615]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 37812b88
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18617]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 37d8a8a0
>
> Jul 26 12:54:26 boole /toip/opensips/sbin/opensips[18626]: [ID 400529 
> daemon.crit] CRITICAL:tm:set_timer: set_timer for 1 list called on a 
> "detached" timer -- ignoring: 378da108
>
>
> Can somebody gieve any hint regarding that?
>
> Thanks and regards.
>
> -- 
> Sergio Gutiérrez
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] TCP CONNECT ERROR;

2010-08-01 Thread Premalatha Kuppan
Sorry forgot to attach the cfg file..attached now.

On Wed, Jul 28, 2010 at 11:15 AM, Premalatha Kuppan  wrote:

> Still call fails to TC P enabled clients.
>
> Please find my config file attached. I dono where iam doing mistake
> :(..please help
>
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER MESSAGE
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER sips:PUBLIC
> IP SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=14097453-6b37-4f1d-bb14-43
> Authorization: Digest username="408111", realm="PUBLIC IP",
> nonce="4c4fbe8500013046f7331a315fdc29e6f14851cbedd9", uri="sips:PUBLIC
> IP:5061 ",
> response="64375192e261bc5f3213bc6f56  ontent-Length:  0
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]:  contact
> expire= ;  header expire =300; contact
> uri=sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:57086;transport=tls
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: This is
> register, parsing values - 588aa6e4-2af1-4fc0-ad67-6e5c16681e771000;
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181;
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]:
> NORMAL-REGISTRATION
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: CLIENT BEHIND NAT
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: contact before
> update 
> <>
>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: via before update
>  ;rport;branch=z9hG4bKPj48764d96-c980-4584-aba4-2af5c6273165>
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER MESSAGE
> Jul 28 01:21:43 204548-4 /usr/local/sbin/opensips[21528]: REGISTER sips:
> 204.12.57.221:5061 SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=9428c49e-e3bb-4241-b3da-8e
> ontent-Length:  0a6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:47043
> ;transport=tls>
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER MESSAGE
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER sips:PUBLIC
> IP:5061  SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=12a8089f-2955-480f-affb-6f
> ontent-Length:  0a6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:57086
> ;transport=tls>
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER MESSAGE
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER sips:
> PUBLIC:IP  SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=9428c49e-e3bb-4241-b3da-8e
> Authorization: Digest username="408111", realm="PUBLIC IP",
> nonce="4c4fbe8500025275d997ab9c99b5ab5e0eac036575d0", uri="sips:PUBLIC
> IP ", response="a81e038b357fb069199bb83f32
> ontent-Length:  0
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]:  contact
> expire= ;  header expire =0; contact
> uri=sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:47043;transport=tls
>
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: This is
> de-registration
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: De-register
> DONE - 588aa6e4-2af1-4fc0-ad67-6e5c16681e771000
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER MESSAGE
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: REGISTER sips:PUBLIC
> IP:5061  SIP/2. From: <
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181>;tag=12a8089f-2955-480f-affb-6f
> Authorization: Digest username="408111", realm="PUBLIC IP",
> nonce="4c4fbe8600034f58d23302892e98458c1907863d4951", uri="sips:
> 204.12.57.221:5061", response="df102121f9df50a2e205cd144a  ontent-Length:
> 0
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]:  contact
> expire= ;  header expire =300; contact
> uri=sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@209.242.149.98:57086;transport=tls
>
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]: This is
> register, parsing values - 588aa6e4-2af1-4fc0-ad67-6e5c16681e771000;
> sip:588aa6e4-2af1-4fc0-ad67-6e5c16681e771...@10.11.11.181;
>
> Jul 28 01:21:44 204548-4 /usr/local/sbin/opensips[21528]:
> NORMAL-REGISTRATION
> Jul 28 01:23:48 204548-4 /usr/local/sbin/opensips[21523]: new branch at
> sip:123...@209.242.149.98:1025;transport=TCP
> Jul 28 01:23:49 204548-4 /usr/local/sbin/opensips[21523]:
> ERROR:core:tcp_blocking_connect: timeout 1 s elapsed from 1 s
> Jul 28 01:23:49 204548-4 /usr/local/sbin/opensips[21523]:
> ERROR:core:tcpconn_connect: tcp_blocking_connect failed
> Jul 28 01:23:49 204548-4 /usr/local/sbin/opensips[21523]:
> ERROR:core:tcp_send: connect failed
> Jul 28 01:23:49 204548-4 /usr/local/sbin/opensips[21523]:
> ERROR:tm:msg_send: tcp_send failed
> Jul 28 01:23:49 204548-4 /usr/local/sbin/opensips[21523]:
> ERROR:tm:t_forward_nonack: sending request failed
> Jul 2

Re: [OpenSIPS-Users] HTTP to SIP

2010-08-01 Thread Mario Stocco
Remi,
At first glace, this looks like the bulk of your work is in the CGI
environment of your choice.

Browser gets http://yourhttpserver/cgiscript?register

CGI script sends SIP REGISTER to SIP Proxy on UDP 5060

SIP Proxy replies 200 OK on UDP:5060

CGI Proxy replies 200 OK on TCP:80

Is this close?

Mario


On Fri, Jul 30, 2010 at 8:37 AM, remi humbert  wrote:

> Hi,
>
> I want to be able to make http REST request to some http server, and
> transform
> these requests into SIP MESSAGE requests.
>
> I made a prototype that works using several sip clients embedded into an
> http server. This kinda works.
> I would like to suppress the http server, and make request directly to the
> OpenSIPS registrar.
>
> I found out about the mi_xmlrpc module, which makes opensips understand
> http, but I cannot
> find out how to get the http requests in the opensips.cfg file.
> In kamalio they seems to have some *modparam*("*xmlrpc*", "*route*",
> "XMLRPC");)
> which allows to declare a route in the config file to get the http request.
>
> I could not find the equivalent in mi_xmlrpc.
>
> So first question, does this exists in opensips, how can I get the http
> requests ?
> Second, do you think it is a good idea to do this way ? Have you got
> another idea ?
>
> Regards,
>
> --
> Remi
>
>
> ___
> 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] HTTP to SIP

2010-08-01 Thread Bogdan-Andrei Iancu
Hello Remi,

If you want to receive and process an HTTP request, why do you want to 
do it with a SIP server (opensips) and not with a HTTP server ? I think 
will be more suitable to you some CGI with APACHE for example, instead 
of misusing opensips for that.

If you can explain me better what the HTTP request is good for, I can 
give you some advices on how to do itif it has some SIP implications

Regards,
Bogdan

remi humbert wrote:
> Hi,
>
> I want to be able to make http REST request to some http server, and 
> transform
> these requests into SIP MESSAGE requests.
>
> I made a prototype that works using several sip clients embedded into 
> an http server. This kinda works.
> I would like to suppress the http server, and make request directly to 
> the OpenSIPS registrar.
>
> I found out about the mi_xmlrpc module, which makes opensips 
> understand http, but I cannot
> find out how to get the http requests in the opensips.cfg file.
> In kamalio they seems to have some /modparam/("/xmlrpc/", "/route/", 
> "XMLRPC");)
> which allows to declare a route in the config file to get the http 
> request.
> I could not find the equivalent in mi_xmlrpc.
>
> So first question, does this exists in opensips, how can I get the 
> http requests ?
> Second, do you think it is a good idea to do this way ? Have you got 
> another idea ?
>
> Regards,
>
> -- 
> Remi
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] What does save("location") actually do?

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Nauman,

As docs say, the save() function is processing a REGISTER request by: 
extracting the SIP contacts, update them into user location table 
(registration table) and sends back a reply. See :
http://www.opensips.org/html/docs/modules/1.6.x/registrar.html#id228529

if you want to prevent the function to send a reply back, see the "r" 
flag that you can pass to it.

Best regards,
Bogdan

Nauman Sulaiman wrote:
> Hi, we are using opensips 1.6.2.  We are using OpenSIPS as an outbound proxy 
> in open relay mode for time being. For all register requests to provider 
> beyond opensips we wish to save the AoR. So we are calling save("location"). 
> This for local routing for 302 later.
>
> However the very act of calling save("location") is causing a 401 to go out??
> We are not using authentication on the opensips outbound proxy. There is 
> nothing in the docs to suggest this.
>
> If we remove the save then the register completes fine, code below
> added to route[1] of sample script
>
> called from here
>
>  if (!uri==myself)
>   {
>   xlog(" Route 1 due to non local domain \n");
>  route(1);
>  }
>
>
> route[1] {
> 
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
> xlog("method invite in route 1 \n");
> t_on_branch("2");
> t_on_reply("2");
> t_on_failure("1");
> }
> 
> if (method=="REGISTER")
> {
> xlog("saving AoR non local domain \n");
> save("location");
> }
> 
>  
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
>  
>
>
>   
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] error 401 while registering

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Meftah,

For some reasons, the authentication cannot be done by opensips - like 
no credentials are present in REGISTER, credentials are not correct, the 
user does not exists, the response is not correct.

so, first check is your phone is actually sending the Authentication 
header (credentials) to opensips . If yes, you can check the result code 
of the auth function (to see why it failed). See:
   http://www.opensips.org/html/docs/modules/1.6.x/auth_db.html#id228340

Regards,
Bogdan

Meftah Tayeb wrote:
> hi all
> i am getting error 401 while registering to my opensips server
> enabled mysql authentication
> domain is the ip
> if i use dns i get always 404
> thanks
>
>   


-- 
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] Contact - private IP problem

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Nauman,

Flavio's book shows you how to handle registrations for local processing 
(local registrar) and not for the case where you forward the REGISTER to 
another registrar server...

So, what you need to do is (as for the other forwarded/relayed requests) 
to call the fix_nated_contact() for the REGISTER too.

Regards,
Bogdan

Nauman Sulaiman wrote:
> Hi, we are using OpenSIPS 1.6.2 as an outbound proxy, we have registered with 
> Voipfone to test but the same problem occurs with other Voip providers
> Once registered we can't receive incoming calls, if we use STUN on the UAC 
> then we are ok. However we would prefer to handle the nat traversal on the 
> proxy. We have implemented all the code in Flavio's book.
>
> However the contact header sent from the proxy to the Voipfone server has a 
> private ip although it has the nat=yes appended. So something is working 
> please see REGISTER trace below.
>
> We think we are missing something but unsure what.
>
> UAC->Proxy
>
> REGISTER sip:voipfone.co.uk SIP/2.0.
> Via: SIP/2.0/UDP 192.168.0.2;rport;branch=z9hG4bKeyaZHZ6DrXptj.
> Max-Forwards: 70.
> From: ;tag=44U5mK3gB9ZvH.
> To: .
> Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
> CSeq: 134125887 REGISTER.
> Contact: .
> Expires: 600.
> User-Agent: 
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, NOTIFY.
> Supported: path.
> Authorization: Digest username="30146027", realm="asterisk", 
> nonce="hhvuahjm", algorithm=MD5, uri="sip:voipfone.co.uk", response="4d8dbfef$
> Content-Length: 0.
> .
>
> Proxy->Voipfone
>
> REGISTER sip:voipfone.co.uk SIP/2.0.
> Via: SIP/2.0/UDP 178.235.138.190;branch=z9hG4bK23c.505fb9b2.0.
> Via: SIP/2.0/UDP 
> 192.168.0.2;received=88.148.7.122;rport=5060;branch=z9hG4bKeyaZHZ6DrXptj.
> Max-Forwards: 69.
> From: ;tag=44U5mK3gB9ZvH.
> To: .
> Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
> CSeq: 134125887 REGISTER.
> Contact: .
> Expires: 600.
> User-Agent: 
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, NOTIFY.
> Supported: path.
> Authorization: Digest username="30146027", realm="asterisk", 
> nonce="hhvuahjm", algorithm=MD5, uri="sip:voipfone.co.uk", response="4d8dbfef$
> Content-Length: 0.
>
> Voipfone->Proxy
>
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 
> 178.235.138.190;branch=z9hG4bK23c.505fb9b2.0;received=178.235.138.190;rport=5060.
> Record-Route: .
> Via: SIP/2.0/UDP 
> 192.168.0.2;received=88.148.7.122;rport=5060;branch=z9hG4bKeyaZHZ6DrXptj.
> From: ;tag=44U5mK3gB9ZvH.
> To: .
> Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
> CSeq: 134125887 REGISTER.
> Contact: ;expires=60.
> Expires: 60.
> Date: Fri, 30 Jul 2010 15:16:15 GMT.
> Min-Expires: 60.
> User-Agent: Voipfone.
> Content-Length: 0.
>
>  
>
>
>
>   
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] Log destination IP?

2010-08-01 Thread Bogdan-Andrei Iancu
Hello Ross,

the accounting for transactions is done at reply time, when the reply 
for the request is received. so, the IP where the request was sent to is 
the IP were the reply came from -> logging the src IP of the reply will 
do the trick. So, add to extra accounting set the variable $(si) 
. See:
http://www.opensips.org/Resources/DocsCoreVar16
http://www.opensips.org/Resources/DocsCoreVar16#toc72

Regards,
Bogdan

Ross McKillop wrote:
> I have an OpenSIPS configuration where an external script sets the 
> destination with exec_dset which works as expected and stores the destination 
> URI in the acc table.
>
> I'm wondering if it's possible to log the IP to which the SIP message was 
> forwarded - I've looked at $var(dd) but that simply shows the domain portion 
> of the translated request URI which does not identify what host actually 
> received the call if SRV records are used or if there are multiple A records 
> corresponding to the hostname.
>
> Any help appreciated.
>
> Best Regards,
> Ross
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] Memcache and calculate_ha1 disabled

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Takeshi,

The tutorial was written for the case where you provide the plain-text 
password and the auth engine calculates the ha1.

If you want to disable the HA1 calculation, in that case you need to 
cache it and to provide it to auth engine via the password AVP (for pv 
authentication).

Actually, aside of changing the "calculate_ha1" param , you should not 
change anything else - if your changes are consistent (like adding in 
"password" column in DB the HA1 value), the caching mechanism will work 
unchanged - it will load, cache and provide the HA1 instead of passwd.

Regards,
Bogdan

mayamatakeshi wrote:
> Hello,
> I'm reading about using memcache 
> (http://www.opensips.org/Resources/DocsTutMemcache) to cache passowords.
> However, what if i need to disable calculate_ha1? When 
> www_authorize/proxy_authorize completes, how could I know which 
> password AVP was used (ha1 or ha1b)?
> I think I can concatenate the 2 passwords and cache it. Then when I 
> need to authenticate again I could read from cache, split the 
> passwords and try both. But is there a simpler way?
>
> br,
> takeshi
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] acc without 200 OK of BYE

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Wesley,

If you are not interested in the reply code of BYE request, you can do 
the followings:

1) enabled (for BYE requests) the failed_transaction_flag (see 
http://www.opensips.org/html/docs/modules/1.6.x/acc.html#id271004) to 
force the ACC record disregarding the reply code of the BYE.

2) do manual acc for BYE at request time by using the acc__request() 
-  see http://www.opensips.org/html/docs/modules/1.6.x/acc.html#id272195

Regards,
Bogdan

Wesley Volcov wrote:
> Hello All,
>
> Is there some way to make the accounting without Bye's 200 OK ? I 
> would like accouting a call just with the BYE.
>
> Regards,
>
> -- 
> Wesley Volcov
> Email: wesleyvol...@gmail.com 
> Messenger: vol...@live.com 
> Mobile: +55 11 9989-5348
> Website: http://volcov.blogspot.com
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] How to bill SIP session time correctly?

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Alejandro,

When comes to billing, for Voip, you have two directions:
 
1) relay on call data from RTP level - this part was alrready covered, 
so I will not detail

2) relay on call data from SIP level - here you have several mechanism 
to help you. But first of all, you need to understand that doing ACC 
based on SIP signalling may not provide accuracy in case of errors - 
because there is no continues check at signalling level to detect the 
ghost calls.
Assuming you use the SIP Session Timer mechanism with a 5 minutes 
interval, it means you will have a 0-to-5 mins error in detecting a 
broken call.

Right now I'm considering enhancing the dialog module to be able to do 
SIP pinging (OPTIONS, re-INVITE) from opensips side, in both caller + 
callee direction, to check the call health - this will eliminate any 
dependency to the caller/callee device (like you have on the SST mechanism).


What is important to understand : there are various mechanism available 
to check the ACC accuracy, but at the end it is a compromise between the 
effort/cost to run a perfect ACC system and the losses due an inaccurate 
system - like if bandwidth required to do RTP relay or SIP probing (to 
detect the ghost calls) is more expensive than the losses because you 
had 10 ghost calls per month 

Regards,
Bogdan

Alejandro Recarey wrote:
> Hi all, and thanks for taking the time to read my mail.
>
> I am currently studying OpenSIPS to replace Asterisk in a network that
> I administer. I am doing this because Asterisk call quality quickly
> starts degrading once you hit 100 simultaneous calls.
>
> Although NAT issues are not terribly important (most of my calls are
> routed directly to VoIP carriers) I am routing RTP through my asterisk
> boxes, this allows me to bill call length without making errors.
>
> When using a pure SIP solution like OpenSIPS, and session timers are
> not enough, how do you bill your customers?
>
> I have seen that one solution is to use MediaProxy or RTP proxy to
> proxy the RTP stream and inform OpenSIPS when the RTP stream
> terminates. Won't this have the same scalability problems as Asterisk?
> Is it a robust solution?
>
> Do any of you have experience using OpenSIPS paired with MediaProxy or
> RTPproxy to correct call times? Does this have a large impact on the
> scalability of the solution?
>
> Thanks for the replies!
>
> Alex
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] Location info when using OpenSIPS as outbound proxy

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Nauman,

The registration functionality is available for requests only. So, you 
can not register contacts at reply time.

In your case, you have 2 problems:

1) if you do the registration processing (save(location)) at request 
time (UAC->opensips->proxy), you will not know if the proxy will accept 
the registration and if it will not change the expire time (a registrar 
can do that).

2) ideally, for an outbound proxy, you should do the registration 
processing at reply time, once the main registrar accepted the 
registration and eventually made all the changes over it. But right now 
opensips does not accept registration processing for replies.

Nevertheless, I have on my TODO list to make possible registration 
handling at reply time.

Regards,
Bogdan

Nauman Sulaiman wrote:
> Hi, using opensips 1.6.2. We are using Opensips as an outbound proxy which 
> also does local routing of 302 responses. IF we have a client UAC1 which 
> registers with a provider using OpenSIPS only as an outbound proxy is it 
> possible to save the location info of UAC1, reason being if there is a call 
> to UAC2 for instance from the provider which is redirected with 302, then our 
> Opensips can handle the redirection because it knows where UAC1 is without 
> having it to go back to the provider's proxy server.
>
> Maybe we need to do 2 registrations one with OpenSIPS and one with the 
> provider but if we can do this with just the one it would be a neat solution. 
>
> Secondly if we do save the location info of UAC1 at the opensips proxy, what 
> url would need to go in contact field of the 302, would it be 
> u...@provider.com - opensips needs soemthing ot be able to send to UAC1 
>
>
>   
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] Load Balancer

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Rajib,

The state info kept by load balancer (the load and capacity of each 
destination) is memory only - there are no DB ops at runtime.

Regards,
Bogdan

Rajib Deka wrote:
> Hi All,
>
> I have a question on load balancer,
>
> I have a 20 trunk entry in load balancer table. Once a call comes, 
> will it check the available resources in all the trunks to find the 
> less loaded trunk? or will it have some stack   or memory table to 
> maintain the load info to make the search fast.
>
> Please explain me the info.
>
> -- 
> Rajib Deka
> Software Engineer
> Servion Global Solution
> Chennai, India
>
> Mobile No: + 91 91767 80669
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
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] Load balancer retcode question on OpenSIPS 1.6.2

2010-08-01 Thread Bogdan-Andrei Iancu
Hi,

your code is not correct as the $retcode returns the ret code of the 
last executed instruction, including the "if" statement - to have a 
correct code, you need to save the $retcode value immediately after the 
call of load_balance() function

Most probably the "1" val you see is the "true" return code of the "if" 
code. Try:

if ( uri=~"sip:92[1-9][0-...@.*" ) {
load_balance("27","white");
$var(x) = $retcode;
} else if ( uri=~"sip:3392[1-9][0-...@.*" ) {
load_balance("27","grey"); #
$var(x) = $retcode;
}
if ( $var(x) < 0 ) {
sl_send_reply("500","Service full");
exit;
}


Regards,
Bogdan

k1028 wrote:
> I figured it out. 
>
> This work all the time
> if ( uri=~"sip:92[1-9][0-...@.*" ) {
> load_balance("27","white"); 
> } else if ( uri=~"sip:3392[1-9][0-...@.*" ) {
> load_balance("27","grey"); #
> }
> if ( $retcode < 0 ) {
> sl_send_reply("500","Service full");
> exit;
> }
>
> This work sometime
> if ( uri=~"sip:92[1-9][0-...@.*" ) {
> load_balance("27","white"); 
> } 
> if ( uri=~"sip:3392[1-9][0-...@.*" ) {
> load_balance("27","grey"); #
> }
> if ( $retcode < 0 ) {
> sl_send_reply("500","Service full");
> exit;
> }
>
>   


-- 
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] question about uac_auth and gateway authentication

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Jozsef,

First of all, on proxy, after authenticating the phone (A), you should 
call the "remove_credentials()" function to remove from the SIP request 
the credentials send by A to authenticate to B - otherwise, they will be 
forwarded to C also.

Now, the failure route should check the 401/407 authentication requests 
the do the "uac_auth()" (auth B to C). Also check the return code of the 
"uac_auth()" function to see if the authentication was correctly done 
(if opensips has the credentials for the challenged realm):

failure_route[2] {
 if (t_check_status("40[17]")) {
xlog("got challenged \n");
if (uac_auth()) {
xlog("auth was succesful \n");
t_relay("udp:ip_addr:5060");
}
}


Regards,
Bogdan

Jozsef CZOMPO wrote:
> Hi
>
> I'm try to configure opensips for the following scenario:
> - 'A' VoIP Phone
> - 'B' My opensips proxy
> - 'C' PSTN Gateway with auth
>
> The problem is: 'A' need to authenticate for 'B', it's OK. 'A' sends  
> an INVITE to 'B' with auth credentials, to a public PSTN number. But i  
> need to authenticate to 'C'. I'm trying the uac_auth but, when i'm  
> running wireshark i'm seeing 'B' sending the wrong credentials (sends  
> 'A' to 'B', not 'B' to 'C'). How can i use uac_auth? What is the the  
> correct way for gateway auth? If i try to replace some words in  
> failure_route with 'replace_all', is working so opensips processing  
> failure_route[2], but don't insert the proper authentication  
> information.
>
> from my route script (with replaced fake host names, and passwords):
>
> modparam("uac","credential","username:domain:password")
>
> route {
> 
>   t_on_failure("2");
>   t_relay( "udp:ip_addr:5060" );
> ...
> }
>
> failure_route[2] {
>  uac_auth();
>  t_relay("udp:ip_addr:5060");
> }
>
>   Czo
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
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] proxy_authorize("","subscriber") bug ??

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Pasan,

Pasan Meemaduma wrote:
> Hi Bogdan,
>
> I'm bit confused.
>
> If I add t_newtran() as follow to by authentication route will it 
> affect the original INVITEs ?
no, it will not.
>
> There's no much details about t_newtran() function in documentation.
It just create the transaction
>
> will this function create a new transaction for retransmitted INVITEs 
> and allow to by pass the proxy_authorize("","subscriber")?
I advice you to read the SIP RFC3261 - all retransmissions of a request 
belong to the same transaction.
>
> will this affect the accounting anyway ?
no.

Regards,
Bogdan

>
> thanks
>
> 
> *From:* Bogdan-Andrei Iancu 
> *To:* OpenSIPS users mailling list 
> *Sent:* Thursday, July 29, 2010 15:26:47
> *Subject:* Re: [OpenSIPS-Users] proxy_authorize("","subscriber") bug ??
>
> Hi Pasan,
>
> Better try something like:
>
>
>   if (!allow_trusted()) {
> t_newtran();
> if (!proxy_authorize("","subscriber")) {
> if(!lookup("location") ){
> proxy_challenge("","0");
> exit;
> }
> } else if (!check_from()) {
> sl_send_reply("403", "Spoofed From-URI detected");
> xlog("L_INFO","Spoofed From-URI detected ! from --> $fu
> -- IP $si PORT:$sp");
> exit;
> }
> if(is_present_hf("Proxy-Authorization")){
> consume_credentials();
> }
> }
>
>
> the t_check_tran() function check is the transaction already exists (for
> retransmissions), but it is not creating the transaction.
>
> Best regards,
> Bogdan
>
>
> Pasan Meemaduma wrote:
> > Hi Bogdan,
> >
> > My authentication route is as follow,
> >
> >if (!allow_trusted()) {
> >  if (!proxy_authorize("","subscriber")) {
> >if(!lookup("location") ){
> >proxy_challenge("","0");
> >exit;
> >}
> >} else if (!check_from()) {
> >sl_send_reply("403", "Spoofed From-URI detected");
> >xlog("L_INFO","Spoofed From-URI detected ! from -->
> > $fu -- IP $si PORT:$sp");
> >exit;
> >}
> >if(is_present_hf("Proxy-Authorization")){
> >consume_credentials();
> >}
> >}
> >
> > This route is before the dispatch route (t_relay())
> > I think retransmitted INVITEs get block by this route so If I use the
> > t_check_trans()  as follow will I able to absorb the retransmitted
> > INVITE ?
> >
> >if (!allow_trusted()) {
> >  if (!proxy_authorize("","subscriber")) {
> >if(!lookup("location") && ! t_check_trans() ){
> >proxy_challenge("","0");
> >exit;
> >}
> >} else if (!check_from()) {
> >sl_send_reply("403", "Spoofed From-URI detected");
> >xlog("L_INFO","Spoofed From-URI detected ! from -->
> > $fu -- IP $si PORT:$sp");
> >exit;
> >}
> >if(is_present_hf("Proxy-Authorization")){
> >consume_credentials();
> >}
> >}
> >
> > modparam("auth", "disable_nonce_check", 1) setting this is not a good
> > idea i think.
> >
> > thanks
> >
> >
> > 
> > *From:* Pasan Meemaduma mailto:pasan...@ymail.com>>
> > *To:* OpenSIPS users mailling list  >
> > *Sent:* Monday, July 12, 2010 16:46:26
> > *Subject:* Re: [OpenSIPS-Users] proxy_authorize("","subscriber") bug ??
> >
> > Hi Bogdan,
> >
> > Thanks for the quick reply,
> >
> > What I now suspect is the security mechanism for stale nonces
> > introduced in later 1.4 causing this. The identical configuration
> > works fine with opensips 1.4
> >
> > This problem started to appear after I upgrade server from openser to
> > opensips about a month ago.
> >
> > Loosing registration is the most worst problem since its affecting
> > incoming calls.
> >
> > For the moment what I did was add the following in my opensips.cfg
> > after going through the mailing list archives.
> >
> >
> > modparam("auth", "disable_nonce_check", 1)
> >
> > As I understood opensips reject nonce which is used before even if it
> > send with correct credentials. This could be the problem that
> > Re-INVITEs get 407 .
> >
> > I can't do much changes to observe more debuging information like
> > setting set debug =6  as this is a production server.
> >
> > I'm going to apply the new setting modparam("auth",
> > "disable_nonce_check", 1) tomorrow on our offpeak time and see whether
> > it will resolve the problem.
> >
> > I'll get back to here tomorrow with the results.
> >
> >
> >
> > 
> > *From:* Bogdan-Andrei Iancu  >
> > *To:* OpenSIPS users mailling list  >
> > *Sent:* Monday, July 12, 2010 15:46:18
> > *Subject:* R