Re: [OpenSIPS-Users] B2B module and CANCEL

2011-06-13 Thread Denis Putyato
Hello

 

I found that this problem appears when I use append_hf() to add some header in 
local route of the proxy1 before sending INVITE to proxy2. Without this adding 
problem disappears.

 

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Denis Putyato
Sent: Friday, June 10, 2011 5:52 PM
To: 'OpenSIPS users mailling list'
Subject: [OpenSIPS-Users] B2B module and CANCEL

 

Hello!

 

I have a such problem opensips1.6.4-2

 

There are two proxies of version 1.6.4.-2 which has been installed on the same 
server.

 

One proxy (proxy1) using B2B “top hiding” and located in /usr/local/sbc and 
using one signaling port 

Another proxy (proxy2) is just SIP proxy and located in 
/usr/local/opensips1.6.4/ and using another signaling port

 

Both proxies using the same ip address of the server

 

Call flow:

 

some UA – proxy1 – proxy2 – some gateway

 

When UA generate CANCEL then proxy1 does some strange things with FROM or TO 
uri headers (you can see it in attachment).  Because of this proxy2 cannot 
parse CANCEL properly and transaction in proxy2 cannot be canceled.

 

Thank you for any help.

 

 

 

 

 

 

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


Re: [OpenSIPS-Users] Parsing invalid Content-Length header, try to change it to a valid one

2011-06-13 Thread joel.oliveira
This was the answer on the #opensips IRC channel from the user lirakis:

   joel_oliveira, to the best of my knowledge, opensips maintains a
struct for the received sip packet that is not modifyable
   you can get data out of it and do transforms etc. and set 
headers
on the outbound packet, but there is no "preprocessing" that can be done to
the received packet before opensips parses it.
 lirakis: yes, it looks that way. It seems to me that if I
want to do some change to the behaviour of OpenSIPs regarding this kind of
parsing in particular, I have to change the parse_content_length function
itself, no?
   ... well .. i suppose you could - but I wouldnt do that unless 
it
is "okay" by the RFC to have a space in the content length
   my guess is that it is not okay
   and thus - you want to reject the header or packet entirely as
being malformed
   i just checked the rfc ABNF, space is not allowed
 lirakis: you're right. I should just plain reject it right
in the first Invite.
   yeah i mean if you pass it through .. its going to induce 
unknown
behavior in whoever has to handle the packet next - so better to drop it on
first detection
 lirakis: thanks for your time. You did enlighten me
   np

I guess I'll drop my option since is not RFC complaint. Thanks.

Best Regards,
Joel Oliveira

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Parsing-invalid-Content-Length-header-try-to-change-it-to-a-valid-one-tp6470966p6471245.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] Can't verify host before sending a call.

2011-06-13 Thread Duane Larson
With OpenSIPS you can use the
Dialogmodule
and know if a user is currently on a call or not.  This
link  should help
show you how to get started.



On Mon, Jun 13, 2011 at 1:11 PM, Israel wrote:

>  Hi list, i'm new here and started using Opensips about 1 1/2 week using
> it as a proxy for asterisk.
>
> I'm using load_balancer for my resources but i can't check if the host that
> i'll reply the call is ok to receive that call. only when probing makes it's
> unable to send calls.
>
> There is a way to check the status before reply the route?
>
> Thanks so much.
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


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


[OpenSIPS-Users] Can't verify host before sending a call.

2011-06-13 Thread Israel
Hi list, i'm new here and started using Opensips about 1 1/2 week using it as a 
proxy for asterisk.

I'm using load_balancer for my resources but i can't check if the host that 
i'll reply the call is ok to receive that call. only when probing makes it's 
unable to send calls.

There is a way to check the status before reply the route?

Thanks so much.


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


[OpenSIPS-Users] Parsing invalid Content-Length header, try to change it to a valid one

2011-06-13 Thread joel.oliveira
Hi all,

>From a little time until now I got some faulty equipments ( mainly Fritzbox
) that send a bad Content-Length header (e.g. "Content-Length: 4294967294
361" ) resulting in the next messages on OpenSIPs debug and ending the call
without even forwarding the first Invite:

Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:nathelper:extract_body: failed to get the message body
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:nathelper:fix_nated_sdp_f: cannot extract body from msg!
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:pv_get_hdr:
error parsing headers
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:auth:find_credentials: failed to parse headers
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:auth:pre_auth: failed
to find credentials
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:build_res_buf_from_sip_req: parse_headers failed
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:sl:sl_send_reply_helper: response building failed
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:signaling:sig_send_reply_mod: failed to send reply with sl module
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:auth:pre_auth: failed
to send 400 reply

So, what I wanted to do would be to look into the Content-Length header and
in case it has two or more values change it so it becomes valid.

Something like :

if ( is_present_hf("Content-Length") )
{
$avp(s:content-length) = $(hdr(Content-Length){s.select,1, });

if ( $avp(s:content-length) != NULL )
{
remove_hf("Content-Length");
append_hf("Content-Length: $avp(s:content-length)", "Allow");
}
}


So for now my problem is where can I change the Content-Length? In main
route I only change the forwarded message and in error_route I cannot access
the headers.

Can anyone shed me a little light on the right direction.

Thanks for your time,
Joel Oliveira


--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Parsing-invalid-Content-Length-header-try-to-change-it-to-a-valid-one-tp6470966p6470966.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] Route group inside of drouting

