Re: [OpenSIPS-Users] Registration Handling.

2016-02-09 Thread Ovidiu Sas
Have you set the use_domain parameter?
http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id294320

-ovidiu

On Tue, Feb 9, 2016 at 2:28 PM, Jim DeVito  wrote:
> Hi All,
>
> This may be me not doing this right at all but I would like some insight.
>
> What I want to do: UAC send register to OpenSIPS. OpenSIPS rewrites the URI
> and relays it to the actual registrar. When registrar sends back a 200 OK
> OpenSIPS catches it in the reply route and calls save("location","r","$fu")
> and the 200 OK gets relayed back to original UAC.
>
> This is actually working. It saves me from having to maintain the
> subscribers tables and essentially authenticating the UAC twice. Once for
> OpenSIPS and one for the final registrar.
>
> Here is the problem. FROM header in 200 OK looks like this From:
> ;tag=as6211061c however ONLY the username part of the
> URI ends up in the location table. This makes it hard to do a
> lookup("location") later.
>
> A push in the right direction would be great.
>
> Thanks!!
>
> --
> Jim DeVito
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com

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


Re: [OpenSIPS-Users] Registration Handling.

2016-02-09 Thread Jim DeVito
Well. I bet that is it. In my head I thought I did because it did for 
another module. Thanks for the reminder!


---
Jim DeVito

On 2016-02-09 11:51, Ovidiu Sas wrote:

Have you set the use_domain parameter?
http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id294320

-ovidiu

On Tue, Feb 9, 2016 at 2:28 PM, Jim DeVito  wrote:

Hi All,

This may be me not doing this right at all but I would like some 
insight.


What I want to do: UAC send register to OpenSIPS. OpenSIPS rewrites 
the URI
and relays it to the actual registrar. When registrar sends back a 200 
OK
OpenSIPS catches it in the reply route and calls 
save("location","r","$fu")

and the 200 OK gets relayed back to original UAC.

This is actually working. It saves me from having to maintain the
subscribers tables and essentially authenticating the UAC twice. Once 
for

OpenSIPS and one for the final registrar.

Here is the problem. FROM header in 200 OK looks like this From:
;tag=as6211061c however ONLY the username part of 
the

URI ends up in the location table. This makes it hard to do a
lookup("location") later.

A push in the right direction would be great.

Thanks!!

--
Jim DeVito

___
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] How to send a call request to every online peer?

2016-02-09 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

What you are looking for is called in SIP terminology "parallel forking" 
- a call attempt is sent to multiple destinations in the same time and 
only one can pick up the call.


In OpenSIPS you can easily do parallel forking by adding multiple 
destinations / branches by using the append_branch() function:

http://www.opensips.org/Documentation/Script-CoreFunctions-2-1#toc3

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.02.2016 16:05, Rodrigo Pimenta Carvalho wrote:



Hi.


I have the situation:


Caller A needs call every online peer. That is, A needs call B, C, D, F...

The user should just push a 'call button' in his/her softphone and 
than OpenSIPs should receive only one SIP INVITE (let's say inviting 
number ). After receiving such INVITE, OpenSIPS should spread the 
request to every one. That is: SIP INVITE B, SIP INVITE C, SIP INVITE 
D, and so on.



In addiction, If one answers the call, others should receive SIP BYE 
immediately. Because A wants to call just with one peer and doesn't 
matter who will answer first. It is not a conference.



What kind of functionality am I talking about, in terms of OpenSIPS?

Is it possible?

Is the code simple?




Any hint will be very helpful!

Thanks a lot.




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
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] [BOOK] Building Telephony Systems with OpenSIPS - 2.1 version

2016-02-09 Thread Schneur Rosenberg
Chapter 1, page 11 (page 36 of the eBook) on the bottom of the page there
is a initial invite of userA calling userB, and the contact is of userB, it
should be userA
On Feb 8, 2016 3:13 PM, "Bogdan-Andrei Iancu"  wrote:

> Hi Schneur,
>
> Could you point the name of the chapter and the context of that mistake,
> so I can double check it ?
>
> Thanks & Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 07.02.2016 14:53, Schneur Rosenberg wrote:
>
> I bought the book and I think I found the first mistake, in the initial
> invite packet on page 11, the contact header is of the destination and not
> of the origination UAC
> On Feb 4, 2016 3:37 PM, "Bogdan-Andrei Iancu"  wrote:
>
>> Hello all,
>>
>> Flavio Goncalves and I are happy to announce the publishing of the second
>> edition of "Building Telephony Systems with OpenSIPS", covering OpenSIPS
>> version 2.1 .
>>
>> Also many thanks to the Packt Publishing house for making it happened and
>> to all our reviewers who help us to make this book better.
>>
>>
>> https://www.packtpub.com/networking-and-servers/building-telephony-systems-opensips-second-edition
>>
>> Enjoy !
>>
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> ___
> 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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Pike Module Question

2016-02-09 Thread Brian ::
Hi List

When checking incoming requests with pike how would I do a lookup to see if
the IP belongs to a UA in the location table? ie - is there a function to
check if request is from registered subscriber while using pike?

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


[OpenSIPS-Users] Opensips and Radius

2016-02-09 Thread Dragomir Haralambiev
I do follow:

echo "/usr/local/lib" > /etc/ld.so.conf.d/freeradius.conf
ldconfig

make clean
make all
make install

[root@sbc sbin]# /usr/local/sbin/opensips  -f
/cdr/project/opensips/opensips.cfg
Segmentation fault


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


Re: [OpenSIPS-Users] Opensips and Radius

2016-02-09 Thread Ionut Ionita

Try
make proper #instead of make clean.
What's the output of:
ldd modules/aaa_radius/aaa_radius.so
?
Does that libfreeradius*.so where aaa_radius.so is pointing exist?

Ionut Ionita
OpenSIPS Developer

On 02/09/2016 12:01 PM, Dragomir Haralambiev wrote:

I do follow:

echo "/usr/local/lib" > /etc/ld.so.conf.d/freeradius.conf
ldconfig

make clean
make all
make install

[root@sbc sbin]# /usr/local/sbin/opensips  -f 
/cdr/project/opensips/opensips.cfg

Segmentation fault


Any idea?


___
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] Pike Module Question

2016-02-09 Thread Bogdan-Andrei Iancu

Hi Brian,

Only the development version (2.2) has such a function, is_ip_registered() :
http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294953

Still you should not skip from pike checking the IPs where users did 
registered from. They can also do flood (by mistake or on purpose).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 09.02.2016 11:41, Brian :: wrote:

Hi List

When checking incoming requests with pike how would I do a lookup to 
see if the IP belongs to a UA in the location table? ie - is there a 
function to check if request is from registered subscriber while using 
pike?


Thanks
Brian



___
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] How to TLS ?

2016-02-09 Thread Nabeel
Hi,

Does the client present a client certificate? If not, then with
modparam("proto_tls","require_cert", "1"), OpenSIPS misleadingly logs:
'failed to accept: rejected by client'.  What it actually means is that the
client failed to present a certificate.
On 9 Feb 2016 6:06 am, "Hamid Hashmi"  wrote:

> It will be a great help if you please help me in configuring TLS. I have
> followed this 
> to configure TLS but could not able to verify certificates.
>
> its working if disable following flags
>
> modparam("proto_tls","verify_cert", "0")
> modparam("proto_tls","require_cert", "0")
>
> BUT not verifying certificates. Please see logs
>  if enabled
>
> modparam("proto_tls","verify_cert", "1")
> modparam("proto_tls","require_cert", "1")
>
> then have following ERROR
>
> Feb  9 05:57:14 comoyo-dev-ec2-siplb SIPLB[29867]: 
> [udp:keepalive@192.168.26.181:8000]: Receive request OPTIONS from local 
> server [192.168.26.181]
> Feb  9 05:57:14 comoyo-dev-ec2-siplb SIPLB[29868]: 
> ERROR:proto_tls:tls_accept: New TLS connection from 115.186.93.1:47015 failed 
> to accept: rejected by client
> Feb  9 05:57:14 comoyo-dev-ec2-siplb SIPLB[29868]: 
> ERROR:proto_tls:tls_read_req: failed to do pre-tls reading
> Feb  9 05:57:17 comoyo-dev-ec2-siplb SIPLB[29863]: 
> [tcp:siplb@192.168.26.180:6080]: In LOCAL Route sending OPTIONS to 
> 192.168.26.181
> Feb  9 05:57:17 comoyo-dev-ec2-siplb SIPLB[29863]: 
> INFO:core:probe_max_sock_buff: using snd buffer of 244 kb
> Feb  9 05:57:17 comoyo-dev-ec2-siplb SIPLB[29863]: 
> INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 17
>
> Regards
> *Hamid R. Hashmi*
>
>
> ___
> 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] increase CSeq

2016-02-09 Thread Bogdan-Andrei Iancu

Hi Artem,

Could you please open a ticket on GITHUB, so we can investigate your report.

Thanks and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.02.2016 12:29, Чалков Артём wrote:


Hi all!
I use opensips 2.1 with uac module. One of my carriers wants to 
authenticate not only INVITE, but also BYE request. In this case i 
have to increase CSeq of second BYE (with authentication header), but 
opensips don't increase CSeq itself, so i should increase it manually 
in failure_route after call uac_auth function. For INVITE 
authentication process, opensips increase CSeq automatically, so 
question is can opensips increase CSeq of some authenticating requests 
besides INVITE (eg UPDATE, BYE) and if it could be done, how to do it?




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


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


Re: [OpenSIPS-Users] OpenSIPS 2.1 Edge Proxy Config

2016-02-09 Thread Răzvan Crainea

Hi, John!

Just uploaded the configuration file here[1].

[1] 
http://opensips.org/pub/events/2015-05-12_OpenSIPS-Summit_Amsterdam/Razva_Crainea-OpenSIPS_Summit2015-EdgeProxy.cfg


Best regards,
Răzvan

On 02/09/2016 03:43 AM, John Mathew wrote:

Razvan,

Can you please share the OpenSIPS 2.1 edge proxy configuration? This 
is with reference to your Opensips summit video.


--
John Mathew Divox International Inc. | Divox FZ LLC
+971-7-243-1145
+91-9037-11

john.mat...@divoxmedia.com 
www.divoxmedia.com 
375 Park Avenue, Seagram Building, Suite: 2607, New York City, New 
York, USA - 10152





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


--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

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


[OpenSIPS-Users] Getting general failure Error when trying to fetch SNMP stats.

2016-02-09 Thread Husnain Taseer
Dear Users,
I am trying to fetch SNMP stats from opensips and getting general failure
error, I have configured snmpstats module in opensips and have also
configured snmpd service on CentOS. System Packaging details are as follows:

OS Version:  CentOS Linux release 7.1.1503 (Core)
Opensips Version: Server:: OpenSIPS (2.1.1 (x86_64/linux))
SNMP Version: NET-SNMP version 5.7.2

Configuration Details and logs are as follows:

*snmpstats.so configuration:*
loadmodule "snmpstats.so"
modparam("snmpstats", "sipEntityType", "registrarServer")
modparam("snmpstats", "snmpgetPath", "/usr/bin/")

*snmpd.conf :*
*rocommunity  public*
*syslocation  "VM, Virtual DataCenter"*
*syscontact  *
*master agentx*
*agentXSockettcp:localhost:705*

*snmp.conf:*
*defVersion  2c*
*defCommunitypublic*

*snmpstats.conf*
agentXSocket tcp:localhost:705

*Output of netstat:*
[root@VoIPDevSys ~]# netstat -nlp | grep snmpd
tcp0  0 127.0.0.1:705   0.0.0.0:*   LISTEN
 28461/snmpd
