Re: [OpenSIPS-Users] Error "Commands out of sync; you can't run this command now "

2012-10-22 Thread David Cunningham
Hi Bogdan,

Thank you for the reply.


On 21 October 2012 07:16, Bogdan-Andrei Iancu  wrote:

> **
> Hi David,
>
> There were several fixes, mainly related to error handling. Now,
> considering that the DB connections are shared between modules (inside the
> same process), maybe the faulty module was not the presence, but in other
> module.
>
> Anyhow 1.4 is really ancient version and not officially supported at all,
> so I strongly suggest to move on with a newer version.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 10/19/2012 07:36 AM, David Cunningham wrote:
>
> Hi Vlad,
>
> This was on OpenSIPS 1.4.5, so pretty old. It was a once-in-a-year event
> so I'm not sure if we're going to be able to do any useful debugging on
> this system unfortunately.
>
> Does 1.8 have a known fix for this error?
>
> Thank you.
>
>
> On 17 October 2012 22:36, Vlad Paiu  wrote:
>
>>  Hello,
>>
>> What version of OpenSIPS are you using ? Can you please upgrade to 1.8
>> and see if the problem still appears ?
>>
>> Still, this seems like a recurring issue ( already being reported by
>> multiple people ), so I'll send you a patch that will help in debugging
>> such issues.
>>
>> Regards,
>>
>> Vlad Paiu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>>  On 10/15/2012 02:46 AM, David Cunningham wrote:
>>
>>  Hello,
>>
>> We recently experienced a database error "Commands out of sync; you can't
>> run this command now". I understand this is a known issue with presence.
>> Can anyone advise what version it was fixed in?
>>
>> Thank you!
>>
>> Oct 12 10:34:01 myhost /sbin/opensips[10735]:
>> ERROR:db_mysql:db_mysql_submit_query: driver error on query: Commands out
>> of sync; you can't run this command now
>> Oct 12 10:34:01 myhost /sbin/opensips[10735]: ERROR:core:db_do_query:
>> error while submitting query
>> Oct 12 10:34:01 myhost /sbin/opensips[10735]: ERROR:auth_db:get_ha1:
>> failed to query database
>>
>>
>> --
>> David Cunningham, Voisonics
>> http://voisonics.com/
>> USA: +1 213 221 1092
>> UK: +44 (0) 20 3298 1642 <%2B44%20%280%29%2020%203298%201642>
>> Australia: +61 (0) 2 8063 9019 <%2B61%20%280%29%202%208063%209019>
>>
>>
>>
>>  ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> David Cunningham, Voisonics
> http://voisonics.com/
> USA: +1 213 221 1092
> UK: +44 (0) 20 3298 1642
> Australia: +61 (0) 2 8063 9019
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] OpenSIPS 1.8.0-1 with B2BUA/top hiding and UPDATE dialog hiccups

2012-10-22 Thread Jock McKechnie
I have a problem with a very simple OpenSIPS doing B2BUA topology
hiding that is unable to handle incoming UPDATEs from the server-side.
The proxy does not tie the UPDATE to the in-progress dialog, and so it
warns with a "No dialog found" error.

I was able to locate a post from earlier this year (March, I think)
with this same issue, and one of the devs patched the daily to correct
it. I'm running the latest 1.8.0-1 from the opensips Debian package
repository and it does not appear to be patched with this fix.
Unfortunately I can't find the post again to determine when the patch
was actually made and to what revision.

Did the patch go in and this feature was broken again, is the patch
not in this release, or am I just stupid?

My thanks!

 - Jock

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


Re: [OpenSIPS-Users] ACK looping issue with end-point co-located with OpenSIPS

2012-10-22 Thread Daniel Eiland
Hey folks,

Just wanted to say thanks and provide an update in case others have this
issue.

The problem was essentially that the ip address was in the domain table.  I
removed it from the domain table, adding it as an alias in the cfg and
added an additional uri==myself when determining if an incoming call was
local for a local host.

Thanks again,
-Daniel

On Tue, Oct 16, 2012 at 4:33 AM, Andrew Pogrebennyk <
apogreben...@sipwise.com> wrote:

