[OpenSIPS-Users] [CFP] FOSDEM 2019, RTC devroom, speakers, volunteers neeeded

2018-10-29 Thread FOSDEM RTC Team

FOSDEM is one of the world's premier meetings of free software developers,
with over five thousand people attending each year.  FOSDEM 2019
takes place 2-3 February 2019 in Brussels, Belgium.  https://fosdem.org

This email contains information about:
- Real-Time Communications dev-room and lounge,
- speaking opportunities,
- volunteering in the dev-room and lounge,
- social events (the legendary FOSDEM Beer Night and Saturday night dinners
  provide endless networking opportunities),
- the Planet aggregation sites for RTC blogs

Call for participation - Real Time Communications (RTC)
===

The Real-Time dev-room and Real-Time lounge is about all things involving
real-time communication, including: XMPP, SIP, WebRTC, telephony,
mobile VoIP, codecs, peer-to-peer, privacy and encryption.  The dev-room
is a successor to the previous XMPP and telephony dev-rooms.
We are looking for speakers for the dev-room and volunteers and
participants for the tables in the Real-Time lounge.

The dev-room is only on Sunday, 3rd of February 2019.  The lounge will
be present for both days.

To discuss the dev-room and lounge, please join the
Free RTC mailing list: http://lists.freertc.org/mailman/listinfo/discuss

To be kept aware of major developments in Free RTC, without being on the
discussion list, please join the Free-RTC Announce list:
http://lists.freertc.org/mailman/listinfo/announce

Speaking opportunities
--

Note: if you used FOSDEM Pentabarf before, please use the same account/username

Real-Time Communications dev-room: deadline 23:59 UTC on 2nd of December.
Please use the Pentabarf system to submit a talk proposal for the
dev-room.  On the "General" tab, please look for the "Track" option and
choose "Real Time Communications devroom".
https://penta.fosdem.org/submission/FOSDEM19/

Other dev-rooms and lightning talks: some speakers may find their topic is
in the scope of more than one dev-room.  It is encouraged to apply to more
than one dev-room and also consider proposing a lightning talk, but please
be kind enough to tell us if you do this by filling out the notes in the form.
You can find the full list of dev-rooms at
   https://www.fosdem.org/2019/schedule/tracks/
and apply for a lightning talk at https://fosdem.org/submit

Main track: the deadline for main track presentations is 23:59 UTC
3rd of November.  Leading developers in the Real-Time Communications
field are encouraged to consider submitting a presentation to
the main track at https://fosdem.org/submit

First-time speaking?


FOSDEM dev-rooms are a welcoming environment for people who have never
given a talk before.  Please feel free to contact the dev-room administrators
personally if you would like to ask any questions about it.

Submission guidelines
-

The Pentabarf system will ask for many of the essential details.  Please
remember to re-use your account from previous years if you have one.

In the "Submission notes", please tell us about:
- the purpose of your talk
- any other talk applications (dev-rooms, lightning talks, main track)
- availability constraints and special needs

You can use HTML and links in your bio, abstract and description.

If you maintain a blog, please consider providing us with the
URL of a feed with posts tagged for your RTC-related work.

We will be looking for relevance to the conference and dev-room themes,
presentations aimed at developers of free and open source software about
RTC-related topics.

Please feel free to suggest a duration between 20 minutes and 55 minutes
but note that the final decision on talk durations will be made by the
dev-room administrators based on the number of received proposals.
As the two previous dev-rooms have been combined into one, we may decide to
give shorter slots than in previous years so that more speakers can
participate.

Please note FOSDEM aims to record and live-stream all talks.
The CC-BY license is used.

Volunteers needed
=

To make the dev-room and lounge run successfully, we are looking for
volunteers:

- FOSDEM provides video recording equipment and live streaming,
  volunteers are needed to assist in this
- organizing one or more restaurant bookings (dependending upon number of
  participants) for the evening of Saturday, 2nd of February
- participation in the Real-Time lounge
- helping attract sponsorship funds for the dev-room to pay for the
  Saturday night dinner and any other expenses
- circulating this Call for Participation to other mailing lists

Social events and dinners
=

The traditional FOSDEM beer night occurs on Friday, 1st of February.

On Saturday night, there are usually dinners associated with
each of the dev-rooms.  Most restaurants in Brussels are not so
large so these dinners have space constraints and reservations are
essential.  Please subscribe to the Free-RTC mailing list for
further details a

Re: [OpenSIPS-Users] CPU 100% with TCP

2018-10-29 Thread Bogdan-Andrei Iancu

Hi Ben,

I checked the error trace and it should not leave any dangling lock (due 
mishandled error). Before disabling HEP, try to disable the async 
support for HEP.


If you claim that the same 100% CPU happens with HEP + UDP, send me a 
trap for that too, as in the previous case, the deadlock was exclusively 
HEP + TCP related.


Anyhow, as the original trap showed a deadlock, next step will be to 
recompile with the DBG_LOCK option - this enables extra code to 
debug/troubleshoot locking related issues - are you able to do it?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/26/2018 04:14 PM, Ben Newlin wrote:


Bogdan,

Actually, yes we do. Looking back I can see these errors just before 
the issue occurs:


Oct 24 19:00:36 [5700] ERROR:proto_hep:send_hep_message: Cannot send 
hep message!


Oct 24 19:00:36 [5700] ERROR:proto_hep:msg_send: send() to 
10.32.163.211:9061 for proto hep_tcp/9 failed


Oct 24 19:00:36 [5700] ERROR:proto_hep:hep_tcp_send: failed to send

Oct 24 19:00:36 [5700] ERROR:proto_hep:async_tsend_stream: Failed 
first TCP async send : (32) Broken pipe


I will try disabling HEP and see if we can reproduce.

Just for information, I have been reproducing the issue in our testing 
environment which uses TCP for HEP, however the issue is occurring in 
our production environment as well which is still using UDP for HEP.


Ben Newlin

*From: *Bogdan-Andrei Iancu 
*Date: *Friday, October 26, 2018 at 3:06 AM
*To: *Ben Newlin , OpenSIPS users mailling 
list 

*Subject: *Re: [OpenSIPS-Users] CPU 100% with TCP

Hi Ben,

Thank you for the info.

