[OpenSIPS-Users] Problem with 200 OK after BYE

2017-10-16 Thread Dragomir Haralambiev
Hello,

I use Opensips 2.3 in follow scheme:

SBC ---Opensips --Zoiper

When Opensips Send BYE to SBC, SBC not return 200 OK.

Zoiper send BYE to Opensips.

BYE sip:Opensips_IP:Opensips_port;did=363.27c9faa4 SIP/2.0
Via: SIP/2.0/UDP
Zoiper_IP:32346;branch=z9hG4bK-524287-1---fed42b1d179cd7b0;rport
Max-Forwards: 70
Contact: 
To: ;tag=ff435000ff02ff10ff0c2916
From: ;tag=fc281b10
Call-ID: 90425000ee02e510800c2916c...@sbc.site.com
CSeq: 2 BYE
User-Agent: Z 5.1.7 rv2.8.51
Content-Length: 0

Opensips send BYE to SBC.

BYE sip:555300@SBC_IP;user=phone SIP/2.0
Via: SIP/2.0/UDP Opensips_IP:Opensips_port;branch=z9hG4bK7931.161e4d25.0
Max-Forwards: 69
Contact: 
To: ;tag=ff435000ff02ff10ff0c2916
From: ;tag=fc281b10
Call-ID: 90425000ee02e510800c2916c...@sbc.site.com
CSeq: 2 BYE
User-Agent: Z 5.1.7 rv2.8.51
Content-Length: 0

SBC have not return 200 OK.

How to setup Opensips to improve this problem?

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


[OpenSIPS-Users] s.escape.param transformation

2017-10-16 Thread Ben Newlin
Hi,

I think I’ve found an error in the escape transformations for parameters. The 
{s.escape.param} transformation is escaping many characters it shouldn’t.

For example, the following code:

$var(test) = "MYH 713";
xlog("L_ALERT", "test: $(var(test){s.escape.param})\n");

produces this output:

test: %4d%59%48%20%37%31%33

Only the space character should have been converted, not all characters.

In looking through the source code, I think the problem is that the alphanum 
group of allowed characters is completely missed during the transformation in 
the escape_param function in strcommon.c. For comparison, the escape_user 
function has the following code allowing alphanum characters to copied without 
conversion:

if (isdigit((int)*p) || ((*p >= 'A') && (*p <= 'Z')) || ((*p >= 'a') && (*p <= 
'z')))
{
*at = *p;
} else {
switch(*p) {
…
I think similar logic is supposed to be in escape_param but is absent, 
resulting in all alphanum characters being converted to hex.

Thanks,

Ben Newlin

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


[OpenSIPS-Users] opensips version 2.2 -Cache and location table out of sync for particular registrations.

2017-10-16 Thread Jonathan Hunter
Hi Guys,

I have an interesting issue and wondered if anyone else has seen this issue.

We have a user who is registered with the platform and can make and receive 
calls, however the registration is only ever in the cache, it is not being 
populated in the location table.

When I check its state I can see it registered, and I see its state go from 
CS_DIRTY, to CS_SYNC as it re-registers;

opensipsctl ul show 02033279460@sip.provider
AOR:: 02033279460
Contact:: sip:02033279460@WANIP:5060 Q=
Expires:: 266
Callid:: 5820966e249dce1b6796222708c8d94b@sip.provider
Cseq:: 11070
User-agent:: Asterisk PBX
State:: CS_DIRTY
Flags:: 0
Cflags::
Socket:: udp:91.X.X.X:5060
Methods:: 4294967295

opensipsctl ul show 02033279460@sip.provider
AOR:: 02033279460
Contact:: sip:02033279460@WANIP:5060 Q=
Expires:: 224
Callid:: 5820966e249dce1b6796222708c8d94b@sip.provider
Cseq:: 11070
User-agent:: Asterisk PBX
State:: CS_SYNC
Flags:: 0
Cflags::
Socket:: udp:91.X.X.X:5060
Methods:: 4294967295


However it isn't contained within the location table, even though other 
registrations are contained in both, as we have the following set;

modparam("usrloc", "db_url", "DBURL")
modparam("usrloc", "db_mode",   2)
modparam("usrloc", "timer_interval", 60)

I have tried to reproduce the issue but cant seem to, the REGISTER message 
being sent looks like the below;



Request-Line: REGISTER sip:sip.provider SIP/2.0
Message Header
Via: SIP/2.0/UDP 91.X.X.X:5060;branch=z9hG4bK-25033-1-3
Max-Forwards: 70
From: ;tag=1
To: 
Call-ID: 1-25033@91.X.X.X
CSeq: 8 REGISTER
Supported: replaces, timer
User-Agent: Asterisk PBX
Authorization: Digest 
username="02033279460",realm="sip.provider",uri="sip:91.X.X.X:5060",nonce="59e4d0ae00019388ae5161ff1f5d2666a1d2adb6e77d",response="e2f9ffb2ccf33c864adb76c950c2221c",algorithm=MD5
Expires: 120
Contact: sip:02033279460@91.X.X.X:5060
Content-Length: 0

Note its send the Auth header in initial REGISTER before the 401 challenge.

Does anyone have any tips please on where the issue might be or how best to 
trouble-shoot on a busy live platform?

Many thanks!

Jon

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