> Daniel,
> have you added perhaps your IP address to the domain table?
> It is not supposed to be there and should be removed, otherwise opensips
> thinks 192.168.117.4:5070 is itself as others pointed out.
>
> Also, if you have any checks in your script like:
> if ( !is_from_local()  && !is_uri_host_local() )
> you should replace them with the version which doesn't use domain table:
> if ( from_uri != myself && uri != myself )
>
> HTH.
> Andrew
>
> On 10/16/2012 02:33 AM, Ali Pey wrote:
> > What do you have for alias in your opensips.cfg? Opensips seems to
> > think 192.168.117.4:5070  is itself.
> >
> > Regards,
> > Ali Pey
> >
> >
> > On Mon, Oct 15, 2012 at 6:33 PM, Daniel Eiland  > > wrote:
> >
> > Hi folks,
> >
> > I've got an issue with ACK messages being looped when they are sent
> > to an endpoint that is co-located with my OpenSIPS proxy.
> >
> > I've got OpenSIPS located on server A @ port 5060 and two conference
> > endpoints: C01 on server A @ port 5070 and C02 on a separate server.
> >
> > When my client calls into C01, the ACK message is continually routed
> > by OpenSIPS back into itself instead of the conference endpoint
> > listening on port 5070.  This doesn't happened when I call into C02,
> > OpenSIPS properly routes it to the right destination.
> >
> > When I compare the two ACKs, they are fairly similar and when I
> > looked at some OpenSIPS logs both messages are being routed in a
> > similar fashion namely loose_route is true.  The only difference
> > (which I'm sure if the problem, I'm just not sure why) is that the
> > ACK to C01 has Destination User ($du) of 192.168.117.4 while the ACK
> > to C02 has a $du of NULL.
> >
> > If anyone has any suggestions, I'd be grateful.
> >
> > Thanks,
> > Daniel
> >
> > Also here are the two ACKs for comparison:
> >
> > ACK sip:C01@192.168.117.4:5070;transport=udp SIP/2.0
> > Via: SIP/2.0/UDP
> >
> QWE.RTY.XYZ.ABC:2453;rport;branch=z9hG4bKPjca04290517874935af64a839e6bf9701
> > Max-Forwards: 70
> > From: "deiland"  >  >>;tag=d02a111d4a064b05a7cf987b006bd001
> > To:  > >;tag=ma94e0688avFj
> > Call-ID: 5c35c0a5dcb442a9afd324c988bd0a3c
> > CSeq: 24503 ACK
> > Route: 
> > User-Agent: Blink 0.2.7 (Windows)
> > Content-Length:  0
> >
> >
> > ACK sip:C02@192.168.155.211:5070;transport=udp SIP/2.0
> > Via: SIP/2.0/UDP
> >
> QWE.RTY.XYZ.ABC:2122;rport;branch=z9hG4bKPj5318936898454066944aadf64ad846d0
> > Max-Forwards: 70
> > From: "deiland"  >  >>;tag=ff6fb0856e264e7f96601529148bb206
> > To:  > >;tag=54aZ48KZ7a9Xj
> > Call-ID: afddb9bea6714f95bd84dff2159e2b14
> > CSeq: 11988 ACK
> > Route: 
> > User-Agent: Blink 0.2.7 (Windows)
> > Content-Length:  0
> >
> >
> >
> > ___
> > 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


[OpenSIPS-Users] tm module CANCEL reason on timeout

2012-10-22 Thread John Quick
In "modules/tm/timer.c" function "final_response_handler", a #define is used
to set the Reason header in the CANCEL when triggered by the invite timeout.
The default is cause=480;text="NO_ANSWER", but I think it should be 408
because 408 is timeout and 480 is temporarily unavailable.

I need to be able to control the Reason header when a timeout is triggered
in tm. When the call is being sent to our SS7 gateway, we need the reason
header to be set as follows:
Reason: Q.850;cause=19;text="No Answer"
When the call is going to a SIP device, I want the header to be like the
current default:
Reason: SIP;cause=408;text="NO_ANSWER"

Is it permissible to add 2 reason headers or to somehow append different
reasons for different transports to one header?

Could the developers put this on the roadmap please - to add functionality
to have more control over the reason header in the tm module on timeout.

Many thanks.

John Quick
Smartvox Limited




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


Re: [OpenSIPS-Users] Load Balancer Issue

2012-10-22 Thread Nilanjan Banerjee
Thanks Bogdan for taking time to respond to my post. I think you have
guessed it right, I am using the sample routing script given in the Load
Balancer (LB) tutorial and that is most likely sending the ACK and BYE
messages directly to Client 2 bypassing the Proxy. The routing code
snippets I am using at the LB and the Proxy are shown below. Could you
please tell me what's going wrong over here? I am using record route
support at both the clients. Alternatively if you could please tell me what
should go in the routing blocks of the LB and the Proxy so that all the
messages go through the LB and the Proxy then that will be of immense help
too.

Regards,
Nil.



Load Balancer:


route{
if (!mf_process_maxfwd_header("3")) {
sl_send_reply("483","looping");
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request -> obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do balancing

 load_balance("1","sc");


# LB function returns negative if no suitable destination (for
requested resources) is found,
# or if all destinations are full
if ($retcode<0) {
 sl_send_reply("500","Service full");
 exit;
}

xlog("Selected destination is: $du\n");

# send it out
if (!t_relay()) {
sl_reply_error();
}
}