udp0  0 0.0.0.0:161 0.0.0.0:*
28461/snmpd

in snmpd.log AgentX master support enabled can be seen:

*snmpd.log*
*Feb  9 16:49:45 VoIPDevSys systemd: Starting Simple Network Management
Protocol (SNMP) Daemon*
*Feb  9 16:49:45 VoIPDevSys snmpd[28461]: Turning on AgentX master support.*
*Feb  9 16:49:45 VoIPDevSys snmpd[28461]: Turning on AgentX master support.*
*Feb  9 16:49:45 VoIPDevSys snmpd[28461]: NET-SNMP version 5.7.2*
*Feb  9 16:49:45 VoIPDevSys systemd: Started Simple Network Management
Protocol (SNMP) Daemon..*


Output of different commands:

Basic command sysLocation.0 works:
*[root@VoIPDevSys opensips]# snmpbulkwalk -O s -v 2c -c  public localhost
sysLocation.0*
*sysLocation.0 = STRING: \"VM, Virtual DataCenter\"*

Command openserSIPProtocolVersion.0 also works using snmpget:
[root@VoIPDevSys opensips]# snmpget -O s -v 2c -c  public localhost
OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0
openserSIPProtocolVersion.0 = STRING: SIP/2.0

*But when I try to fetch common objects i am getting following error:*

*[root@VoIPDevSys opensips]# snmpwalk -O s -v 2c -c  public localhost
OPENSER-SIP-COMMON-MIB::openserSIPCommonObjects*
*openserSIPProtocolVersion.0 = STRING: SIP/2.0*
*Error in packet.*
*Reason: (genError) A general failure occured*
*Failed object: openserSIPProtocolVersion.0*


[root@VoIPDevSys opensips]# snmpbulkwalk -v2c -Os -c public localhost
OPENSER-REG-MIB::openser
Error in packet.
Reason: (genError) A general failure occured
Failed object: openserSIPCommonMIB.1.1.1.0

openser = No Such Object available on this agent at this OID.

Please advice where I am doing wrong, or is it a bug in getting the
complete object from snmpstats module.


*Regards,*
*Husnain Taseer*
*VoIP Developer*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] PJSIP example configuration not working

2016-02-09 Thread Mateusz Kowalski
Hello,

My problem is having Asterisk with PJSIP realtime (configured as 
https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip) not binding 
to port 5060 (or any other) by default and thus not listening for the clients.

My demo configuration looks as follows:

pjsip.conf
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

sorcery.conf

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

extconfig.conf

[settings]
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk

Unfortunately Google does not help at all. It is quite simple config, so I 
assumed it should work almost out-of-the-box. I've checked DB and it looks 
Asterisk can correctly connect and query data, the problem is with not binding 
the port itself.


Just if it my have impact, I have disabled module chan_sip completely.

Thanks for any help,
-- Mateusz

smime.p7s
Description: S/MIME cryptographic signature
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Pike Module Question

2016-02-09 Thread Schneur Rosenberg
If you have no other choice you can always use avp_dp_query to check the
contact and received fields in the location table, if you're afraid from
too many mysql requests you can cache it with memcache etc
On Feb 9, 2016 1:02 PM, "Bogdan-Andrei Iancu"  wrote:

> Hi Brian,
>
> Only the development version (2.2) has such a function, is_ip_registered()
> :
>
> http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294953
>
> Still you should not skip from pike checking the IPs where users did
> registered from. They can also do flood (by mistake or on purpose).
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 09.02.2016 11:41, Brian :: wrote:
>
> Hi List
>
> When checking incoming requests with pike how would I do a lookup to see
> if the IP belongs to a UA in the location table? ie - is there a function
> to check if request is from registered subscriber while using pike?
>
> Thanks
> Brian
>
>
>
> ___
> 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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips and Radius

2016-02-09 Thread Dragomir Haralambiev
make proper
make all
make install

[root@sbc opensips_head]# /usr/local/sbin/opensips  -f
/cdr/procject/opensips/opensips.cfg
Segmentation fault