2011-06-13 Thread Andrew Pogrebennyk

On 13.06.2011 16:40, Kent Pirlo wrote:

212555, gwlist = 3,5,1

now.. lets say gw "3" actually needs to try multiple ips for that 
carrier before going on to gw "5", is this possible while using 
drouting or do i need to scrap the drouting module to do something 
complex like this..


It is possible and described in the module documentation:

Also the module allows the usage of groups in the destination lists. A 
group of destinations is delimited by semi-colon char. inside the whole 
destination list ( like: 2,4;5,78,23;4;7;2 ). The destinations from 
within a group may be act differently (like load-balancing, random 
selection, etc), depending of the “sort_order” parameter - more about 
this is available under the “do_routing()” function section.


http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id294582

--
Sincerely,
Andrew Pogrebennyk


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


Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-13 Thread Tushar Jain
Hi,

I tried to debug, and found that after some calls resources for both the sip
servers are to be 0 (selected for LB set with free=0 (max=0)) though max
resource should be 5 and 4 respectively  as set in database

mysql> select * from load_balancer;
++--+---+---++-+
| id | group_id | dst_uri | resources |
probe_mode | description |
+++---+---+---+-+
|  1 |2| sip:OpenSIPs@x.x.x.1  | sip=5 |  2
  | SW#1|
|  2 |2| sip:OpenSIPs@x.x.x.2  | sip=4 |  2
  | SW#2|
++--+---+---++-+
2 rows in set (0.00 sec)

Logs of a call when the user get service full message-
--

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:build_new_dlg:
new dialog 0xaf3a30e0
(c=b572b37109405e2cZTQ4M2IyNWE0MDhmNjIwZTJlNzdiYTJiZjA5NWM3Yzc.,f=sip:1000@x.x.x.x
,t=sip:12127773456@OpenSIPs,ft=654b3f0e) on hash 2221

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:core:parse_headers:
flags=

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:init_leg_info:
route_set , contact sip:1000@x.x.x.x:62516, cseq 1 and bind_addr
udp:x.x.x.x:5060

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:dlg_add_leg_info:
set leg 0 for 0xaf3a30e0: tag=<654b3f0e> rcseq=<1>

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:link_dlg: ref dlg
0xaf3a30e0 with 3 -> 3

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:rr:add_rr_param: adding
(;did=da8.8b87f721) 0x81b5c24

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: destination 
selected for LB set with free=0 (max=0)

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: destination 
selected for LB set with free=0 (max=0)

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: no destination found

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:core:comp_scriptvar: int
26 : -2 / 0

Please let me know how to make the LB work effectively
-- 
Regards

Tushar Jain


"two roads diverged in a wood, and I - I took the one less traveled by, and
that has made all the difference"

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


[OpenSIPS-Users] Help to resolve Openxcap test suite errors

2011-06-13 Thread Nethra Chander
Hello,
I have failures reported while executing the test suite of openxcap. Please
find attached the file with the test results.

I have openxcap installed in one box while opensips and opensips-mi-proxy
are installed in another machine.
I dont have mi_xmlrpc module loaded in the opensips server.

The log file in the openxcap server has below errors:

openxcap[22941]: Starting factory 
openxcap[22941]: error: Error while notifying OpenSIPS management interface
for user 1...@xxx.com: 
openxcap[22941]: Starting factory 


While the log file at the opensips end shows the below errors

 opensips-mi-proxy[28624]: Got XMLRPC request from xx.xx.xx.xx:
refreshWatchers (sip:1...@xxx.com presence 0)
/sbin/opensips[28592]: ERROR:presence:mi_refreshWatchers: no rules doc found
for the user
 /sbin/opensips[28592]: ERROR:mi_datagram:mi_datagram_server: failed to
process the command
 opensips-mi-proxy[28624]: error: Error while processing command
refreshWatchers (sip:1...@xxx.com presence 0): 500 command failed


Please, can some one assist me in resolving these errors. I guess I am
missing some configuration.
Appreciate any assistance.