Proxy:


route{
record_route();
if (!t_relay()) {
 #   xlog("L_ERR","sl_reply_error\n");
sl_reply_error();
}
}


On Sun, Oct 21, 2012 at 7:39 PM, Bogdan-Andrei Iancu wrote:

> **
> Hi Nil,
>
> I wild guess is you are not correctly do "loose_route" on the LB, so
> instead of following the Route (to OpenSIPS Proxy), it goes directly to end
> destination in RURI (Client 2).
>
> Of course, I assume that all parties (LB + Proxy) do record_route() for
> the call, right ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote:
>
> Hello,
>
>   I am trying to build the following setup using OpenSIPS load balancer
> and the proxy functionality:
>
> Client 1 (sipp) <> OpenSIPS Load Balancer <> OpenSIPS Proxy <>
> Client 2 (sipp)
>
> At the client ends I am using the following commands:
>
> Client 1: sipp -sn uac -rsa [Load Balancer Address] [Client 2 Address]
>
> Client 2: sipp -sn uas
>
> The Load Balancer is configured with a destination as the OpenSIPS Proxy
> and the Proxy is configured to simply forward the SIP messages based on IP
> address (using only forward(); in the routing block).
>
> Now everything (INVITE, OK and ACK messages) works fine except the BYE
> messages that are getting forwarded by the Load Balancer directly to Client
> 2 unlike the INVITE, OK and ACK messages that traverse the Proxy. Client 2
> however, sends the OK to the BYE to the OpenSIPS Proxy. Since the BYE
> messages do not traverse the Proxy, the OK to the BYE messages are getting
> retransmitted repeatedly by Client 2 and the sessions are not getting
> terminated properly. How do I make the BYE messages to go through the Proxy
> or the OK message sent directly to the Load Balancer so that the
> retransmissions do not happen and the sessions get terminated properly?
>
> [NB: When the Load Balancer is taken out of the loop and the Proxy
> configuration is kept the same, all the SIP messages traverses the Proxy
> and everything works fine i.e., the BYE and the OKs to the BYEs are handled
> properly and sessions get terminated properly.]
>
> Would greatly appreciate any help in this matter. Thanks in advance.
>
> Nil.
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Invalid contacts in location table, TCP timeout

2012-10-22 Thread Fabian Bernhard
Dear list

We develop SIP clients and have an OpenSIPS 1.8.0 test server. We are bound
to use TCP and frequently kill the clients without unregistering. This
leads to invalid contacts in the location table.

It often takes a long time for an INVITE or MESSAGE to be forwarded by the
server. In syslog we see a lot of these entries:

Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcpconn_connect: tcp_blocking_connect failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcp_send: connect failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:tm:msg_send: tcp_send failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:tm:t_forward_nonack: sending request failed

I think that OpenSIPS tries to forward the messages to all contacts in the
location table, one contact after the other. Because some of them are not
valid anymore the server is unable to send the message. This means that it
takes 30 seconds for an INVITE to be received if there are 3 old contacts
in the location table, due to the 10 seconds timeout.

I have hoped that the following configuration would resolve the problem. I
thought it would make OpenSIPS to send the message to the most recent
contact first:

modparam("usrloc", "desc_time_order", 1)

It turned out that this is not the case, for whatever reason.

My questions:

1/ Is this behavior normal and expected? I.e. waiting 10 seconds for the
TCP timeout before trying the next contact in the location table?
2/ Is there a way to configure OpenSIPS to a) send the messages in parallel
to all contacts and b) to delete invalid contacts from location table upon
above error?
3/ Can I reduce the TCP timeout to something like 2 seconds? If yes: how?

Thanks and best regards

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


[OpenSIPS-Users] Hangup call on leg B side

2012-10-22 Thread pars3c
Hi ,

 

i don't know how to realize this:

 

 

A --- INVITE>proxy INVITE> B

   <--- 200 OK

   ---BYE>

   ---INVITE ->C

<--- 200 OK proxy<--- 200 OK

---ACK --->  ---ACK --->

 

 

When B answer the call, the proxy should immediately hang up the call and
make a new invite. For user A is always the same call.

I tried this :

 

onreply_route  {

 

      connect

   if (is_method("INVITE") && status == "200") {

 dlg_bye("callee");

 drop();

   }

}

 

But it doesn't  work. When arrive 200 , the proxy drop the message to the
user a , wait for a while, and then send a cancel to b (it should send a
BYE, instead send a CANCEL, probably because it not have a ACK).

How can I try this?

 

Thanks

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