[root@sbc opensips_head]# ldd modules/aaa_radius/aaa_radius.so
linux-gate.so.1 =>  (0x00d03000)
libfreeradius-client.so.2 =>
/usr/local/lib/libfreeradius-client.so.2 (0x00cca000)
libc.so.6 => /lib/libc.so.6 (0x002b7000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0011)
libnsl.so.1 => /lib/libnsl.so.1 (0x005c1000)
/lib/ld-linux.so.2 (0x0058b000)


[root@sbc /]# cd  /usr/local/lib

[root@sbc lib]# ls -la | grep libfreeradius
-rw-r--r--  1 root root  192936 Feb  5 10:27 libfreeradius-client.a
-rwxr-xr-x  1 root root1040 Feb  5 10:27 libfreeradius-client.la
lrwxrwxrwx  1 root root  29 Feb  5 10:27 libfreeradius-client.so ->
libfreeradius-client.so.2.0.0
lrwxrwxrwx  1 root root  29 Feb  5 10:27 libfreeradius-client.so.2 ->
libfreeradius-client.so.2.0.0
-rwxr-xr-x  1 root root  147703 Feb  5 10:27 libfreeradius-client.so.2.0.0


2016-02-09 12:31 GMT+02:00 Ionut Ionita :

> Try
> make proper #instead of make clean.
> What's the output of:
> ldd modules/aaa_radius/aaa_radius.so
> ?
> Does that libfreeradius*.so where aaa_radius.so is pointing exist?
>
> Ionut Ionita
> OpenSIPS Developer
>
> On 02/09/2016 12:01 PM, Dragomir Haralambiev wrote:
>
> I do follow:
>
> echo "/usr/local/lib" > /etc/ld.so.conf.d/freeradius.conf
> ldconfig
>
> make clean
> make all
> make install
>
> [root@sbc sbin]# /usr/local/sbin/opensips  -f
> /cdr/project/opensips/opensips.cfg
> Segmentation fault
>
>
> Any idea?
>
>
> ___
> 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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] B2B bye method handling

2016-02-09 Thread Alex Balashov

Ross,

Could you provide a libpcap-formatted capture of this scenario, either 
on-list or privately?


-- Alex

On 02/09/2016 04:35 PM, Ross wrote:


(I'm new to opensips, so bare with me if I'm off track).

I setup a very simple configuration using b2bua for a quick top hiding
setup/proxy, and it works correctly, except for handling BYE messages
coming from the upstream connection. Note, db_mode is set to 0 for both
b2b_logic + entities.

setup: source client (aka invite initiator) -> os/b2b -> upstream

Quick Issue description:

Call sessions is established, and works fine, and when the client
disconnects (initiates the bye message), the call disconnects cleanly
with all parties as expected. (this is good/normal)

But when the server side disconnects first (sends the initial bye
message), opensips improperly handles the bye message by believing it to
be from the client side. Therefore doesn't properly send the
corresponding responses to the remote parties.

In more detail:

Delving into the code, and looking at some packet sniffs/debugs, I've
come to the idea that the b2b code (notably starting dlg.c:706) doesn't
take into account that the new BYE message will have the To/From Fields
reversed when from the server as it's not technically a response.
Because of this, the b2b_parse_key on 708 fails as it's only looking at
the "to" field tag for it's index key.

Then the request falls through and is then incorrectly parsed as a
client sourced packet, as that lookup uses a different index key
(callid), which is correct for the session.

I've tested this using metaswitch and asterisk in both the client and
server positions and they both return the same data (to/from), but would
like anyone else's thoughts on this.  Apologies, while I can read code,
I'm not a proper programmer to make a real patch.

Thanks,
   Ross.

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



--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [OpenSIPS-Users] B2B bye method handling

2016-02-09 Thread Ross

Grabbing it now, I'll send it directly/off-list.


R.

On 09/02/16 04:37 PM, Alex Balashov wrote:

Ross,