It looks like the processes get stuck into a HEP related internal lock 
- do you see any HEP related errors in your logs, prior to the dead-lock ?


Also, as PoC, could you disabled HEP tracing to see if the problem 
goes away ?


Thanks,


Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/24/2018 10:18 PM, Ben Newlin wrote:

Bogdan,

I have run the command but the output was too large for pastebin
so I have sent it to you directly.

Ben Newlin

*From: *Bogdan-Andrei Iancu 

*Date: *Wednesday, October 24, 2018 at 5:17 AM
*To: *OpenSIPS users mailling list 
, Ben Newlin
 
*Subject: *Re: [OpenSIPS-Users] CPU 100% with TCP

Hi Ben,

Could you run "opensipsctl trap" ?

Regards,


Bogdan-Andrei Iancu

  


OpenSIPS Founder and Developer

   http://www.opensips-solutions.com

OpenSIPS Bootcamp 2018

   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/24/2018 12:56 AM, Ben Newlin wrote:

Hi,

We have implemented TCP recently and are performing TCP<->UDP
translation on one of our proxy types. This proxy only exists
for that purpose; there are no DB queries, REST calls, or
anything like that. It is designed to be very fast and high
throughput.

Recently we have found that when the remote endpoint of a TCP
connection is lost, i.e. the server goes down, while under
moderate load OpenSIPS quickly reaches 100% CPU and becomes
unresponsive. When this occurs, the “top” command shows that
between 30-90% CPU is in System (kernel) space, and each
OpenSIPS TCP process shows many times the normal CPU. We are
running OpenSIPS 2.4.2 on Amazon Linux.

I obtained as much information as I could using ps, strace,
and gdb here: https://pastebin.com/JP3DnCqs
. We can reproduce the failure
consistently by removing a server during call traffic.

A few things I noticed:

  * The number of running threads reported by OpenSIPS doesn’t
align with our configuration, copied here:

### Global Parameters #

children=32

#// Allow 503 to pass back to Control

disable_503_translation=yes

#// Even though we are not receiving HEP,

#// this listener is required by OpenSIPS

#// in order to use the proto_hep module. :/

listen=hep_tcp:10.32.40.245:9061 use_children 1

#// Configure the listeners

listen=udp:10.32.40.245:5060 as XXX.XXX.XXX.XXX

listen=tcp:10.32.40.245:5060 as XXX.XXX.XXX.XXX

#// Transaction Module

loadmodule "tm.so"

modparam("tm", "restart_fr_on_each_reply", 0)

modparam("tm", "timer_partitions", 8)

modparam("tm", "onreply_avp_mode", 1)

modparam("tm", "wt_timer", 10)

According to the documentation if “tcp_children” is not set
then the value of “children” will be used [1], but we h

[OpenSIPS-Users] cache store local

2018-10-29 Thread Vishal Pai
Hello everyone

I want to store $ci in local cache but i am unable to do that in Opensips
2.4

Here is what i have did

Let $ci = 220569877bd3fca37e1c37f4483e1250@192.168.1.100:5060

modparam("cachedb_local", "cachedb_url", "local://")

cache_store("local","$ci","1");

but when i am fetching it i am getting NULL / Empty value

cache_fetch("local","$ci",$avp(ci));

$avp(ci) is NULL

Can anyone help me to do this or can suggest other way to do this.

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


Re: [OpenSIPS-Users] SUBSCRIBE

2018-10-29 Thread Slava Bendersky
In that setup freeswitch boxes directly connected to opensips LAN side and 
opensips listen for for two interfaces internal and external. UDP and TCP. 

volga629 


From: "Bogdan-Andrei Iancu"  
To: "OpenSIPS users mailling list" , "Slava 
Bendersky"  
Sent: Monday, October 29, 2018 2:13:06 PM 
Subject: Re: [OpenSIPS-Users] SUBSCRIBE 

Hi Slava, 

Maybe the same destination may be reached (from the IP routing table 
perspective) via multiple interfaces like via interface A and interface B - and 
OS (via mhomed) selected interface A , but OpenSIPS listen only on B. 

Such a setup may lead to the error you listed - OS picking up for routing a 
local interface that is not used by OpenSIPS. 