Thank you.
test_operations1 (test_resourcelists.DocumentTest) ... FAIL
test_operations2 (test_resourcelists.DocumentTest) ... FAIL
test_operations3 (test_resourcelists.DocumentTest) ... ok
test_operations4 (test_resourcelists.DocumentTest) ... ERROR
test_ns_bindings (test_nsbindings.NSBindingsTest) ... ok
test_has_global (test_global.TestGlobal) ... ok
test_no_global (test_global.TestGlobal) ... ok
test_conditional_GET (test_etags.ETagTest) ... ok
test_conditional_PUT (test_etags.ETagTest) ... ok
test_conditional_PUT_2 (test_etags.ETagTest) ... ok
test_conditional_GET (test_etags.ETagTest2) ... ok
test_conditional_PUT (test_etags.ETagTest2) ... ok
test_etag_parsing (test_etags.ETagTest2) ... ok
test_get (test_watchers.Test) ... ok
test_schema (test_xcap_caps.XCAPCaps) ... ok
test_operations1 (test_rlsservices.DocumentTest) ... ok
test_operations2 (test_rlsservices.DocumentTest) ... ok
test_operations3 (test_rlsservices.DocumentTest) ... ok
test_operations4 (test_rlsservices.DocumentTest) ... ok
test_global_auth (test_auth.AuthTest_org_openmobilealliance_pres_rules) ... ok
test_users_auth (test_auth.AuthTest_org_openmobilealliance_pres_rules) ... ok
test_global_auth (test_auth.AuthTest_pidf_manipulation) ... ok
test_users_auth (test_auth.AuthTest_pidf_manipulation) ... ok
test_global_auth (test_auth.AuthTest_pres_rules) ... ok
test_users_auth (test_auth.AuthTest_pres_rules) ... ok
test_global_auth (test_auth.AuthTest_resource_lists) ... ok
test_users_auth (test_auth.AuthTest_resource_lists) ... ok
test_global_auth (test_auth.AuthTest_rls_services) ... ok
test_users_auth (test_auth.AuthTest_rls_services) ... ok
test_global_auth (test_auth.AuthTest_test_app) ... ok
test_users_auth (test_auth.AuthTest_test_app) ... ok
test_global_auth (test_auth.AuthTest_watchers) ... ok
test_users_auth (test_auth.AuthTest_watchers) ... ok
test_global_auth (test_auth.AuthTest_xcap_caps) ... ok
test_users_auth (test_auth.AuthTest_xcap_caps) ... ok
Testing different ways of inserting an element as described in examples from 
Section 8.2.3 ... ok
Testing PUT requests of form '*[@att="some"]' which require looking into body 
of PUT ... ok
test_replacement (test_element_put.PutElementTest) ... ok
test_delete (test_attribute.AttributeTest) ... FAIL
test_get (test_attribute.AttributeTest) ... FAIL
test_put (test_attribute.AttributeTest) ... FAIL
test_delete (test_element.ElementTest) ... FAIL
test_get (test_element.ElementTest) ... FAIL
test_put_error (test_element.ElementTest) ... FAIL
test_xpath10_valid (test_xpath.XPathTest) ... ok
test_xpath11_valid (test_xpath.XPathTest) ... ok
test_xpath12_valid (test_xpath.XPathTest) ... ok
test_xpath1_valid (test_xpath.XPathTest) ... ok
test_xpath2_invalid (test_xpath.XPathTest) ... ok
test_xpath3_invalid (test_xpath.XPathTest) ... ok
test_xpath4_invalid (test_xpath.XPathTest) ... ok
test_xpath5_invalid (test_xpath.XPathTest) ... ok
test_xpath6_invalid (test_xpath.XPathTest) ... ok
test_xpath7_invalid (test_xpath.XPathTest) ... ok
test_xpath8_invalid (test_xpath.XPathTest) ... ok
test_xpath9_valid (test_xpath.XPathTest) ... ok
test_pidf_manipulation (test_presrules.PresenceRulesTest) ... ok
test400_1 (test_errors.ErrorsTest) ... ok
test400_2 (test_errors.ErrorsTest) ... ok
test404 (test_errors.ErrorsTest) ... ok
test405 (test_errors.ErrorsTest) ... ok
test409 (test_errors.ErrorsTest) ... ok
test_gibberish (test_errors.ErrorsTest) ... ok
test_pidf_manipulation (test_pidf.PIDFTest) ... ok
test_errors (test_fragment.FragmentTest) ... ok
test_success (test_fragment.FragmentTest) ... ok

==
ERROR: test_operations4 (test_resourcelists.DocumentTest)
--
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/xcap/test/tes

[OpenSIPS-Users] Route group inside of drouting

2011-06-13 Thread Kent Pirlo
Okay, so using the drouting module I can handle a basic LCR by organizing
the gwlist for each prefix.

Say i have something like this:

212555, gwlist = 3,5,1

now.. lets say gw "3" actually needs to try multiple ips for that carrier
before going on to gw "5", is this possible while using drouting or do i
need to scrap the drouting module to do something complex like this..

thanks in advance for any ideas.

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