Could you provide a libpcap-formatted capture of this scenario, either
on-list or privately?

-- Alex

On 02/09/2016 04:35 PM, Ross wrote:


(I'm new to opensips, so bare with me if I'm off track).

I setup a very simple configuration using b2bua for a quick top hiding
setup/proxy, and it works correctly, except for handling BYE messages
coming from the upstream connection. Note, db_mode is set to 0 for both
b2b_logic + entities.

setup: source client (aka invite initiator) -> os/b2b -> upstream

Quick Issue description:

Call sessions is established, and works fine, and when the client
disconnects (initiates the bye message), the call disconnects cleanly
with all parties as expected. (this is good/normal)

But when the server side disconnects first (sends the initial bye
message), opensips improperly handles the bye message by believing it to
be from the client side. Therefore doesn't properly send the
corresponding responses to the remote parties.

In more detail:

Delving into the code, and looking at some packet sniffs/debugs, I've
come to the idea that the b2b code (notably starting dlg.c:706) doesn't
take into account that the new BYE message will have the To/From Fields
reversed when from the server as it's not technically a response.
Because of this, the b2b_parse_key on 708 fails as it's only looking at
the "to" field tag for it's index key.

Then the request falls through and is then incorrectly parsed as a
client sourced packet, as that lookup uses a different index key
(callid), which is correct for the session.

I've tested this using metaswitch and asterisk in both the client and
server positions and they both return the same data (to/from), but would
like anyone else's thoughts on this.  Apologies, while I can read code,
I'm not a proper programmer to make a real patch.

Thanks,
   Ross.

___
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] B2B bye method handling

2016-02-09 Thread Ross

(I'm new to opensips, so bare with me if I'm off track).

I setup a very simple configuration using b2bua for a quick top hiding 
setup/proxy, and it works correctly, except for handling BYE messages 
coming from the upstream connection. Note, db_mode is set to 0 for both 
b2b_logic + entities.


setup: source client (aka invite initiator) -> os/b2b -> upstream

Quick Issue description:

Call sessions is established, and works fine, and when the client 
disconnects (initiates the bye message), the call disconnects cleanly 
with all parties as expected. (this is good/normal)


But when the server side disconnects first (sends the initial bye 
message), opensips improperly handles the bye message by believing it to 
be from the client side. Therefore doesn't properly send the 
corresponding responses to the remote parties.


In more detail:

Delving into the code, and looking at some packet sniffs/debugs, I've 
come to the idea that the b2b code (notably starting dlg.c:706) doesn't 
take into account that the new BYE message will have the To/From Fields 
reversed when from the server as it's not technically a response. 
Because of this, the b2b_parse_key on 708 fails as it's only looking at 
the "to" field tag for it's index key.


Then the request falls through and is then incorrectly parsed as a 
client sourced packet, as that lookup uses a different index key 
(callid), which is correct for the session.


I've tested this using metaswitch and asterisk in both the client and 
server positions and they both return the same data (to/from), but would 
like anyone else's thoughts on this.  Apologies, while I can read code, 
I'm not a proper programmer to make a real patch.


Thanks,
  Ross.

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


[OpenSIPS-Users] Registration Handling.

2016-02-09 Thread Jim DeVito

Hi All,

This may be me not doing this right at all but I would like some 
insight.


What I want to do: UAC send register to OpenSIPS. OpenSIPS rewrites the 
URI and relays it to the actual registrar. When registrar sends back a 
200 OK OpenSIPS catches it in the reply route and calls 
save("location","r","$fu") and the 200 OK gets relayed back to original 
UAC.


This is actually working. It saves me from having to maintain the 
subscribers tables and essentially authenticating the UAC twice. Once 
for OpenSIPS and one for the final registrar.


Here is the problem. FROM header in 200 OK looks like this From: 
;tag=as6211061c however ONLY the username part of 
the URI ends up in the location table. This makes it hard to do a 
lookup("location") later.


A push in the right direction would be great.

Thanks!!

--
Jim DeVito

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