Regards, 
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer [ http://www.opensips-solutions.com/ | 
http://www.opensips-solutions.com ] OpenSIPS Bootcamp 2018 [ 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ | 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ ] 
On 10/29/2018 04:10 PM, Slava Bendersky wrote: 



That error message in log 

Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:core:get_out_socket: no 
socket found 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:pua:send_publish_int: 
failed to send PUBLISH 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:pua_dialoginfo:dialog_publish: sending publish failed for pres_uri [ [ 
sip:1...@domain.com:5160 | sip:1...@domain.com:5160 ] ] to server [] 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:core:get_out_socket: no 
socket found 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2 

LAN side is UDP and WAN side TCP. Multi home environment. 
volga629 

From: "Slava Bendersky" [ mailto:volga...@networklab.ca | 
 ] 
To: "OpenSIPS users mailling list" [ mailto:users@lists.opensips.org | 
 ] 
Sent: Monday, October 29, 2018 11:01:42 AM 
Subject: [OpenSIPS-Users] SUBSCRIBE 

Hello Everyone, 
What possible cause that opensips generate 500 error on SUBSCRIBE 

 Presence 
loadmodule "presence.so" 
loadmodule "presence_mwi.so" 
loadmodule "presence_xml.so" 
loadmodule "presence_dialoginfo.so" 
loadmodule "presence_callinfo.so" 
loadmodule "pua.so" 
loadmodule "pua_dialoginfo.so" 
loadmodule "xcap.so" 
modparam("presence|xcap|pua","db_url",") 
#modparam("presence","server_address", [ sip:proxy@ | "sip:proxy@" ] ) multi 
home 
modparam("presence", "clean_period", 30) 
modparam("presence", "mix_dialog_presence", 1) 
modparam("presence_xml", "force_active", 1) 
#modparam("pua_dialoginfo", "presence_server", " [ sip:sbc@ | sip:sbc@ ] ) 
multi home 


2018/10/29 08:50:30.061342 190.240.46.242:36868 -> 190.248.157.3:5084 
SUBSCRIBE [ sip:1...@domain.tld:5160 | sip:1...@domain.tld:5160 ] SIP/2.0 
Via: SIP/2.0/TCP 192.168.1.65:19464;branch=z9hG4bK1855278236;rport;alias 
From: [ sip:1...@domain.tld:5160 |  ] ;tag=473433483 
To: [ sip:1...@domain.tld:5160 |  ] 
Call-ID: [ mailto:733815006-19464-...@bjc.bgi.b.gf | 
733815006-19464-...@bjc.bgi.b.gf ] 
CSeq: 21200 SUBSCRIBE 
Contact: [ sip:101@192.168.1.65:19464;transport=tcp | 
 ] 
X-Grandstream-PBX: true 
Max-Forwards: 70 
User-Agent: Grandstream GXP1760W 1.0.1.74 
Expires: 432000 
Supported: replaces, path, timer 
Event: message-summary 
Accept: application/simple-message-summary 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 



2018/10/29 08:50:30.062338 190.248.157.3:5084 -> 190.240.46.242:36868 
SIP/2.0 500 Server error occurred (1/SL) 
Via: SIP/2.0/TCP 
192.168.1.65:19464;received=190.240.46.242;branch=z9hG4bK1855278236;rport=36868;alias
 
From: [ sip:1...@domain.tld:5160 |  ] ;tag=473433483 
To: [ sip:1...@domain.tld:5160 |  ] 
;tag=a3f6a7240e26af61ce52d7ac2261cc82.ee28 
Call-ID: [ mailto:733815006-19464-...@bjc.bgi.b.gf | 
733815006-19464-...@bjc.bgi.b.gf ] 
CSeq: 21200 SUBSCRIBE 
Server: OpenSIPS (3.0.0-dev (x86_64/linux)) 
Content-Length: 0 


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


___
Users mailing list [ mailto:Users@lists.opensips.org | Users@lists.opensips.org 
] [ http://lists.opensips.org/cgi-bin/mailman/listinfo/users | 
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] SUBSCRIBE

2018-10-29 Thread Bogdan-Andrei Iancu

Hi Slava,

Maybe the same destination may be reached (from the IP routing table 
perspective) via multiple interfaces like via interface A and interface 
B - and OS (via mhomed) selected interface A , but OpenSIPS listen only 
on B.


Such a setup may lead to the error you listed - OS picking up for 
routing a local interface that is not used by OpenSIPS.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/29/2018 04:10 PM, Slava Bendersky wrote:

That error message in log

Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:core:get_out_socket: no socket found
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:pua:send_publish_int: failed to send PUBLISH
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:pua_dialoginfo:dialog_publish: sending publish failed for 
pres_uri [sip:1...@domain.com:5160] to server []
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:core:get_out_socket: no socket found
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2


LAN side is UDP and WAN side TCP. Multi home environment.
volga629

*From: *"Slava Bendersky" 
*To: *"OpenSIPS users mailling list" 
*Sent: *Monday, October 29, 2018 11:01:42 AM
*Subject: *[OpenSIPS-Users] SUBSCRIBE

Hello Everyone,
What possible cause that opensips generate 500 error on SUBSCRIBE

 Presence
loadmodule "presence.so"
loadmodule "presence_mwi.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_callinfo.so"
loadmodule "pua.so"
loadmodule "pua_dialoginfo.so"
loadmodule "xcap.so"
modparam("presence|xcap|pua","db_url",")
#modparam("presence","server_address","sip:proxy@") multi home
modparam("presence", "clean_period",  30)
modparam("presence", "mix_dialog_presence", 1)
modparam("presence_xml", "force_active", 1)
#modparam("pua_dialoginfo", "presence_server", "sip:sbc@) multi home


2018/10/29 08:50:30.061342 190.240.46.242:36868 -> 190.248.157.3:5084
SUBSCRIBE sip:1...@domain.tld:5160 SIP/2.0
Via: SIP/2.0/TCP 192.168.1.65:19464;branch=z9hG4bK1855278236;rport;alias
From: ;tag=473433483
To: 
Call-ID: 733815006-19464-...@bjc.bgi.b.gf
CSeq: 21200 SUBSCRIBE
Contact: 
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP1760W 1.0.1.74
Expires: 432000
Supported: replaces, path, timer
Event: message-summary
Accept: application/simple-message-summary
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, 
REFER, UPDATE, MESSAGE

Content-Length: 0



2018/10/29 08:50:30.062338 190.248.157.3:5084 -> 190.240.46.242:36868
SIP/2.0 500 Server error occurred (1/SL)
Via: SIP/2.0/TCP 
192.168.1.65:19464;received=190.240.46.242;branch=z9hG4bK1855278236;rport=36868;alias

From: ;tag=473433483
To: ;tag=a3f6a7240e26af61ce52d7ac2261cc82.ee28
Call-ID: 733815006-19464-...@bjc.bgi.b.gf
CSeq: 21200 SUBSCRIBE
Server: OpenSIPS (3.0.0-dev (x86_64/linux))
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


Re: [OpenSIPS-Users] Presence issue

2018-10-29 Thread Bogdan-Andrei Iancu

Hi all,

Thanks to Dan's help, I managed to locate and fix the issue, see :
https://github.com/OpenSIPS/opensips/commit/1ac9010f4fb8fff513ce25e06fdf210412c4a39b

Once again, thank you Dan !

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/23/2018 04:49 PM, Bogdan-Andrei Iancu wrote:

Hi Dan,

Ok, installing Blink and trying to see if I get the error.

Thanks for the input.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/19/2018 08:39 PM, Dan Pascu wrote:

On 17 Oct 2018, at 23:33, Bogdan-Andrei Iancu wrote:


Hi Dan,

What I failed so far was to reproduced it in a controlled 
environment. Do you have a setup, special cfg + SIP UAC , 
instructions to reproduce this issue ?
I use Blink as the client. I see this every time the proxy receives a 
PUBLISH request:


Oct 19 19:29:55 node15 ./opensips[23510]: [CONFIG] PUBLISH for 
presence sip:d...@test.sip2sip.info origin 86.120.12.1
64:41062 from sip:d...@test.sip2sip.info to sip:d...@test.sip2sip.info 
(243988a9-511e-4108-8950-5ab6edf82c3c)
Oct 19 19:29:55 node15 ./opensips[23510]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error 
(1062): Du
plicate entry 
'dan-test.sip2sip.info-presence-a.1539700118.23510.517.1' for key 
'presentity_idx'
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:core:db_do_update: 
error while submitting query
Oct 19 19:29:55 node15 ./opensips[23510]: 
ERROR:presence:update_presentity: updating published info in database
Oct 19 19:29:55 node15 ./opensips[23510]: 
ERROR:presence:handle_publish: when updating presentity


or this:

Oct 19 19:29:55 node15 ./opensips[23508]: [CONFIG] PUBLISH for 
presence sip:d...@test.sip2sip.info origin 86.120.12.1
64:39673 from sip:d...@test.sip2sip.info to sip:d...@test.sip2sip.info 
(cc4704d0-a5e7-4c78-89ae-4c31b6cb6246)
Oct 19 19:29:55 node15 ./opensips[23508]: 
INFO:presence:update_presentity: *** found in db but not in htable 
[a.1539

700118.23508.2291.0]

Below is the relevant part of my configuration (I included all the 
presence related modules I load and their configuration as they may 
be relevant):


# The address on which OpenSIPS will listen
define(`SERVER_IP', esyscmd(`echo -n $(hostname -i)'))
define(`SERVER_UDP_PORT', `5060')
define(`SERVER_TCP_PORT', `5060')
define(`SERVER_TLS_PORT', `5061')

# The server contact address
define(`SERVER_ADDRESS', `ifelse(SERVER_UDP_PORT, `5060', 
`SERVER_IP', `SERVER_IP:SERVER_UDP_PORT')')

# Contact used by the presence server
define(`PRESENCE_SERVER_ADDRESS', `sip:presence@SERVER_ADDRESS')
# Contact used by the resource list server
define(`RLS_SERVER_ADDRESS', `sip:rls@SERVER_ADDRESS')


loadmodule "presence.so"
loadmodule "xcap.so"
loadmodule "presence_xml.so"
loadmodule "presence_mwi.so"
loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "rls.so"
loadmodule "presence_xcapdiff.so"


modparam("presence", "db_url", "MySQL_URI")
modparam("presence", "server_address", "PRESENCE_SERVER_ADDRESS")
modparam("presence", "fallback2db", 1)
modparam("presence", "clean_period", 30)
modparam("presence", "notify_offline_body", 0)

modparam("presence_xml", "pres_rules_auid", 
"org.openmobilealliance.pres-rules")

modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "pidf_manipulation", 1)
modparam("presence_xml", "generate_offline_body", 0)

modparam("pua", "db_url", "MySQL_URI")

modparam("xcap", "db_url", "MySQL_URI")
modparam("xcap", "integrated_xcap_server", 1)

modparam("rls", "server_address", "RLS_SERVER_ADDRESS")
modparam("rls", "to_presence_code", 5)
modparam("rls", "waitn_time", 10)

route {
 if ($rm == "PUBLISH") {
 if (is_from_local()) {
 if (!proxy_authorize("", "SUBSCRIBER_TABLE")) {
 proxy_challenge("", "0");
 return;
 } else if ($au != $fU) {
 sl_send_reply("403", "Username!=From not allowed 
($au!=$fU)");

 return;
 }

 if ($rd == "") {
 $rd = $fd;
 }

 if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au 
!= $rU || $ar != $rd)) {
 sl_send_reply("403", "Publishing $hdr(Event) events 
for others is forbidden");

 return;
 }

 # Hide auth credentials to downstream routers
 consume_credentials();
 } else {
 sl_send_reply("403", "PUBLISH forbidden for outside 
domains");

 return;
 }

 if (t_newtran()) {
 handle_publish();
 } else {
 sl_reply_error();
 }
 exit;
 }
}


--
Dan







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



_

Re: [OpenSIPS-Users] SDP and ptime, maxptime removal

2018-10-29 Thread Răzvan Crainea

Hi, Stefan!

There is no bug here - ptime and maxptime are not associated to a codec, 
but to the entire media session. So it should not be removed if you 
delete a certain.


Best regards,
Razvan

On 10/26/18 3:00 PM, Stefan Carlsson wrote:

Hi !
We have a serious issue that force us to remove all codecs except 
PCMA.   We use: codec_delete_except_re("PCMA");  from the sipmsgops 
module
but the function doesn’t removes the associated ptime, maxptime.   How 
can we also remove this, any ideas or is it a bug in the sipmsgops  module?

We use version  2.2.6   on a Centos machine.
Kind Regards
Stefan

___
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


Re: [OpenSIPS-Users] SUBSCRIBE

2018-10-29 Thread Slava Bendersky
That error message in log 

Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:core:get_out_socket: no 
socket found 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:pua:send_publish_int: 
failed to send PUBLISH 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: 
ERROR:pua_dialoginfo:dialog_publish: sending publish failed for pres_uri 
[sip:1...@domain.com:5160] to server [] 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:core:get_out_socket: no 
socket found 
Oct 29 09:00:16 vprx00 /usr/sbin/opensips[1506]: ERROR:tm:t_uac: no 
corresponding socket for af 2 

LAN side is UDP and WAN side TCP. Multi home environment. 
volga629 

From: "Slava Bendersky"  
To: "OpenSIPS users mailling list"  
Sent: Monday, October 29, 2018 11:01:42 AM 
Subject: [OpenSIPS-Users] SUBSCRIBE 

Hello Everyone, 
What possible cause that opensips generate 500 error on SUBSCRIBE 

 Presence 
loadmodule "presence.so" 
loadmodule "presence_mwi.so" 
loadmodule "presence_xml.so" 
loadmodule "presence_dialoginfo.so" 
loadmodule "presence_callinfo.so" 
loadmodule "pua.so" 
loadmodule "pua_dialoginfo.so" 
loadmodule "xcap.so" 
modparam("presence|xcap|pua","db_url",") 
#modparam("presence","server_address","sip:proxy@") multi home 
modparam("presence", "clean_period", 30) 
modparam("presence", "mix_dialog_presence", 1) 
modparam("presence_xml", "force_active", 1) 
#modparam("pua_dialoginfo", "presence_server", "sip:sbc@) multi home 


2018/10/29 08:50:30.061342 190.240.46.242:36868 -> 190.248.157.3:5084 
SUBSCRIBE sip:1...@domain.tld:5160 SIP/2.0 
Via: SIP/2.0/TCP 192.168.1.65:19464;branch=z9hG4bK1855278236;rport;alias 
From: ;tag=473433483 
To:  
Call-ID: 733815006-19464-...@bjc.bgi.b.gf 
CSeq: 21200 SUBSCRIBE 
Contact:  
X-Grandstream-PBX: true 
Max-Forwards: 70 
User-Agent: Grandstream GXP1760W 1.0.1.74 
Expires: 432000 
Supported: replaces, path, timer 
Event: message-summary 
Accept: application/simple-message-summary 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 



2018/10/29 08:50:30.062338 190.248.157.3:5084 -> 190.240.46.242:36868 
SIP/2.0 500 Server error occurred (1/SL) 
Via: SIP/2.0/TCP 
192.168.1.65:19464;received=190.240.46.242;branch=z9hG4bK1855278236;rport=36868;alias
 
From: ;tag=473433483 
To: ;tag=a3f6a7240e26af61ce52d7ac2261cc82.ee28 
Call-ID: 733815006-19464-...@bjc.bgi.b.gf 
CSeq: 21200 SUBSCRIBE 
Server: OpenSIPS (3.0.0-dev (x86_64/linux)) 
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


[OpenSIPS-Users] SUBSCRIBE

2018-10-29 Thread Slava Bendersky
Hello Everyone, 
What possible cause that opensips generate 500 error on SUBSCRIBE 

 Presence 
loadmodule "presence.so" 
loadmodule "presence_mwi.so" 
loadmodule "presence_xml.so" 
loadmodule "presence_dialoginfo.so" 
loadmodule "presence_callinfo.so" 
loadmodule "pua.so" 
loadmodule "pua_dialoginfo.so" 
loadmodule "xcap.so" 
modparam("presence|xcap|pua","db_url",") 
#modparam("presence","server_address","sip:proxy@") multi home 
modparam("presence", "clean_period", 30) 
modparam("presence", "mix_dialog_presence", 1) 
modparam("presence_xml", "force_active", 1) 
#modparam("pua_dialoginfo", "presence_server", "sip:sbc@) multi home 


2018/10/29 08:50:30.061342 190.240.46.242:36868 -> 190.248.157.3:5084 
SUBSCRIBE sip:1...@domain.tld:5160 SIP/2.0 
Via: SIP/2.0/TCP 192.168.1.65:19464;branch=z9hG4bK1855278236;rport;alias 
From: ;tag=473433483 
To:  
Call-ID: 733815006-19464-...@bjc.bgi.b.gf 
CSeq: 21200 SUBSCRIBE 
Contact:  
X-Grandstream-PBX: true 
Max-Forwards: 70 
User-Agent: Grandstream GXP1760W 1.0.1.74 
Expires: 432000 
Supported: replaces, path, timer 
Event: message-summary 
Accept: application/simple-message-summary 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 



2018/10/29 08:50:30.062338 190.248.157.3:5084 -> 190.240.46.242:36868 
SIP/2.0 500 Server error occurred (1/SL) 
Via: SIP/2.0/TCP 
192.168.1.65:19464;received=190.240.46.242;branch=z9hG4bK1855278236;rport=36868;alias
 
From: ;tag=473433483 
To: ;tag=a3f6a7240e26af61ce52d7ac2261cc82.ee28 
Call-ID: 733815006-19464-...@bjc.bgi.b.gf 
CSeq: 21200 SUBSCRIBE 
Server: OpenSIPS (3.0.0-dev (x86_64/linux)) 
Content-Length: 0 

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


Re: [OpenSIPS-Users] presence blf

2018-10-29 Thread Bogdan-Andrei Iancu
Well, you need to get the Pwd from the 3cx somehow - it depends on what 
interfacing capabilities the 3cx has


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/29/2018 03:48 PM, Slava Bendersky wrote:

Hello Bogdan,
So only option is get to 3CX database or API ?

volga629


*From: *"Bogdan-Andrei Iancu" 
*To: *"Slava Bendersky" , "OpenSIPS users 
mailling list" 

*Sent: *Monday, October 29, 2018 9:31:29 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

you do not need mid_registrar. The logic should be :


route[PUBLISH_407] {
if(is_method("PUBLISH") && 
has_body("application/dialog-info+xml") && $avp(DLG_dir)=="frompbx") {

xlog("L_INFO", "[$rm] from $si\n");
t_on_failure("SUPPLY_AUTH");
}

failure_route[SUPPLY_AUTH] {
if (is_method("PUBLISH") && t_check_status("407")) {
*populate $avp(10/11/12) from a DB with the credentials
*
if (uac_auth())
t_relay();
}
}
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 10/27/2018 10:34 PM, Slava Bendersky wrote:

Is possible that issue in mid_registrar  ?
I adjusted fail route to

failure_route[SUPPLY_AUTH] {
if(uac_auth()) {
append_branch();
t_relay();
}
exit;
 and look like uac_auth() is never executed.

volga629


*From: *"Slava Bendersky" 
*To: *"Bogdan-Andrei Iancu" 
*Cc: *"OpenSIPS users mailling list" 
*Sent: *Saturday, October 27, 2018 12:42:09 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

Hello Bogdan,
The issue that opensips is not handling user authentication,
password is stored in 3cx. Is there are way set avp or into cache
intial credentials ?
I come up with something like this.
My though  was.

modparam("uac_auth","auth_realm_avp","$avp(10)")

modparam("uac_auth","auth_username_avp","$avp(11)")

modparam("uac_auth","auth_password_avp","$avp(12)")


route[PUBLISH_407] {
if(is_method("PUBLISH") &&
has_body("application/dialog-info+xml") && $avp(DLG_dir)=="frompbx") {
xlog("L_INFO", "[$rm] from $si\n");
t_on_reply("6");
}

onreply_route[6] {
if(is_method("PUBLISH") && t_check_status("407")) {
xlog("L_INFO", "OnReply_Route6: [$rm] Direction:
[FS ~> Client] asked for 407\n");
t_on_failure("SUPPLY_AUTH");
}
}

failure_route[SUPPLY_AUTH] {
*don't know how to supply credential  yet*
uac_auth();
}

volga629


*From: *"Bogdan-Andrei Iancu" 
*To: *"OpenSIPS users mailling list" ,
"Slava Bendersky" 
*Sent: *Friday, October 26, 2018 5:28:09 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

Hi Slava,

Sorry for the mistyping your name :Done wrong character and
something a bit weird resulted :D.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/26/2018 09:34 AM, Bogdan-Andrei Iancu wrote:

Hi Slave,

If you cannot do an IP authentication / whitelisting for
OpenSIPS in 3CX, you could use the uac_auth module and the
uac_auth() function to perform user side authentication in
OpenSIPS. See
http://www.opensips.org/html/docs/modules/2.4.x/uac.html
http://www.opensips.org/html/docs/modules/2.4.x/uac_auth.html

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/25/2018 09:49 PM, Slava Bendersky wrote:

Hello Everyone,
I am trying make BLF working and how opensips should
handle PUBLISH where server reply 407 ?
Do we need forward to end point ?
Opensips send PUBLISH then 3CX send 407 and conversation done.
Here some trace

[root@aitossbc01 ~]# cat BLF.txt
2018/10/25 12:22:19.148093 10.100.104.10:5060 ->
10.2.24.124:5060
PUBLISH sip:1...@domain.tld:5060 SIP/2.0
Via: SIP/2.0/UDP
10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0
To: sip:1...@domain.tld:5060
From:
;tag=4c20d2ebf66939afcc7c67f

Re: [OpenSIPS-Users] presence blf

2018-10-29 Thread Slava Bendersky
Hello Bogdan, 
So only option is get to 3CX database or API ? 

volga629 


From: "Bogdan-Andrei Iancu"  
To: "Slava Bendersky" , "OpenSIPS users mailling list" 
 
Sent: Monday, October 29, 2018 9:31:29 AM 
Subject: Re: [OpenSIPS-Users] presence blf 

you do not need mid_registrar. The logic should be : 


route[PUBLISH_407] { 
if(is_method("PUBLISH") && has_body(" application/dialog-info+xm l") && 
$avp(DLG_dir)=="frompbx") { 
xlog("L_INFO", "[$rm] from $si\n"); 
t_on_failure("SUPPLY_AUTH"); 
} 

failure_route[SUPPLY_AUTH] { 
if (is_method("PUBLISH") && t_check_status("407")) { 
populate $avp(10/11/12) from a DB with the credentials 
if (uac_auth()) 
t_relay(); 
} 
} 
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer [ http://www.opensips-solutions.com/ | 
http://www.opensips-solutions.com ] OpenSIPS Bootcamp 2018 [ 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ | 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ ] 
On 10/27/2018 10:34 PM, Slava Bendersky wrote: 



Is possible that issue in mid_registrar ? 
I adjusted fail route to 

failure_route[SUPPLY_AUTH] { 
if(uac_auth()) { 
append_branch(); 
t_relay(); 
} 
exit; 
and look like uac_auth() is never executed. 

volga629 


From: "Slava Bendersky" [ mailto:volga...@networklab.ca | 
 ] 
To: "Bogdan-Andrei Iancu" [ mailto:bog...@opensips.org |  
] 
Cc: "OpenSIPS users mailling list" [ mailto:users@lists.opensips.org | 
 ] 
Sent: Saturday, October 27, 2018 12:42:09 AM 
Subject: Re: [OpenSIPS-Users] presence blf 

Hello Bogdan, 
The issue that opensips is not handling user authentication, password is stored 
in 3cx. Is there are way set avp or into cache intial credentials ? 
I come up with something like this. 
My though was. 

modparam("uac_auth","auth_realm_avp","$avp(10)") 
modparam("uac_auth","auth_username_avp","$avp(11)") 
modparam("uac_auth","auth_password_avp","$avp(12)") 

route[PUBLISH_407] { 
if(is_method("PUBLISH") && has_body(" application/dialog-info+xm l") && 
$avp(DLG_dir)=="frompbx") { 
xlog("L_INFO", "[$rm] from $si\n"); 
t_on_reply("6"); 
} 

onreply_route[6] { 
if(is_method("PUBLISH") && t_check_status("407")) { 
xlog("L_INFO", "OnReply_Route6: [$rm] Direction: [FS ~> Client] asked for 
407\n"); 
t_on_failure("SUPPLY_AUTH"); 
} 
} 

failure_route[SUPPLY_AUTH] { 
don't know how to supply credential yet 
uac_auth(); 
} 

volga629 


From: "Bogdan-Andrei Iancu" [ mailto:bog...@opensips.org | 
 ] 
To: "OpenSIPS users mailling list" [ mailto:users@lists.opensips.org | 
 ] , "Slava Bendersky" [ 
mailto:volga...@networklab.ca |  ] 
Sent: Friday, October 26, 2018 5:28:09 AM 
Subject: Re: [OpenSIPS-Users] presence blf 

Hi Slava, 

Sorry for the mistyping your name :Done wrong character and something a bit 
weird resulted :D. 

Regards, 
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer [ http://www.opensips-solutions.com/ | 
http://www.opensips-solutions.com ] OpenSIPS Bootcamp 2018 [ 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ | 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ ] 
On 10/26/2018 09:34 AM, Bogdan-Andrei Iancu wrote: 

BQ_BEGIN
Hi Slave, 

If you cannot do an IP authentication / whitelisting for OpenSIPS in 3CX, you 
could use the uac_auth module and the uac_auth() function to perform user side 
authentication in OpenSIPS. See 
[ http://www.opensips.org/html/docs/modules/2.4.x/uac.html | 
http://www.opensips.org/html/docs/modules/2.4.x/uac.html ] 
[ http://www.opensips.org/html/docs/modules/2.4.x/uac_auth.html | 
http://www.opensips.org/html/docs/modules/2.4.x/uac_auth.html ] 

Best regards, 
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer [ http://www.opensips-solutions.com/ | 
http://www.opensips-solutions.com ] OpenSIPS Bootcamp 2018 [ 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ | 
http://opensips.org/training/OpenSIPS_Bootcamp_2018/ ] 
On 10/25/2018 09:49 PM, Slava Bendersky wrote: 

BQ_BEGIN

Hello Everyone, 
I am trying make BLF working and how opensips should handle PUBLISH where 
server reply 407 ? 
Do we need forward to end point ? 
Opensips send PUBLISH then 3CX send 407 and conversation done. 
Here some trace 

[root@aitossbc01 ~]# cat BLF.txt 
2018/10/25 12:22:19.148093 10.100.104.10:5060 -> 10.2.24.124:5060 
PUBLISH [ sip:1...@domain.tld:5060 | sip:1...@domain.tld:5060 ] SIP/2.0 
Via: SIP/2.0/UDP 10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0 
To: [ sip:1...@domain.tld:5060 | sip:1...@domain.tld:5060 ] 
From: [ sip:1...@domain.tld:5060 |  ] 
;tag=4c20d2ebf66939afcc7c67fb6893f1be-672a 
CSeq: 10 PUBLISH 
Call-ID: [ mailto:0324183200c79905-20534@10.100.104.10 | 
0324183200c79905-20534@10.100.104.10 ] 
Max-Forwards: 70 
Content-Length: 549 
User-Agent: OpenSIPS (3.0.0-dev (x86_64/linux)) 
Event: dialog 
Expires: 3601 
Content-Type: application/dialog-info+xml 

 
mailto:0_3095066305@192.168.88.146 | "0_3095066305@192.168.88.146" ] call-id= [ 
mailto:0_3095066305@192.168.88.146 | "0_3095066305@192.168.88.146" ] 
direction="recipient">confirmed [ 
sip:2...@domain.tld:5060 

Re: [OpenSIPS-Users] presence blf

2018-10-29 Thread Bogdan-Andrei Iancu

you do not need mid_registrar. The logic should be :


route[PUBLISH_407] {
if(is_method("PUBLISH") && 
has_body("application/dialog-info+xml") && $avp(DLG_dir)=="frompbx") {

xlog("L_INFO", "[$rm] from $si\n");
t_on_failure("SUPPLY_AUTH");
}

failure_route[SUPPLY_AUTH] {
if (is_method("PUBLISH") && t_check_status("407")) {
*populate $avp(10/11/12) from a DB with the credentials
*
if (uac_auth())
t_relay();
}
}

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/27/2018 10:34 PM, Slava Bendersky wrote:

Is possible that issue in mid_registrar  ?
I adjusted fail route to

failure_route[SUPPLY_AUTH] {
if(uac_auth()) {
append_branch();
t_relay();
}
exit;
 and look like uac_auth() is never executed.

volga629


*From: *"Slava Bendersky" 
*To: *"Bogdan-Andrei Iancu" 
*Cc: *"OpenSIPS users mailling list" 
*Sent: *Saturday, October 27, 2018 12:42:09 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

Hello Bogdan,
The issue that opensips is not handling user authentication, password 
is stored in 3cx. Is there are way set avp or into cache intial 
credentials ?

I come up with something like this.
My though  was.

modparam("uac_auth","auth_realm_avp","$avp(10)")
modparam("uac_auth","auth_username_avp","$avp(11)")
modparam("uac_auth","auth_password_avp","$avp(12)")

route[PUBLISH_407] {
if(is_method("PUBLISH") && 
has_body("application/dialog-info+xml") && $avp(DLG_dir)=="frompbx") {

xlog("L_INFO", "[$rm] from $si\n");
t_on_reply("6");
}

onreply_route[6] {
if(is_method("PUBLISH") && t_check_status("407")) {
xlog("L_INFO", "OnReply_Route6: [$rm] Direction: [FS 
~> Client] asked for 407\n");

t_on_failure("SUPPLY_AUTH");
}
}

failure_route[SUPPLY_AUTH] {
*don't know how to supply credential yet*
uac_auth();
}

volga629


*From: *"Bogdan-Andrei Iancu" 
*To: *"OpenSIPS users mailling list" , 
"Slava Bendersky" 

*Sent: *Friday, October 26, 2018 5:28:09 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

Hi Slava,

Sorry for the mistyping your name :Done wrong character and 
something a bit weird resulted :D.


Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 10/26/2018 09:34 AM, Bogdan-Andrei Iancu wrote:

Hi Slave,

If you cannot do an IP authentication / whitelisting for OpenSIPS
in 3CX, you could use the uac_auth module and the uac_auth()
function to perform user side authentication in OpenSIPS. See
http://www.opensips.org/html/docs/modules/2.4.x/uac.html
http://www.opensips.org/html/docs/modules/2.4.x/uac_auth.html

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/25/2018 09:49 PM, Slava Bendersky wrote:

Hello Everyone,
I am trying make BLF working and how opensips should handle
PUBLISH where server reply 407 ?
Do we need forward to end point ?
Opensips send PUBLISH then 3CX send 407 and conversation done.
Here some trace

[root@aitossbc01 ~]# cat BLF.txt
2018/10/25 12:22:19.148093 10.100.104.10:5060 -> 10.2.24.124:5060
PUBLISH sip:1...@domain.tld:5060 SIP/2.0
Via: SIP/2.0/UDP 10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0
To: sip:1...@domain.tld:5060
From:
;tag=4c20d2ebf66939afcc7c67fb6893f1be-672a
CSeq: 10 PUBLISH
Call-ID: 0324183200c79905-20534@10.100.104.10
Max-Forwards: 70
Content-Length: 549
User-Agent: OpenSIPS (3.0.0-dev (x86_64/linux))
Event: dialog
Expires: 3601
Content-Type: application/dialog-info+xml


confirmedsip:2...@domain.tld:5060sip:1...@domain.tld:5060


2018/10/25 12:22:19.198773 10.2.24.124:5060 -> 10.100.104.10:5060
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0
Proxy-Authenticate: Digest

nonce="414d53595bd1fbcb12:61835c52c28e8a89737c489e16fa5965",algorithm=MD5,realm="3CXPhoneSystem"
To: ;tag=d9bb492f
From:
;tag=4c20d2ebf66939afcc7c67fb6893f1be-672a
Call-ID: 0324183200c79905-20534@10.100.104.10
CSeq: 10 PUBLISH
User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502)
Content-Length: 0


___
 

Re: [OpenSIPS-Users] presence blf

2018-10-29 Thread Bogdan-Andrei Iancu

Hi Salva,

In failure route, you should check first for the 407 (btw, you do not 
have to go via the onreply route, you can use only failure_route, 
directly). If so, call uac_auth(), but be sure you the $avp(10), 
$avp(11) and $avp(12) *already* contain the values for realm, username 
and password. You can load that info from a DB for example.


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/27/2018 06:42 AM, Slava Bendersky wrote:

Hello Bogdan,
The issue that opensips is not handling user authentication, password 
is stored in 3cx. Is there are way set avp or into cache intial 
credentials ?

I come up with something like this.
My though  was.

modparam("uac_auth","auth_realm_avp","$avp(10)")
modparam("uac_auth","auth_username_avp","$avp(11)")
modparam("uac_auth","auth_password_avp","$avp(12)")

route[PUBLISH_407] {
if(is_method("PUBLISH") && 
has_body("application/dialog-info+xml") && $avp(DLG_dir)=="frompbx") {

xlog("L_INFO", "[$rm] from $si\n");
t_on_reply("6");
}

onreply_route[6] {
if(is_method("PUBLISH") && t_check_status("407")) {
xlog("L_INFO", "OnReply_Route6: [$rm] Direction: [FS 
~> Client] asked for 407\n");

t_on_failure("SUPPLY_AUTH");
}
}

failure_route[SUPPLY_AUTH] {
*don't know how to supply credential  yet*
uac_auth();
}

volga629


*From: *"Bogdan-Andrei Iancu" 
*To: *"OpenSIPS users mailling list" , 
"Slava Bendersky" 

*Sent: *Friday, October 26, 2018 5:28:09 AM
*Subject: *Re: [OpenSIPS-Users] presence blf

Hi Slava,

Sorry for the mistyping your name :Done wrong character and 
something a bit weird resulted :D.


Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 10/26/2018 09:34 AM, Bogdan-Andrei Iancu wrote:

Hi Slave,

If you cannot do an IP authentication / whitelisting for OpenSIPS
in 3CX, you could use the uac_auth module and the uac_auth()
function to perform user side authentication in OpenSIPS. See
http://www.opensips.org/html/docs/modules/2.4.x/uac.html
http://www.opensips.org/html/docs/modules/2.4.x/uac_auth.html

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/25/2018 09:49 PM, Slava Bendersky wrote:

Hello Everyone,
I am trying make BLF working and how opensips should handle
PUBLISH where server reply 407 ?
Do we need forward to end point ?
Opensips send PUBLISH then 3CX send 407 and conversation done.
Here some trace

[root@aitossbc01 ~]# cat BLF.txt
2018/10/25 12:22:19.148093 10.100.104.10:5060 -> 10.2.24.124:5060
PUBLISH sip:1...@domain.tld:5060 SIP/2.0
Via: SIP/2.0/UDP 10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0
To: sip:1...@domain.tld:5060
From:
;tag=4c20d2ebf66939afcc7c67fb6893f1be-672a
CSeq: 10 PUBLISH
Call-ID: 0324183200c79905-20534@10.100.104.10
Max-Forwards: 70
Content-Length: 549
User-Agent: OpenSIPS (3.0.0-dev (x86_64/linux))
Event: dialog
Expires: 3601
Content-Type: application/dialog-info+xml


confirmedsip:2...@domain.tld:5060sip:1...@domain.tld:5060


2018/10/25 12:22:19.198773 10.2.24.124:5060 -> 10.100.104.10:5060
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.100.104.10:5060;branch=z9hG4bK9f23.99096732.0
Proxy-Authenticate: Digest

nonce="414d53595bd1fbcb12:61835c52c28e8a89737c489e16fa5965",algorithm=MD5,realm="3CXPhoneSystem"
To: ;tag=d9bb492f
From:
;tag=4c20d2ebf66939afcc7c67fb6893f1be-672a
Call-ID: 0324183200c79905-20534@10.100.104.10
CSeq: 10 PUBLISH
User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502)
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


Re: [OpenSIPS-Users] Location table update instead of insert

2018-10-29 Thread Schneur Rosenberg
I do have a shared DB and "skip_replicated_db_ops" is set to "1" and I
have the problem that the lots of users were erased from the location
table somehow and the server thinks the record is there and just does
a update, I think the system should do a insert if it sees that 0 rows
were updated during the update query
On Sat, Oct 27, 2018 at 5:58 PM Liviu Chircu  wrote:
>
> Hi Schneur,
>
> Does each of your active/passive servers have its own DB, or do they
> share one?
>
> If they have individual DBs (which seems like it), then you should *not*
> enable "skip_replicated_db_ops".  Upon a node restart and sync
> operation, the node will properly dump its contacts to DB with INSERTs,
> followed by UPDATEs.
>
> If they use a shared DB: we do not recommend this setup anymore, however
> "skip_replicated_db_ops" should do the job.  After sync'ing up, the
> receiver node will avoid key conflicts by not re-doing the INSERTs when
> its boots up.  Later, when it switches to primary, the UPDATEs will work
> just fine.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 23.10.2018 10:39, Schneur Rosenberg wrote:
> > Hi, the last few days my location table displays only a fraction of
> > the registered users, I did some digging and I enabled query logging
> > on MySQL and I can see that OpenSIPS is doing updates instead of
> > inserts, and being that a update on a WHERE that does not
> >
> > My system is a cluster of 2 OpenSIPS servers version 2.4.1 running
> > "full-sharing" "cluster_mode", "restart_persistency" is set to
> > "load-from-sql", "sql_write_mode" is set to "write-back" and
> > "skip_replicated_db_ops" is set to "1" as of now its a active/passive
> > setup, when a server comes up it loads what its got in DB and then
> > after approx 3 minutes after all users have registered to the other
> > server the server will be syced.
> >
> > I tried bringing down one server at a time and the problem persists, I
> > suspect that when it comes up and it gets synced over binary it
> > assumes those users are in the DB and when the server becomes ACTIVE
> > it runs a update instead of a insert, I assume that if I would bring
> > down the entire cluster and delete the rows in the location table and
> > bring it back up it will operate properly but I would really love to
> > avoid that, is there another way?
> >
> > being that "contact_id"  is a PRIMARY KEY, is there a reason OpenSIPS
> > is not using  a INSERT with "ON DUPLICATE KEY"? or perhaps OpenSIPS
> > can run a INSERT if no rows were updated? and how can I avoid this in
> > the future?
> >
> > ___
> > 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