Re: [OpenSIPS-Users] re-homing calls

2024-06-11 Thread Alberto
Hi Răzvan,

First of all, thanks for looking into this.

So, here's what's in that picture, I had to rebuild my entire lab, so ips
changed:

192.168.56.124 is asterisk, sending a call to a floating ip
192.168.56.120 is a floating ip, managed by keepalived, with
opensips/rtpengine

And this is what happens:
- asterisk sends a call through the primary opensips/rtpengine
- call is established
- network on the primary opensips fails (note that the opensips service is
still running, but there's no network, no access to the shared mongodb, no
rtp)
- secondary opensips/rtpengine takes the floating ip and re-INVITEs the call
- asterisk accepts the in-dialog INVITE and rtp is re-established through
the secondary opensips/rtpengine
- network on the primary opensips is restored
- primary opensips takes the floating ip back and re-INVITEs the call
- asterisk replies with "500 Invalid CSeq"

  192.168.56.124192.168.56.120
  ──┬─  ──┬─
  14:24:55.900819   │INVITE (SDP) │
+0.000562   │ ──> │
  14:24:55.901381   │ 100 Giving it a try │
+0.00   │ <── │
  14:24:55.901381   │ 100 Giving it a try │
+0.002552   │ <<< │
  14:24:55.903933   │ 180 Ringing │
+3.008060   │ <── │
  14:24:58.911993   │200 OK (SDP) │
+0.001352   │ <── │
  14:24:58.913345   │ ACK │
│ ──> │
│  RTP (g711a) 2255   │
  14:24:58.970785   │10700 > 13650│
│  RTP (g711a) 2104   │
   +45.796826   │10700 < 13650│
  14:25:44.710171   │INVITE (SDP) │
+0.001247   │ <── │
  14:25:44.711418   │200 OK (SDP) │
+0.000309   │ ──> │
  14:25:44.711727   │ ACK │
│ <── │
│  RTP (g711a) 4033   │
  14:25:44.714624   │10700 > 18640│
│  RTP (g711a) 2189   │
   +44.573254   │10700 < 18640│
  14:26:29.284981   │INVITE (SDP) │
+0.000196   │ <── │
  14:26:29.285177   │  500 Invalid CSeq   │
+0.000224   │ ──> │
  14:26:29.285401   │ ACK │
   +53.726523   │ <── │
  14:27:23.011924   │ BYE │
+0.006234   │ ──> │
  14:27:23.018158   │  500 Invalid CSeq   │
│ <── │



the commands I use to move the call when the ip floats are:
opensips-cli -x mi clusterer_shtag_set_active test1/1
while IFS='' read -r callid; do
  opensips-cli -x mi dlg_send_sequential callid=${callid} mode=challenge
body=inbound
done < <(opensips-cli -x mi dlg_list | jq -r '.Dialogs[] | .callid')


On Fri, 7 Jun 2024 at 12:49, Răzvan Crainea  wrote:

> Hi, Alberto!
>
> Unfortunately the image you provided that shows how to migrate calls
> back to the primary server does no longer work. Can you please re-share
> it, or, explain what you want to show/prove in that image? Is the
> re-INVITE sent and properly accepted?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer / SIPhub CTO
> http://www.opensips-solutions.com / https://www.siphub.com
>
> On 5/31/24 12:15 AM, Alberto wrote:
> > Hi,
> >
> > I'm testing
> >
> https://blog.opensips.org/2019/10/03/re-homing-your-calls-with-opensips-3-0/
> > and I have a problem with re-homing calls from the backup server back to
> > the primary server.
> >
> > My configuration is as follows:
> > shared mongodb : 172.20.2.19
> > opensips virtual floating ip : 172.20.2.20
> > opensips-0 : 172.20.2.21
> > opensips-1 : 172.20.2.22
> >
> > to float the ip, i'm using keepalived monitoring both the network and the
> > opensips process.
> > When it detects the virtual ip has become available locally, keepalived
> > does this:
> >
> > opensips-cli -x mi clusterer_shtag_set_active testtag/1
> > opensips-cli -x mi dlg_list | jq -r '.Dialogs[] | .callid' | while IFS=''
> > read -r callid; do
> >opensips-cli -x mi dlg_send_sequential callid=${callid} mode=challenge
> > body=inbound
> > done
> >
> > Now I'm testing 2 scenarios, in the first one the opensips process on the
> > primary server terminates, in the second scenario the network to the
> > prim

[OpenSIPS-Users] re-homing calls

2024-05-30 Thread Alberto
Hi,

I'm testing
https://blog.opensips.org/2019/10/03/re-homing-your-calls-with-opensips-3-0/
and I have a problem with re-homing calls from the backup server back to
the primary server.

My configuration is as follows:
shared mongodb : 172.20.2.19
opensips virtual floating ip : 172.20.2.20
opensips-0 : 172.20.2.21
opensips-1 : 172.20.2.22

to float the ip, i'm using keepalived monitoring both the network and the
opensips process.
When it detects the virtual ip has become available locally, keepalived
does this:

opensips-cli -x mi clusterer_shtag_set_active testtag/1
opensips-cli -x mi dlg_list | jq -r '.Dialogs[] | .callid' | while IFS=''
read -r callid; do
  opensips-cli -x mi dlg_send_sequential callid=${callid} mode=challenge
body=inbound
done

Now I'm testing 2 scenarios, in the first one the opensips process on the
primary server terminates, in the second scenario the network to the
primary server is interrupted.
In both cases I expect calls to be re-homed to the backup server (which
always happens) and to come back to the primary server when the problem has
been resolved (which doesn't always happen).

Here's the breakdown of the 2 tests.

So, when I start a call through opensips-0 and then kill the opensips
process, the virtual ip floats to the secondary server, and all calls are
migrated to the backup server.
When the opensips process is restarted, the ip floats back to the primary
server and all calls are migrated back.
All good here.

However, when I start a call through opensips-0 and pull the network cable,
the virtual ip floats to the secondary server and all calls are migrated.
But, when the network is restored and the ip floats back to the primary
server, calls fail to migrate back.
In the screenshot attached here you can see the invite that should migrate
the calls back to the primary server.
https://ibb.co/m4trL1Y
Note that in this second scenario opensips loses connectivity, but it
doesn't restart.

I tried to do `opensips-cli -x mi dlg_cluster_sync` and/or `opensips-cli -x
mi dlg_restore_db` on the primary server before the tag is set to active
and calls are migrated back, but it didn't help.

I hope this makes some sense.
Is there any other info or test I can provide?
Thanks
AR
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rest_post logs

2023-09-19 Thread Alberto
Hi,

Thanks for your reply,

I'm using v3.2.
I realized that that's the output from libcurl, which I can turn off by
setting log_stdout and log_stderror to no.

Thanks again

p.s. Have you ever thought about a forum instead of the mailing list? I
would have gone back and answered/closed my own question, but I didn't know
if I should have done that via mail.


On Tue, 19 Sept 2023 at 09:57, Bogdan-Andrei Iancu 
wrote:

> HI Alberto,
>
> What OpenSIPS version do you have?
>
> And are those the only log lines you get ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 9/1/23 4:43 PM, Alberto wrote:
>
> Hi,
>
> Is there a way to turn off logs for rest_post requests?
>
> This is my log settings:
> log_level=-1
> xlog_level=-1
> log_stdout=yes
> log_stderror=yes
> log_facility=LOG_LOCAL0
>
> This is the type of output I want to suppress:
> Sep 01 13:31:48 opensips opensips[59740]: > POST /api/opensips/doit
> HTTP/1.1
> Sep 01 13:31:48 opensips opensips[59740]: Host: 127.0.0.1
> Sep 01 13:31:48 opensips opensips[59740]: Accept: */*
> Sep 01 13:31:48 opensips opensips[59740]: Content-Type: application/json
> Sep 01 13:31:48 opensips opensips[59740]: Content-Length: 156
> Sep 01 13:31:48 opensips opensips[59740]:
> Sep 01 13:31:48 opensips opensips[59740]: * upload completely sent off:
> 156 out of 156 bytes
> Sep 01 13:31:48 opensips opensips[59740]: * Mark bundle as not supporting
> multiuse
> Sep 01 13:31:48 opensips opensips[59740]: < HTTP/1.1 200 OK
> Sep 01 13:31:48 opensips opensips[59740]: < Server: nginx
> Sep 01 13:31:48 opensips opensips[59740]: < Date: Fri, 01 Sep 2023
> 13:31:48 GMT
> Sep 01 13:31:48 opensips opensips[59740]: < Content-Type:
> application/json; charset=utf-8
> Sep 01 13:31:48 opensips opensips[59740]: < Content-Length: 360
> Sep 01 13:31:48 opensips opensips[59740]: < Connection: keep-alive
> Sep 01 13:31:48 opensips opensips[59740]: < Access-Control-Allow-Origin: *
> Sep 01 13:31:48 opensips opensips[59740]: < Content-Security-Policy:
> default-src 'self';base-uri 'self';font-src 'self' https:
> data:;form-action 'self';frame-ancestors 'self';img-src 'self'
> data:;object-src 'none';script-src 'self';script-src-attr
> 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests
> Sep 01 13:31:48 opensips opensips[59740]: < Cross-Origin-Opener-Policy:
> same-origin
> Sep 01 13:31:48 opensips opensips[59740]: < Cross-Origin-Resource-Policy:
> same-origin
> Sep 01 13:31:48 opensips opensips[59740]: < Origin-Agent-Cluster: ?1
> Sep 01 13:31:48 opensips opensips[59740]: < Referrer-Policy: no-referrer
> Sep 01 13:31:48 opensips opensips[59740]: < Strict-Transport-Security:
> max-age=15552000; includeSubDomains
> Sep 01 13:31:48 opensips opensips[59740]: < X-Content-Type-Options: nosniff
> Sep 01 13:31:48 opensips opensips[59740]: < X-DNS-Prefetch-Control: off
> Sep 01 13:31:48 opensips opensips[59740]: < X-Download-Options: noopen
> Sep 01 13:31:48 opensips opensips[59740]: < X-Frame-Options: SAMEORIGIN
> Sep 01 13:31:48 opensips opensips[59740]: <
> X-Permitted-Cross-Domain-Policies: none
> Sep 01 13:31:48 opensips opensips[59740]: < X-XSS-Protection: 0
> Sep 01 13:31:48 opensips opensips[59740]: <
> Sep 01 13:31:48 opensips opensips[59740]: * Connection #0 to host
> 127.0.0.1 left intact
>
> Thanks
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] sip info dtmf

2023-09-08 Thread Alberto
Hi,
I'm using opensips 3.2 and can't find any way to get this working.
Can someone help me complete this code?
I had a look at textops, but I don't see any function that can extract a
regex matched group.
Thanks

if (is_method("INFO") && $hdr(Content-Type) == "application/dtmf-relay") {
  $var(body) = $rb(application/dtmf-relay);
  if ($var(body) =~ "Signal=([0-9]+)") {
 $var(dtmf) = ???;
 xlog("L_NOTICE", "$$var(dtmf): $var(dtmf)\n");
   }
}
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] rest_post logs

2023-09-01 Thread Alberto
Hi,

Is there a way to turn off logs for rest_post requests?

This is my log settings:
log_level=-1
xlog_level=-1
log_stdout=yes
log_stderror=yes
log_facility=LOG_LOCAL0

This is the type of output I want to suppress:
Sep 01 13:31:48 opensips opensips[59740]: > POST /api/opensips/doit HTTP/1.1
Sep 01 13:31:48 opensips opensips[59740]: Host: 127.0.0.1
Sep 01 13:31:48 opensips opensips[59740]: Accept: */*
Sep 01 13:31:48 opensips opensips[59740]: Content-Type: application/json
Sep 01 13:31:48 opensips opensips[59740]: Content-Length: 156
Sep 01 13:31:48 opensips opensips[59740]:
Sep 01 13:31:48 opensips opensips[59740]: * upload completely sent off: 156
out of 156 bytes
Sep 01 13:31:48 opensips opensips[59740]: * Mark bundle as not supporting
multiuse
Sep 01 13:31:48 opensips opensips[59740]: < HTTP/1.1 200 OK
Sep 01 13:31:48 opensips opensips[59740]: < Server: nginx
Sep 01 13:31:48 opensips opensips[59740]: < Date: Fri, 01 Sep 2023 13:31:48
GMT
Sep 01 13:31:48 opensips opensips[59740]: < Content-Type: application/json;
charset=utf-8
Sep 01 13:31:48 opensips opensips[59740]: < Content-Length: 360
Sep 01 13:31:48 opensips opensips[59740]: < Connection: keep-alive
Sep 01 13:31:48 opensips opensips[59740]: < Access-Control-Allow-Origin: *
Sep 01 13:31:48 opensips opensips[59740]: < Content-Security-Policy:
default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action
'self';frame-ancestors 'self';img-src 'self' data:;object-src
'none';script-src 'self';script-src-attr 'none';style-src 'self' https:
'unsafe-inline';upgrade-insecure-requests
Sep 01 13:31:48 opensips opensips[59740]: < Cross-Origin-Opener-Policy:
same-origin
Sep 01 13:31:48 opensips opensips[59740]: < Cross-Origin-Resource-Policy:
same-origin
Sep 01 13:31:48 opensips opensips[59740]: < Origin-Agent-Cluster: ?1
Sep 01 13:31:48 opensips opensips[59740]: < Referrer-Policy: no-referrer
Sep 01 13:31:48 opensips opensips[59740]: < Strict-Transport-Security:
max-age=15552000; includeSubDomains
Sep 01 13:31:48 opensips opensips[59740]: < X-Content-Type-Options: nosniff
Sep 01 13:31:48 opensips opensips[59740]: < X-DNS-Prefetch-Control: off
Sep 01 13:31:48 opensips opensips[59740]: < X-Download-Options: noopen
Sep 01 13:31:48 opensips opensips[59740]: < X-Frame-Options: SAMEORIGIN
Sep 01 13:31:48 opensips opensips[59740]: <
X-Permitted-Cross-Domain-Policies: none
Sep 01 13:31:48 opensips opensips[59740]: < X-XSS-Protection: 0
Sep 01 13:31:48 opensips opensips[59740]: <
Sep 01 13:31:48 opensips opensips[59740]: * Connection #0 to host 127.0.0.1
left intact

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


Re: [OpenSIPS-Users] Call fetch_dlg_value inside a timer route

2023-05-17 Thread Alberto
This reminded me of something else, maybe it can be used here too:
In a event route, before you can use dialog variables, you have to load the
dialog context by using func_load_dialog_ctx. Maybe it's the same with
timer routes.

https://opensips.org/docs/modules/3.2.x/dialog#func_load_dialog_ctx

On Wed, 17 May 2023, 21:07 Daniel Zanutti,  wrote:

> Hi folks
>
> Why is it not possible to call *fetch_dlg_value *inside a timer route? Is
> there any other alternative to it?
>
> I wanted to generate some statistics every X seconds.
>
> Thanks
> ___
> 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] cluster configuration for dialogs

2023-05-02 Thread Alberto
Hi,
do you ever get the feeling you are going nuts? Anyways...
I have 2 opensips servers, both version 3.2.12, on debian 11
they both share the same configuration, and start opensips using m4 as
follows: `opensips -F -f /etc/opensips/opensips.cfg -p "m4
/etc/opensips/env.m4 -"`


m4 server1:divert(-1)
define(`M4_LAN_IP', `10.0.0.124')
define(`M4_WAN_IP', `10.0.0.124')
define(`M4_CLUSTER_NODE_ID', `1')
define(`M4_SHARING_TAG', `node_1')
define(`M4_CLUSTER_ID', `1')
divert(0)dnl


m4 server 2:divert(-1)
define(`M4_LAN_IP', `10.0.0.125')
define(`M4_WAN_IP', `10.0.0.125')
define(`M4_CLUSTER_NODE_ID', `2')
define(`M4_SHARING_TAG', `node_2')
define(`M4_CLUSTER_ID', `1')
divert(0)dnl


configuration:
debug_mode=no

log_level=2
xlog_level=2
log_stdout=yes
log_stderror=yes
log_facility=LOG_LOCAL0

auto_aliases=no

server_signature=yes

socket=udp:0.0.0.0:5060 as M4_WAN_IP:5060
socket=tcp:0.0.0.0:5060 as M4_WAN_IP:5060
socket=tls:0.0.0.0:5061 as M4_WAN_IP:5061
socket=bin:0.0.0.0: as M4_WAN_IP:

tcp_connect_timeout=300

mpath="/usr/lib64/opensips/modules/"

loadmodule "tls_openssl.so"

loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "openssl")

modparam("tls_mgm", "server_domain", "sd_1")
modparam("tls_mgm", "ca_list", "[sd_1]/opt/letsencrypt/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[sd_1]/etc/ssl/certs")
modparam("tls_mgm", "certificate", "[sd_1]/opt/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[sd_1]/opt/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[sd_1]0")
modparam("tls_mgm", "tls_method", "[sd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[sd_1]0")
modparam("tls_mgm", "ec_curve", "[sd_1]secp521r1")

modparam("tls_mgm", "client_domain", "cd_1")
modparam("tls_mgm", "ca_list", "[cd_1]/opt/letsencrypt/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[cd_1]/etc/ssl/certs")
modparam("tls_mgm", "certificate", "[cd_1]/opt/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[cd_1]/opt/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[cd_1]0")
modparam("tls_mgm", "tls_method", "[cd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[cd_1]0")
modparam("tls_mgm", "ec_curve", "[cd_1]secp521r1")
modparam("tls_mgm", "match_sip_domain", "[cd_1]*")
modparam("tls_mgm", "match_ip_address", "[cd_1]*")

loadmodule "cachedb_mongodb.so"

loadmodule "db_mysql.so"
modparam("db_mysql", "exec_query_threshold", 0)
modparam("db_mysql", "timeout_interval", 5)
modparam("db_mysql", "max_db_queries", 5)
modparam("db_mysql", "max_db_retries", 5)

loadmodule "clusterer.so"
modparam("clusterer", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("clusterer", "my_node_id", M4_CLUSTER_NODE_ID)
modparam("clusterer", "seed_fallback_interval", 5)
modparam("clusterer", "sharing_tag", "M4_SHARING_TAG/M4_CLUSTER_ID=active")

loadmodule "signaling.so"

loadmodule "sl.so"

loadmodule "tm.so"
modparam("tm", "auto_100trying", 0)
modparam("tm", "fr_inv_timeout", 120)
modparam("tm", "fr_timeout", 30)
modparam("tm", "onreply_avp_mode", 1)
modparam("tm", "restart_fr_on_each_reply", 0)

loadmodule "rr.so"
modparam("rr", "append_fromtag", 1)

loadmodule "dialog.so"
modparam("dialog", "cachedb_url", "mongodb://
10.0.0.120:27017/opensipsDB.dialog")
modparam("dialog", "default_timeout", 14400) # 4 hours
modparam("dialog", "dialog_replication_cluster", M4_CLUSTER_ID)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_stats", 1)
modparam("dialog", "profile_replication_cluster", M4_CLUSTER_ID)
modparam("dialog", "profiles_no_value", "shared/s")
modparam("dialog", "profiles_with_value", "caller")

loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)

loadmodule "uac.so"
modparam("uac", "restore_mode", "auto")
modparam("uac", "force_dialog", yes)

loadmodule "permissions.so"
modparam("permissions", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")

loadmodule "sipmsgops.so"

loadmodule "textops.so"

loadmodule "callops.so"

loadmodule "usrloc.so"
modparam("usrloc", "cachedb_url", "mongodb://
10.0.0.120:27017/opensipsDB.usrloc")
modparam("usrloc", "location_cluster", M4_CLUSTER_ID)
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "working_mode_preset", "federation-cachedb-cluster")

loadmodule "registrar.so"
modparam("registrar", "max_contacts", 1)
modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")

loadmodule "mid_registrar.so"
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")

loadmodule "proto_bin.so"

loadmodule "proto_udp.so"

loadmodule "proto_tcp.so"

loadmodule "proto_tls.so"

route {
  if (has_totag()) {
if (topology_hiding_match("DID_FALLBACK")) {
} else if (loose_route()) {
  if ($DLG_status != NULL && !validate_dialog()) {
exit;
  }
} else {
  if (is_method("ACK")) {
if (t_check_trans()) {
  t_relay();

Re: [OpenSIPS-Users] ACC module for rejected calls

2023-04-03 Thread Alberto
Thanks
I tried both sl_send_reply and send_reply, but I didn't see t_reply.
That was it.

On Mon, 3 Apr 2023 at 22:40, Daniel Zanutti 
wrote:

> Hi Alberto
>
> You are correct, this is the line you need.
>
> I think you need a created transaction. Since you are responding in
> stateless, you may be missing the cdr.
> Try changing this and let me know if solves:
>
> sl_send_reply(488, "Not Acceptable Here");  ->  t_reply(488, "Not
> Acceptable Here");
>
> Regards
>
>
>
> On Mon, Apr 3, 2023 at 6:09 PM Alberto  wrote:
>
>> Hi,
>>
>> I'm trying to understand the ACC module, using this minimal configuration
>> below.
>> My question is: why is there no cdr created?
>> I would have assumed that `do_accounting("log", "cdr|missed|failed");`
>> always saves cdrs, but it doesn't when the call is rejected from inside the
>> configuration script.
>> Hope my question is clear. Thanks
>>
>>
>> debug_mode=no
>>
>> log_level=3
>> xlog_level=3
>> log_stdout=yes
>> log_stderror=yes
>> log_facility=LOG_LOCAL0
>>
>> auto_aliases=no
>>
>> server_signature=yes
>>
>> socket=udp:0.0.0.0:5060
>> socket=tcp:0.0.0.0:5060
>>
>> tcp_connect_timeout=300
>>
>> mpath="/usr/lib64/opensips/modules/"
>>
>> loadmodule "signaling.so"
>>
>> loadmodule "sl.so"
>>
>> loadmodule "tm.so"
>> modparam("tm", "fr_inv_timeout", 120)
>> modparam("tm", "fr_timeout", 30)
>> modparam("tm", "onreply_avp_mode", 1)
>> modparam("tm", "restart_fr_on_each_reply", 0)
>>
>> loadmodule "rr.so"
>> modparam("rr", "append_fromtag", 1)
>>
>> loadmodule "acc.so"
>> modparam("acc", "early_media", 1)
>> modparam("acc", "report_cancels", 1)
>> modparam("acc", "detect_direction", 1)
>>
>> loadmodule "dialog.so"
>> modparam("dialog", "default_timeout", 14400) # 4 hours
>> modparam("dialog", "dlg_match_mode", 1)
>> modparam("dialog", "enable_stats", 0)
>> modparam("dialog", "profiles_with_value", "caller")
>>
>> loadmodule "sipmsgops.so"
>>
>> loadmodule "proto_udp.so"
>> loadmodule "proto_tcp.so"
>>
>> route {
>>   if (has_totag()) {
>> if (loose_route()) {
>>   if ($DLG_status != NULL && !validate_dialog()) {
>> exit;
>>   }
>> } else {
>>   if (is_method("ACK")) {
>> if (t_check_trans()) {
>>   t_relay();
>> }
>> exit;
>>   }
>>   sl_send_reply(404, "Not Found");
>>   exit;
>> }
>> t_relay();
>> exit;
>>   }
>>   t_check_trans();
>>   if (is_myself($si)) {
>> send_reply(406, "Not Acceptable");
>> exit;
>>   }
>>   if (is_method("INVITE")) {
>> if (!create_dialog("B")) {
>>   send_reply(500, "Internal Server Error");
>>   exit;
>> }
>>   }
>>   if (loose_route()) {
>> if (!is_method("ACK")) {
>>   sl_send_reply(403, "Preload Route denied");
>> }
>> exit;
>>   }
>>   if ($rU == NULL) {
>> send_reply(484, "Address Incomplete");
>> exit;
>>   }
>>   route(relay);
>> }
>>
>> route[relay] {
>>   if (is_method("INVITE")) {
>> do_accounting("log", "cdr|missed|failed");
>> sl_send_reply(488, "Not Acceptable Here");
>> exit;
>>   }
>>   if (!t_relay()) {
>> send_reply(500, "Internal Error");
>>   }
>>   exit;
>> }
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ACC module for rejected calls

2023-04-03 Thread Alberto
Hi,

I'm trying to understand the ACC module, using this minimal configuration
below.
My question is: why is there no cdr created?
I would have assumed that `do_accounting("log", "cdr|missed|failed");`
always saves cdrs, but it doesn't when the call is rejected from inside the
configuration script.
Hope my question is clear. Thanks


debug_mode=no

log_level=3
xlog_level=3
log_stdout=yes
log_stderror=yes
log_facility=LOG_LOCAL0

auto_aliases=no

server_signature=yes

socket=udp:0.0.0.0:5060
socket=tcp:0.0.0.0:5060

tcp_connect_timeout=300

mpath="/usr/lib64/opensips/modules/"

loadmodule "signaling.so"

loadmodule "sl.so"

loadmodule "tm.so"
modparam("tm", "fr_inv_timeout", 120)
modparam("tm", "fr_timeout", 30)
modparam("tm", "onreply_avp_mode", 1)
modparam("tm", "restart_fr_on_each_reply", 0)

loadmodule "rr.so"
modparam("rr", "append_fromtag", 1)

loadmodule "acc.so"
modparam("acc", "early_media", 1)
modparam("acc", "report_cancels", 1)
modparam("acc", "detect_direction", 1)

loadmodule "dialog.so"
modparam("dialog", "default_timeout", 14400) # 4 hours
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_stats", 0)
modparam("dialog", "profiles_with_value", "caller")

loadmodule "sipmsgops.so"

loadmodule "proto_udp.so"
loadmodule "proto_tcp.so"

route {
  if (has_totag()) {
if (loose_route()) {
  if ($DLG_status != NULL && !validate_dialog()) {
exit;
  }
} else {
  if (is_method("ACK")) {
if (t_check_trans()) {
  t_relay();
}
exit;
  }
  sl_send_reply(404, "Not Found");
  exit;
}
t_relay();
exit;
  }
  t_check_trans();
  if (is_myself($si)) {
send_reply(406, "Not Acceptable");
exit;
  }
  if (is_method("INVITE")) {
if (!create_dialog("B")) {
  send_reply(500, "Internal Server Error");
  exit;
}
  }
  if (loose_route()) {
if (!is_method("ACK")) {
  sl_send_reply(403, "Preload Route denied");
}
exit;
  }
  if ($rU == NULL) {
send_reply(484, "Address Incomplete");
exit;
  }
  route(relay);
}

route[relay] {
  if (is_method("INVITE")) {
do_accounting("log", "cdr|missed|failed");
sl_send_reply(488, "Not Acceptable Here");
exit;
  }
  if (!t_relay()) {
send_reply(500, "Internal Error");
  }
  exit;
}
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] python module

2023-03-30 Thread Alberto
Hi,

I'm curious, since python_exec only accepts one extra parameter, how do you
guys pass multiple variables to a python function?

I personally do this:
$json(args) := "{}";
$json(args/param0) = "sdifuhsidfg";
$json(args/param1) = "asfagfgf";
$json(args/param2) = "asfergerghdf";
python_exec("python_my_fn", $json(args));

and then I restore the json object in the python function and use my
variables..

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


[OpenSIPS-Users] OpenSIPS on Cloud (AWS or Azure)

2023-01-30 Thread Andrés Alberto Lavariega Castellanos
I'm trying to install OpenSips on Digital Ocean's server, if the service has a 
public IP I think I should have no problem.


[cid:image001.png@01D92160.8422F200]
Andres Lavariega
Back End VoIP
[cid:image002.png@01D92160.8422F200]
5579192214

[cid:image003.png@01D92160.8422F200]
andres.lavari...@directo.com

[cid:image004.png@01D92160.8422F200]
Torre Virreyes, Pedregal 24, piso 6
CDMX, México 11040
+52 55 5201 4550

[cid:image005.png@01D92160.8422F200]
www.directo.com














AVISO DE CONFIDENCIALIDAD: Este correo electrónico y su contenido (incluyendo 
cualquier archivo adjunto o link hacia alguna URL), contiene información que es 
confidencial y/o legalmente privilegiada. La copia, revisión, uso, revelación 
y/o distribución de dicha información confidencial sin la autorización por 
escrito del remitente queda estrictamente prohibida. Si usted no es el 
destinatario a quien se dirige el presente correo, por favor notifique al 
remitente respondiendo al presente correo y elimine el correo original 
incluyendo cualquier archivo adjunto, así como cualquier copia del mismo. 
Mediante la recepción del presente correo usted reconoce y acepta que en caso 
de incumplimiento de su parte y/o de sus representantes a los términos antes 
mencionados, el remitente tendrá derecho a los daños y perjuicios que esto le 
cause.

CONFIDENTIALITY NOTICE: This email and its contents (including any attachments 
or linked urls) may contain information that is confidential and/or legally 
privileged. Any unauthorized use, disclosure, and/or distribution of such 
information is prohibited. If you are not the intended recipient, please notify 
the sender, delete the original email and any attachments, and destroy any 
copies thereof.

By receiving this e-mail, you acknowledge that any breach by you and/or your 
representatives of the above provisions may entitle the sender for damages.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] mid_registrar and vpn and nat

2022-12-13 Thread Alberto
Hi,
I have a problem with a vpn setup, not really nat, or maybe it's nat...

The setup I have is:
Phone - openvpn - opensips - public internet - asterisk

openvpn subnet: 10.0.0.0/24
openvpn server: 172.172.0.2/24
opensips server: 172.172.0.10/24

In my configuration I have:

loadmodule "mid_registrar.so"
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "received_avp", "$avp(rcv)")
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")

if (nat_uac_test(119)) {
  setbflag("NAT");
  if (is_method("REGISTER")) {
fix_nated_register();
  } else {
fix_nated_contact();
  }
}

if (is_method("REGISTER")) {
  mid_registrar_save("location", "p0");
  .
}

if ($(tu{uri.param,ctid}) != NULL && mid_registrar_lookup("location")) {
  if (!t_relay()) {
send_reply(500, "Internal Error");
  }
}

So, when the phone sends a REGISTER to opensips, the contact header
contains the private ip of the vpn (10.0.0.X/24).
fix_nated_register is able to detect that the ip in the contact is
different from the source ip and sets the received avp.
But if I do opensips-cli -x mi ul_dump, I see that the contact still
contains the openvpn ip, and the received field contains the correct
openvpn ip.
This is a problem because when I do the mid_registrar_lookup, $ru is set to
the contact, which contains an ip that the opensips server is not aware of.
It should instead contain the openvpn server ip (172.172.0.2), that could
then route the call to the phone.

I tried to change $rd manually, but that just breaks routing for ACK
messages.
What am I doing wrong?

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


[OpenSIPS-Users] rtpengine session-name

2022-10-21 Thread Alberto
Hi,

I'm using opensips 3.3.1 with rtpengine, but I don't see
replace-session-name.
Is this flag implemented?

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


[OpenSIPS-Users] Dispatcher module and partition

2022-10-19 Thread Alberto
Hi,

I'm using opensips 3.3.1 and I have a question about the dispatcher module.

Can I set different ds_ping_from, ds_ping_method, ds_probing_mode, and
ds_ping_interval per partition?

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


Re: [OpenSIPS-Users] Billing And Invoicing for Opensips 3.0

2022-04-18 Thread Alberto
If you need just pdf bills and reports you could use a jasper server.
If you need to manage invoices and payments I don't know, but let me know
if you find something decent.
I landed on astpp a couple of years ago and regret it ever since.

On Mon, 18 Apr 2022, 10:32 HS,  wrote:

> Thanks Alberto.
>
> Just looked at CDRTool - don't think it has invoicing.
> ___
> 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] Billing And Invoicing for Opensips 3.0

2022-04-18 Thread Alberto
Stay the hell away from astpp, version 4 it's so full of bugs you won't
believe it.

Maybe cdrtools?

On Mon, 18 Apr 2022, 08:00 HS,  wrote:

> Hi all.
>
> I am looking to add billing + invoicing to the setup. Came across CGrates
> for rate cards etc, but is there a billing + invoicing setup that works
> great with Opensips CDRs?
>
> I have looked at astpp so far and searched quite a bit, but nothing much
> available.
>
> Any suggestions?
>
> Thanks.
> ___
> 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 3.2 and latest github rtpengine

2022-03-24 Thread Alberto
That works, here's what I've ended up using:

rtpengine_manage("loop-protect ... other things I need", , $var(body));
remove_body_part();
add_body_part($(var(body){re.subst,/^s=.*$/s=abcxxx/g}), "application/sdp");

but seems cumbersome, I was expecting to do rtpengine_manage followed by
replace_body_all and don't interfere further with the flow

Anyway, thanks

On Thu, 24 Mar 2022 at 02:33, Artiom Druz  wrote:

> Hello, Alberto.
> You can modify it by using an optional parameter in rtpengine_offer
> (sdp_var -
> https://opensips.org/html/docs/modules/3.2.x/rtpengine#func_rtpengine_offer
> ).
> Logic:
> You can write new sdp body to the variable instead of rewrite of existing
> SDP. After that you can modify "s" parameter in this variable.
> Next - you delete existing SDP (remove_body_part()) and add new SDP with
> content from variable (add_body_part()).
>
> Best regards,
> Artiom Druz
>
> чт, 24 мар. 2022 г., 04:34 Alberto :
>
>> Hi,
>>
>> I'm trying to change the session name, the s= line, while using rtpengine.
>>
>> If I remove rtpengine and do replace_body_all("^s=.*$", "s=abczzz"); it
>> works just fine and I see the new session name in the second leg of the
>> call.
>>
>> But when rtpengine_offer is called, the original sdp body is used instead
>> of the modified body.
>> I tried to do replace_body_all before and after rtpengine_offer, but it
>> doesn't work, the second leg always has the original session name.
>>
>> Any advice?
>> Thanks
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips 3.2 and latest github rtpengine

2022-03-23 Thread Alberto
Hi,

I'm trying to change the session name, the s= line, while using rtpengine.

If I remove rtpengine and do replace_body_all("^s=.*$", "s=abczzz"); it
works just fine and I see the new session name in the second leg of the
call.

But when rtpengine_offer is called, the original sdp body is used instead
of the modified body.
I tried to do replace_body_all before and after rtpengine_offer, but it
doesn't work, the second leg always has the original session name.

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


Re: [OpenSIPS-Users] Python functions

2022-03-23 Thread Alberto
Hi,
3.2
Sorry for not mentioning it earlier

On Wed, 23 Mar 2022, 08:22 Răzvan Crainea,  wrote:

> What OpenSIPS version are you using?
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 3/22/22 01:41, Alberto wrote:
> > Hi lads and ladies,
> > I'm working on a python script called via python_exec, but I can't see
> > any function to do debug logs, except LM_ERR.
> >
> > I tried
> > msg.call_function('log', str("test"))
> > or
> > msg.call_function('xlog', str("test"))
> >
> > but I always get this error:
> > ERROR:python:opensips_LM_ERR: 37, SystemError,  > of 'OpenSIPS.msg' objects> returned a result with an error set
> >
> > How should this be done?
> >
> > Thanks
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Python functions

2022-03-21 Thread Alberto
Hi lads and ladies,
I'm working on a python script called via python_exec, but I can't see any
function to do debug logs, except LM_ERR.

I tried
msg.call_function('log', str("test"))
or
msg.call_function('xlog', str("test"))

but I always get this error:
ERROR:python:opensips_LM_ERR: 37, SystemError,  returned a result with an error set

How should this be done?

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


[OpenSIPS-Users] mid_registrar and webrtc with asterisk

2022-02-22 Thread Alberto
Hi,

I'm back again, I'm trying to get mid_registrar to work with webrtc, but
when I use the piece of configuration below asterisk replies with 404.
I think it's because asterisk expects the url to be "wss://
10.0.0.153:8188/ws"
But where do I configure such a url in opensips??
Thanks

  if (is_method("REGISTER")) {
mid_registrar_save("location", "p0v");
switch ($retcode) {
  case 1:
#$du = "sips:10.0.0.153:5061;transport=tls";
#$ru = "sip:10.0.0.153:5061";
$du = "sips:10.0.0.153:8188;transport=wss";
$ru = "sip:10.0.0.153:8188";
$fs = NULL;
route(relay);
break;
  case 2:
xlog("L_INFO", "Absorb REGISTER!\n");
break;
  default:
xlog("L_INFO", "Failed to save registration!\n");
break;
}

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


Re: [OpenSIPS-Users] registrar and mid_registrar modules

2022-02-14 Thread Alberto
Thanks, I was trying to use the lookup function, overlooked completely
is_registered.
Note to self: RTFM!!!

On Mon, 14 Feb 2022 at 07:10, Bogdan-Andrei Iancu 
wrote:

> Hi Alberto,
>
> I have to admit you lost me somewhere on the way with what you want to do.
> But focusing on your final question "But when the uac starts a call, how do
> I validate the uac was previously registered?", the answer is
> https://opensips.org/html/docs/modules/3.2.x/registrar.html#func_is_registered
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp
>   https://www.opensips.org/Training/Bootcamp
>
> On 2/10/22 9:04 PM, Alberto wrote:
>
> Hi,
>
> I followed pretty much the available tutorials for mid_registrar, but I
> can't figure out something:
>
> I have:
>
> loadmodule "registrar.so"
> modparam("registrar", "attr_avp", "$avp(avp_json)")
> modparam("registrar", "max_contacts", 1)
> modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")
>
> loadmodule "mid_registrar.so"
> modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
> modparam("mid_registrar", "max_contacts", 1)
> modparam("mid_registrar", "mode", 0)
> modparam("mid_registrar", "tcp_persistent_flag",
> "TCP_PERSIST_REGISTRATIONS")
>
> and then:
>
>   if (is_method("REGISTER")) {
> $json(x) := "{}";
>
> python_exec("fn_lookup_account", "$rd|$socket_in(proto)");
>
> $avp(avp_json) = $json_compact(x);
> mid_registrar_save("location");
> switch ($retcode) {
>   case 1:
> $du = $json(x/remote_dest);
> $ru = $json(x/remote_uri);
> route(relay);
> break;
>   case 2:
> xlog("L_INFO", "Absorb REGISTER!\n");
> break;
>   default:
> xlog("L_INFO", "Failed to save registration!\n");
> break;
> }
>
> exit;
>   }
>
>
> I do this because I want to store some configuration in the attr column
> that I don't want to retrieve every call.
>
> However, the mid_registrar example then continues with
> mid_registrar_lookup, and that works fine for calls originating from the
> main registrar going to the uac.
> But when the uac starts a call, how do I validate the uac was previously
> registered?
>
> I tried with this below, but lookup doesn't work in this scenario.
>
> if (mid_registrar_lookup("location")) {
>   $json(x) := $avp(avp_json);
>   xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found
> mid_registrar_lookup from $si:$sp to $ru\n");
> } else if (lookup("location")) {
>   $json(x) := $avp(avp_json);
>   xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found lookup from
> $si:$sp to $ru\n");
> } else {
>   t_reply(404, "Not Found");
>   exit;
> }
>
>
> Thanks
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] registrar and mid_registrar modules

2022-02-10 Thread Alberto
Hi,

I followed pretty much the available tutorials for mid_registrar, but I
can't figure out something:

I have:

loadmodule "registrar.so"
modparam("registrar", "attr_avp", "$avp(avp_json)")
modparam("registrar", "max_contacts", 1)
modparam("registrar", "tcp_persistent_flag", "TCP_PERSIST_DURATION")

loadmodule "mid_registrar.so"
modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")

and then:

  if (is_method("REGISTER")) {
$json(x) := "{}";

python_exec("fn_lookup_account", "$rd|$socket_in(proto)");

$avp(avp_json) = $json_compact(x);
mid_registrar_save("location");
switch ($retcode) {
  case 1:
$du = $json(x/remote_dest);
$ru = $json(x/remote_uri);
route(relay);
break;
  case 2:
xlog("L_INFO", "Absorb REGISTER!\n");
break;
  default:
xlog("L_INFO", "Failed to save registration!\n");
break;
}

exit;
  }


I do this because I want to store some configuration in the attr column
that I don't want to retrieve every call.

However, the mid_registrar example then continues with
mid_registrar_lookup, and that works fine for calls originating from the
main registrar going to the uac.
But when the uac starts a call, how do I validate the uac was previously
registered?

I tried with this below, but lookup doesn't work in this scenario.

if (mid_registrar_lookup("location")) {
  $json(x) := $avp(avp_json);
  xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found
mid_registrar_lookup from $si:$sp to $ru\n");
} else if (lookup("location")) {
  $json(x) := $avp(avp_json);
  xlog("L_INFO", "$C(cs)$cfg_file:$cfg_line$C(xx) [$rm] Found lookup from
$si:$sp to $ru\n");
} else {
  t_reply(404, "Not Found");
  exit;
}


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


Re: [OpenSIPS-Users] mid_registrar TLS

2022-02-10 Thread Alberto
I was confused because I use a wildcard cert, so I only have one cert for
server/client and any possible subdomain. I don't need to match
server/client requests to different certs.
So I ended up with this config and it seems to work fine.
Thanks

loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "wolfssl")

modparam("tls_mgm", "server_domain", "sd_1")
modparam("tls_mgm", "ca_list", "[sd_1]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[sd_1]/etc/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[sd_1]/etc/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[sd_1]0")
modparam("tls_mgm", "tls_method", "[sd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[sd_1]0")
modparam("tls_mgm", "match_sip_domain", "[sd_1]*")
modparam("tls_mgm", "match_ip_address", "[sd_1]*")

modparam("tls_mgm", "client_domain", "cd_1")
modparam("tls_mgm", "ca_list", "[cd_1]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[cd_1]/etc/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[cd_1]/etc/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[cd_1]0")
modparam("tls_mgm", "tls_method", "[cd_1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[cd_1]0")
modparam("tls_mgm", "match_sip_domain", "[cd_1]*")
modparam("tls_mgm", "match_ip_address", "[cd_1]*")


On Thu, 10 Feb 2022 at 07:59, Bogdan-Andrei Iancu 
wrote:

> Hi Alberto,
>
> When OpenSIPS is about the create a new TLS connection, it has to know
> what TSL certificate (client) to use for it.
>
> There are 2 way of indicating that :
>
> * use "match_ip_address" [1] to map the TLS client domain to some IPs you
> want to connect to via TLS
>
> * use "client_tls_domain_avp" [2] to manually select from script which TLS
> domain to be used - set the AVP before the t_relay() to the TLS destination.
>
>
> [1]
> https://opensips.org/html/docs/modules/3.2.x/tls_mgm.html#param_match_ip_address
>
> [2]
> https://opensips.org/html/docs/modules/3.2.x/tls_mgm.html#param_client_tls_domain_avp
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp
>   https://www.opensips.org/Training/Bootcamp
>
> On 2/4/22 2:40 PM, Alberto wrote:
>
> Hi,
> I have a sip client connecting to opensips using tls, all requests are
> then routed to an asterisk server using mid_registrar.
>
> UDP to UDP and TCP to TCP work fine, but TLS doesn't.
>
> This is the error, but I'm having a hard time understanding it.
>
> Feb  4 12:29:32 [3406] //etc/opensips/opensips.cfg:453 Forward REGISTER
> for sip:tls-1001@10.0.0.252:5061 to 10.0.0.153:5061;transport=tls
> Feb  4 12:29:32 [3406] ERROR:proto_tls:proto_tls_conn_init: no TLS client
> domain found
> Feb  4 12:29:32 [3406] ERROR:core:tcp_conn_create: failed to do proto 3
> specific init for conn 0x7ff9be1810f8
> Feb  4 12:29:32 [3406] ERROR:core:tcp_async_connect: tcp_conn_create
> failed, closing the socket
> Feb  4 12:29:32 [3406] ERROR:proto_tls:proto_tls_send: async TCP connect
> failed
> Feb  4 12:29:32 [3406] ERROR:tm:msg_send: send() to 10.0.0.153:5061 for
> proto tls/3 failed
> Feb  4 12:29:32 [3406] ERROR:tm:t_forward_nonack: sending request failed
> Feb  4 12:29:32 [3406] ERROR:tm:w_t_relay: t_forward_nonack failed
>
>
> My configuration:
> #
> loadmodule "mid_registrar.so"
> modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
> modparam("mid_registrar", "max_contacts", 1)
> modparam("mid_registrar", "mode", 0)
> modparam("mid_registrar", "tcp_persistent_flag",
> "TCP_PERSIST_REGISTRATIONS")
>
> loadmodule "tls_mgm.so"
> modparam("tls_mgm", "tls_library", "wolfssl")
> modparam("tls_mgm", "server_domain", "dom1")
> modparam("tls_mgm", "ca_list", "[dom1]/etc/letsencrypt/fullchain.pem")
> modparam("tls_mgm", "certificate", "[dom1]/etc/letsencrypt/cert.pem")
> modparam("tls_mgm", "private_key", "[dom1]/etc/letsencrypt/privkey.pem")
> modparam("tls_mgm", "require_cert", "[dom1]0")
> modparam("tls_mgm", "tls_method", "[dom1]TLSv1-")
> modparam("tls_mgm", "verify_cert", "[dom1]0")
>
> loadmodule "proto_tls.so"
>
> ###
> $ru = "sip:10.0.0.153:5061;transport=tls";
> setflag("TCP_PERSISTENT");
> route(relay);
>
>
> Thanks
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] mid_registrar TLS

2022-02-04 Thread Alberto
Hi,
I have a sip client connecting to opensips using tls, all requests are then
routed to an asterisk server using mid_registrar.

UDP to UDP and TCP to TCP work fine, but TLS doesn't.

This is the error, but I'm having a hard time understanding it.

Feb  4 12:29:32 [3406] //etc/opensips/opensips.cfg:453 Forward REGISTER for
sip:tls-1001@10.0.0.252:5061 to 10.0.0.153:5061;transport=tls
Feb  4 12:29:32 [3406] ERROR:proto_tls:proto_tls_conn_init: no TLS client
domain found
Feb  4 12:29:32 [3406] ERROR:core:tcp_conn_create: failed to do proto 3
specific init for conn 0x7ff9be1810f8
Feb  4 12:29:32 [3406] ERROR:core:tcp_async_connect: tcp_conn_create
failed, closing the socket
Feb  4 12:29:32 [3406] ERROR:proto_tls:proto_tls_send: async TCP connect
failed
Feb  4 12:29:32 [3406] ERROR:tm:msg_send: send() to 10.0.0.153:5061 for
proto tls/3 failed
Feb  4 12:29:32 [3406] ERROR:tm:t_forward_nonack: sending request failed
Feb  4 12:29:32 [3406] ERROR:tm:w_t_relay: t_forward_nonack failed


My configuration:
#
loadmodule "mid_registrar.so"
modparam("mid_registrar", "attr_avp", "$avp(avp_json)")
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "mode", 0)
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")

loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "wolfssl")
modparam("tls_mgm", "server_domain", "dom1")
modparam("tls_mgm", "ca_list", "[dom1]/etc/letsencrypt/fullchain.pem")
modparam("tls_mgm", "certificate", "[dom1]/etc/letsencrypt/cert.pem")
modparam("tls_mgm", "private_key", "[dom1]/etc/letsencrypt/privkey.pem")
modparam("tls_mgm", "require_cert", "[dom1]0")
modparam("tls_mgm", "tls_method", "[dom1]TLSv1-")
modparam("tls_mgm", "verify_cert", "[dom1]0")

loadmodule "proto_tls.so"

###
$ru = "sip:10.0.0.153:5061;transport=tls";
setflag("TCP_PERSISTENT");
route(relay);


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


Re: [OpenSIPS-Users] Central database

2022-01-18 Thread Alberto
Hi,

Thanks, I was playing around with the clusterer module, but I can't quite
figure something out.

In the database I have this entry in the clusterer table:
id: 1
cluster_id: 1
node_id: 1
url: bin:10.0.0.184:
state: 1
no_ping_retries: 3
priority: 50
sip_addr: 10.0.0.184
flags: seed

And here's my configuration:

loadmodule "clusterer.so"
modparam("clusterer", "db_url", "unixodbc://opensips:opensipsrw@localhost
/opensips")
modparam("clusterer", "my_node_id", 1)

loadmodule "dialog.so"
modparam("dialog", "default_timeout", 14400) # 4 hours
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_stats", 0)
modparam("dialog", "profiles_with_value", "caller")
modparam("dialog", "cachedb_url", "mongodb://db.dialog")
modparam("dialog", "dialog_replication_cluster", 1)

loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "cachedb_url", "mongodb://db.usrloc")
modparam("usrloc", "working_mode_preset", "federation-cachedb-cluster")
modparam("usrloc", "location_cluster", 1)


Now when a user registers, the usrloc collection in mongodb gets populated
with some details.
But when I start a call instead, the dialog collection stays empty. What do
I need to do to write the dialogs?
I'm testing with only one opensips server for now, so that's the only entry
in the clusterer table.
Thanks.

On Tue, 18 Jan 2022 at 12:50, Bogdan-Andrei Iancu 
wrote:

> Hi Aberto,
>
> It is not a good strategy to blindly share the tables for usrloc or dialog
> between multiple opensips instances, as this will lead to data conflicts.
> Of course, you can have all pointing to the same DB, but one table per
> opensips server.
>
> If you want to aggregate the data (between all opensips instances), there
> is no other way than using the clustering .
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 1/16/22 1:47 PM, Alberto wrote:
>
> Hi,
> I need several opensips servers to save usrloc and dialog to the same
> central database, not for clustering/ha, but for reporting and billing.
> Is it safe to point multiple usrloc and dialog modules to a central
> database using the db_url? Or would they cause conflicts?
> Since it's not a cluster where they use the shared information, I would
> prefer to avoid the complexity of the clusterer module. But I need to know
> one server won't cancel another server location or dialog.
> Thanks
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Python and avp

2022-01-17 Thread Alberto
Hi,

I'm using opensips 3.4 and I'm looking to set avp variables from a python
script, looking at https://github.com/OpenSIPS/opensips/issues/1893 seems
this feature was available from after 3.0.
Is there any documentation on how to do it?

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


[OpenSIPS-Users] Central database

2022-01-16 Thread Alberto
Hi,
I need several opensips servers to save usrloc and dialog to the same
central database, not for clustering/ha, but for reporting and billing.
Is it safe to point multiple usrloc and dialog modules to a central
database using the db_url? Or would they cause conflicts?
Since it's not a cluster where they use the shared information, I would
prefer to avoid the complexity of the clusterer module. But I need to know
one server won't cancel another server location or dialog.
Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Alberto
I'll do that.
Thanks

On Tue, 11 Jan 2022, 12:42 Liviu Chircu,  wrote:

> On 11.01.2022 11:50, Alberto wrote:
>
>
> How do I insert values in the kv_store column?
> It's easy to use the attr_avp, but I need to store a couple more values
> upon registrations and the key-value storage would be the perfect solution.
>
> Hello, Alberto!
>
> The "kv_store" column is for internal purposes, hence there is no way to
> READ or WRITE values to it from the opensips.cfg script.
>
> Regarding attr_avp[1]: why not store your data in JSON format (perhaps
> using the $json_compact[2]) variable?  This way, you can give it
> structure, using as many nesting levels as necessary in order to fit all of
> it.
>
> [1]: https://opensips.org/docs/modules/3.3.x/registrar.html#param_attr_avp
> [2]: https://opensips.org/docs/modules/3.3.x/json.html#pv_json_compact
>
> Best Regards,
>
> --
> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Alberto
Hi,

I'm testing some features I want to implement, my usrloc and registrar
configuration look like this:

loadmodule "usrloc.so"
modparam("usrloc", "db_url", "unixodbc://opensips:opensipsrw@localhost
/opensips")
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "working_mode_preset",
"single-instance-sql-write-through")

loadmodule "registrar.so"
modparam("registrar", "attr_avp", "$avp(finloc)")
modparam("registrar", "max_contacts", 1)

How do I insert values in the kv_store column?
It's easy to use the attr_avp, but I need to store a couple more values
upon registrations and the key-value storage would be the perfect solution.

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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Alberto Gonzales
lunch time here, gracias khalil.

On Tue, Jan 24, 2017 at 1:02 PM, Khalil Khamlichi <
khamlichi.kha...@gmail.com> wrote:

> sorry :
>
> # record routing
>record_route();
>
># create dialog with timeout
>if ( !create_dialog("B") ) {
>send_reply("500","Internal Server Error");
>exit;
>}
>
> # apply transformations from dialplan table
>dp_translate("0","$rU/$rU");
>
># route calls based on prefix
>if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
>send_reply("404","No Route found");
>exit;
>}
>
>$acc_extra(gwid)=$avp(gw_id);
>
>t_on_failure("GW_FAILOVER");
>
>do_accounting("db|log","cdr|missed",);
> #NAT
>if (isbflagset(NAT)) setflag(NAT);
> #NAT
> #TOPOHIDE
> toopology_hiding("UC");
> #TOPOHIDE
>route(RELAY);
>
> }
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Alberto Gonzales
I am using dialog in my script,
here is the part of main function

# apply transformations from dialplan table
   dp_translate("0","$rU/$rU");

   # route calls based on prefix
   if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
   send_reply("404","No Route found");
   exit;
   }

   $acc_extra(gwid)=$avp(gw_id);

   t_on_failure("GW_FAILOVER");

   do_accounting("db|log","cdr|missed",);
#NAT
   if (isbflagset(NAT)) setflag(NAT);
#NAT
#TOPOHIDE
toopology_hiding("UC");
#TOPOHIDE
   route(RELAY);

}




On Tue, Jan 24, 2017 at 12:09 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi,
>
> It should be ok, but in your case the TH will not benefit from the dialog
> module (you do not use it) - all the info to he hidden will be appended to
> the Contact hdr (as extra param), while when using the dialog support, this
> info is stored into the dialog.
>
> To be honest, I never tried the combination of nathelper and TH _without_
> dialog support. But give it a try...if you get a trace, I can check if ok.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 01/24/2017 02:03 PM, Alberto Gonzales wrote:
>
> Thanks Bogdan, Well, I have fix_nated_contact() at the very top of my
> script :
>
> route{
>
>force_rport();
>if (nat_uac_test("23")) {
>fix_nated_contact();
>setflag(NAT);
>}
>
>
>if (!mf_process_maxfwd_header("10")) {
>sl_send_reply("483","Too Many Hops");
>exit;
>}
>
> 
> 
> if (has_totag()) {
># sequential request withing a dialog should
># take the path determined by record-routing
> remplazar : if (loose_route()) {
>if (topology_hiding_match()) {
>
> ...
> ...
>   *## esconder topologia antes de pasar la llamada*
>topology_hiding("UC");
>route(RELAY);
> }
>
> so is my script correct ?
> I just want to make sure I have a correct script before I do any further
> work on this.
>
> Thanks.
>
> On Tue, Jan 24, 2017 at 11:52 AM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi,
>>
>> You can do TH with nathelper, BUT be sure to create the dialog + TH AFTER
>> doing the fix_nated_contact().
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01/20/2017 12:42 PM, Alberto Gonzales wrote:
>>
>> We used instruction in the book, which states at the end of the paragraph
>> this :
>> Topology hiding limitations
>> You cannot easily combine topology hiding with NAT traversal because both
>> the
>> processes mangle the Contact header. Topology hiding will not hide the
>> address and
>> other information contained in other headers such as the display in the
>> From header.
>> To change the From header, you can use the uac_replace_from() function.
>> I think our problem comes from the fact that we are using nathelper and
>> also an rtpproxy in our script.
>> can anyone provide help about activating topology hiding along with
>> nathelper ?
>> thanks in advance.
>> On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales <
>> albertosgonz...@gmail.com> wrote:
>>>
>>> I forgot to mention that doing this resulted in opensips crashing after
>>> 20 minutes :)
>>> On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales <
>>> albertosgonz...@gmail.com> wrote:
>>>>
>>>> Hello grupo,
>>>> We have configured topology hiding in opensips 2.2 this way :
>>>> please confirm to us this is the only thing we need to do or is there
>>>> anything else that needs to be added.
>>>> route {
>>>> 
>>>> 
>>>> if (has_totag()) {# sequential request withing
>>>> a dialog should# take the path determined by
>>>> record-routing remplazar : if (loose_route()) {
>>>>if (topology_hiding_match()) { ...
>>>> ...
>>>>   *## esconder topologia antes de pasar la llamada*
>>>>topology_hiding("UC");route(RELAY); }
>>>> also what could be a quick test to see if this hiding is working or not.
>>>> thanks in advance.
>>>> Alberto
>>>>
>>> ___
>> 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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
We used instruction in the book, which states at the end of the paragraph
this :

Topology hiding limitations
You cannot easily combine topology hiding with NAT traversal because both
the
processes mangle the Contact header. Topology hiding will not hide the
address and
other information contained in other headers such as the display in the
>From header.
To change the From header, you can use the uac_replace_from() function.

I think our problem comes from the fact that we are using nathelper and
also an rtpproxy in our script.

can anyone provide help about activating topology hiding along with
nathelper ?

thanks in advance.


On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales <
albertosgonz...@gmail.com> wrote:

> I forgot to mention that doing this resulted in opensips crashing after 20
> minutes :)
>
> On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales <
> albertosgonz...@gmail.com> wrote:
>
>> Hello grupo,
>>
>> We have configured topology hiding in opensips 2.2 this way :
>>
>> please confirm to us this is the only thing we need to do or is there
>> anything else that needs to be added.
>>
>> route {
>> 
>> 
>> if (has_totag()) {
>># sequential request withing a dialog should
>># take the path determined by record-routing
>> remplazar : if (loose_route()) {
>>if (topology_hiding_match()) {
>>
>> ...
>> ...
>>   *## esconder topologia antes de pasar la llamada*
>>topology_hiding("UC");
>>route(RELAY);
>> }
>>
>>
>> also what could be a quick test to see if this hiding is working or not.
>>
>> thanks in advance.
>>
>> Alberto
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
I forgot to mention that doing this resulted in opensips crashing after 20
minutes :)

On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales <albertosgonz...@gmail.com
> wrote:

> Hello grupo,
>
> We have configured topology hiding in opensips 2.2 this way :
>
> please confirm to us this is the only thing we need to do or is there
> anything else that needs to be added.
>
> route {
> 
> 
> if (has_totag()) {
># sequential request withing a dialog should
># take the path determined by record-routing
> remplazar : if (loose_route()) {
>if (topology_hiding_match()) {
>
> ...
> ...
>   *## esconder topologia antes de pasar la llamada*
>topology_hiding("UC");
>route(RELAY);
> }
>
>
> also what could be a quick test to see if this hiding is working or not.
>
> thanks in advance.
>
> Alberto
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
Hello grupo,

We have configured topology hiding in opensips 2.2 this way :

please confirm to us this is the only thing we need to do or is there
anything else that needs to be added.

route {


if (has_totag()) {
   # sequential request withing a dialog should
   # take the path determined by record-routing
    remplazar : if (loose_route()) {
   if (topology_hiding_match()) {

...
...
  *## esconder topologia antes de pasar la llamada*
   topology_hiding("UC");
   route(RELAY);
}


also what could be a quick test to see if this hiding is working or not.

thanks in advance.

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


Re: [OpenSIPS-Users] Get concurrent calls from sip server.

2016-07-27 Thread Cesar Alberto Rodriguez Fierro
There was a wrong configuration of the  "dialog.so" module.

I will try to parse the output in order to obtain the current calls.

 Thanks for the help.

On Wed, Jul 27, 2016 at 1:20 PM, Carlos Eduardo <kad...@gmail.com> wrote:

> Cesar,
>
> Are you using the dialog module in your script?
>
> This MI command will only return a valid value if the dialog module is
> loaded (loadmodule "dialog.so") and if the dialogs are criated durign the
> script processing (create_dialog() command).
>
> 2016-07-27 16:12 GMT-03:00 Daniel Zanutti <daniel.zanu...@gmail.com>:
>
>> On my sample, you should run:
>>
>> opensipsctl fifo profile_get_size inbound
>>
>>
>> Using dlg_list you should get something like this:
>> # opensipsctl fifo dlg_list
>> dialog::  hash=84:1411689852
>> state:: 4
>> user_flags:: 0
>> timestart:: 1469646635
>> datestart:: 2016-07-27 16:10:35
>> timeout:: 1469653835
>> dateout:: 2016-07-27 18:10:35
>> ...
>> dialog::  hash=289:324429409
>> state:: 2
>> user_flags:: 0
>> timestart:: 0
>> timeout:: 0
>> ...
>> dialog::  hash=640:1695114669
>> state:: 4
>> ...
>>
>> Check if modules are successfully loaded.
>>
>> Regards
>>
>> On Wed, Jul 27, 2016 at 3:41 PM, Cesar Alberto Rodriguez Fierro <
>> c...@transtelco.net> wrote:
>>
>>>
>>> Thanks for your help.
>>>
>>> I trying to use  FIFO in order to  send requests to OpenSIPS, I have
>>> read some documentation about the  Dialog Module.  I guess using the 
>>> "opensipsctl
>>> fifo dlg_list" command can be useful to obtain the current calls, but I am
>>> not sure why the command is not available in my OpenSIPS version.   When I
>>> execute the command ./opensipsctl fifo version, I am getting the following
>>> information
>>> Server:: OpenSIPS (1.8.2-notls (x86_64/linux)).
>>>
>>>
>>>
>>> On Wed, Jul 27, 2016 at 11:42 AM, Rodrigo Pimenta Carvalho <
>>> pime...@inatel.br> wrote:
>>>
>>>> Now, thinking more about it, I would suggest you to put a SQL query in
>>>> your proprietary software to query the OpenSIPS database directly.
>>>>
>>>> The table dialog will be always updated about current calls.
>>>>
>>>>
>>>> Regards.
>>>>
>>>>
>>>> RODRIGO PIMENTA CARVALHO
>>>> Inatel Competence Center
>>>> Software
>>>> Ph: +55 35 3471 9200 RAMAL 979
>>>>
>>>>
>>>> --
>>>> *De:* users-boun...@lists.opensips.org <
>>>> users-boun...@lists.opensips.org> em nome de Rodrigo Pimenta Carvalho <
>>>> pime...@inatel.br>
>>>> *Enviado:* quarta-feira, 27 de julho de 2016 14:39
>>>> *Para:* users@lists.opensips.org
>>>> *Assunto:* Re: [OpenSIPS-Users] Get concurrent calls from sip server.
>>>>
>>>>
>>>> With FIFO you can send requests to OpenSIPS, for example from a
>>>> proprietary software. So, if a request wants to execute a query with
>>>> avpops, I guess FIFO will be useful.
>>>>
>>>>
>>>> Regards.
>>>>
>>>>
>>>>
>>>> RODRIGO PIMENTA CARVALHO
>>>> Inatel Competence Center
>>>> Software
>>>> Ph: +55 35 3471 9200 RAMAL 979
>>>>
>>>>
>>>> --
>>>> *De:* users-boun...@lists.opensips.org <
>>>> users-boun...@lists.opensips.org> em nome de Cesar Alberto Rodriguez
>>>> Fierro <c...@transtelco.net>
>>>> *Enviado:* quarta-feira, 27 de julho de 2016 14:29
>>>> *Para:* users@lists.opensips.org
>>>> *Assunto:* [OpenSIPS-Users] Get concurrent calls from sip server.
>>>>
>>>> Hi !
>>>>
>>>> I am currently working in a project related with display in real time
>>>> the active calls of our VoIP traffic, I would like to get the active
>>>> sip-calls from a Kamailio Sip Server (running opensips), is there any way
>>>> to obtain this information.
>>>>
>>>> Best Regards.
>>>>
>>>>
>>>>
>>>>
>>>> [image: Inline image 1] |Cesar Rodriguez | VoiceOPS  | MX: +52
>>>> 656-257-4112 |
>>>>

Re: [OpenSIPS-Users] Get concurrent calls from sip server.

2016-07-27 Thread Cesar Alberto Rodriguez Fierro
Thanks for your help.

I trying to use  FIFO in order to  send requests to OpenSIPS, I have read
some documentation about the  Dialog Module.  I guess using the "opensipsctl
fifo dlg_list" command can be useful to obtain the current calls, but I am
not sure why the command is not available in my OpenSIPS version.   When I
execute the command ./opensipsctl fifo version, I am getting the following
information
Server:: OpenSIPS (1.8.2-notls (x86_64/linux)).



On Wed, Jul 27, 2016 at 11:42 AM, Rodrigo Pimenta Carvalho <
pime...@inatel.br> wrote:

> Now, thinking more about it, I would suggest you to put a SQL query in
> your proprietary software to query the OpenSIPS database directly.
>
> The table dialog will be always updated about current calls.
>
>
> Regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
>
> --
> *De:* users-boun...@lists.opensips.org <users-boun...@lists.opensips.org>
> em nome de Rodrigo Pimenta Carvalho <pime...@inatel.br>
> *Enviado:* quarta-feira, 27 de julho de 2016 14:39
> *Para:* users@lists.opensips.org
> *Assunto:* Re: [OpenSIPS-Users] Get concurrent calls from sip server.
>
>
> With FIFO you can send requests to OpenSIPS, for example from a
> proprietary software. So, if a request wants to execute a query with
> avpops, I guess FIFO will be useful.
>
>
> Regards.
>
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
>
> --
> *De:* users-boun...@lists.opensips.org <users-boun...@lists.opensips.org>
> em nome de Cesar Alberto Rodriguez Fierro <c...@transtelco.net>
> *Enviado:* quarta-feira, 27 de julho de 2016 14:29
> *Para:* users@lists.opensips.org
> *Assunto:* [OpenSIPS-Users] Get concurrent calls from sip server.
>
> Hi !
>
> I am currently working in a project related with display in real time the
> active calls of our VoIP traffic, I would like to get the active sip-calls
> from a Kamailio Sip Server (running opensips), is there any way to obtain
> this information.
>
> Best Regards.
>
>
>
>
> [image: Inline image 1] |Cesar Rodriguez | VoiceOPS  | MX: +52
> 656-257-4112 |
>
> CONFIDENTIALITY NOTICE:  This communication is intended only for the use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, confidential, and exempt from disclosure
> under applicable law.  If you are not the intended recipient of this
> information, you are notified that any use, dissemination, distribution, or
> copying of the communication is strictly prohibited.
>
> ___
> 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] Get concurrent calls from sip server.

2016-07-27 Thread Cesar Alberto Rodriguez Fierro
Hi !

I am currently working in a project related with display in real time the
active calls of our VoIP traffic, I would like to get the active sip-calls
from a Kamailio Sip Server (running opensips), is there any way to obtain
this information.

Best Regards.




[image: Inline image 1] |Cesar Rodriguez | VoiceOPS  | MX: +52 656-257-4112
 |

CONFIDENTIALITY NOTICE:  This communication is intended only for the use of
the individual or entity to which it is addressed and may contain
information that is privileged, confidential, and exempt from disclosure
under applicable law.  If you are not the intended recipient of this
information, you are notified that any use, dissemination, distribution, or
copying of the communication is strictly prohibited.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] OpenSips and Ekiga

2013-06-03 Thread Alberto Ayala
Hello subscribers

I'm trying to integrate OpenSips and Ekiga

I was able to install using EPEL packages in a CentOS 5.x machine

opensips mysql is working. (I create two users for testing purpouse)

when I login to the server using ekiga (sip server I see my status as
register)

and when I try to call I get in the log resource busy:

May 30 10:37:30 localhost /usr/sbin/opensips[2797]: ACC: call missed:
timestamp=1369935450;method=INVITE;from_tag=981a3e3c-080a-1910-909d-08002700c8d5;to_tag=d20e3a3c-080a-1910-8dd7-005056c1;call_id=981a3e3c-080a-1910-909e-08002700c8d5@bluebox;code=487;reason=Request
Terminated
May 30 10:42:20 localhost /usr/sbin/opensips[5148]: ACC: call missed:
timestamp=1369935740;method=INVITE;from_tag=4a45ef3d-080a-1910-8dda-005056c1;to_tag=e173f33d-080a-1910-90af-08002700c8d5;call_id=ae45ef3d-080a-1910-8dda-005056c1@fei-pc;code=487;reason=Request
Terminated
May 30 10:58:35 localhost /usr/sbin/opensips[5147]: ACC: call missed:
timestamp=1369936715;method=INVITE;from_tag=f697b243-080a-1910-9351-08002700c8d5;to_tag=;call_id=f697b243-080a-1910-9352-08002700c8d5@bluebox;code=487;reason=Request
Terminated
May 30 10:59:24 localhost /usr/sbin/opensips[5150]: ACC: call missed:
timestamp=1369936764;method=INVITE;from_tag=647d1944-080a-1910-9355-08002700c8d5;to_tag=;call_id=967d1944-080a-1910-9355-08002700c8d5@bluebox;code=487;reason=Request
Terminated
May 30 11:03:36 localhost /usr/sbin/opensips[5150]: ACC: call missed:
timestamp=1369937016;method=INVITE;from_tag=18a19c45-080a-1910-999a-08002700c8d5;to_tag=09ac9c45-080a-1910-999c-08002700c8d5;call_id=18a19c45-080a-1910-999b-08002700c8d5@bluebox;code=486;reason=Busy
Here
May 30 11:05:17 localhost /usr/sbin/opensips[5149]: ACC: call missed:
timestamp=1369937117;method=INVITE;from_tag=16da3646-080a-1910-99b7-08002700c8d5;to_tag=a8e33646-080a-1910-99b9-08002700c8d5;call_id=16da3646-080a-1910-99b8-08002700c8d5@bluebox;code=486;reason=Busy
Here
May 30 13:38:31 localhost /usr/sbin/opensips[29295]: ACC: call missed:
timestamp=1369946311;method=INVITE;from_tag=d535d47c-080a-1910-9377-08002700c8d5;to_tag=a53dd47c-080a-1910-9379-08002700c8d5;call_id=d535d47c-080a-1910-9378-08002700c8d5@bluebox;code=486;reason=Busy
Here
May 30 13:39:25 localhost /usr/sbin/opensips[29295]: ACC: call missed:
timestamp=1369946365;method=INVITE;from_tag=ecc0277d-080a-1910-9384-08002700c8d5;to_tag=e2ca277d-080a-1910-9385-08002700c8d5;call_id=ecc0277d-080a-1910-9385-08002700c8d5@bluebox;code=486;reason=Busy
Here

any help is going to be appreciated.

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


Re: [OpenSIPS-Users] CallControl - CDRTool : MySQL server has goneaway (2006)

2009-12-04 Thread Alberto Listas
Hi,

I am having this same problem. Has someone found a solution?

Thanks,
Alberto
- Original Message - 
From: Adrian Georgescu a...@ag-projects.com
To: OpenSIPS users mailling list users@lists.opensips.org
Sent: Sunday, October 04, 2009 7:35 AM
Subject: Re: [OpenSIPS-Users] CallControl - CDRTool : MySQL server has 
goneaway (2006)


 Hi Carlo,

 I am aware of this problem. To my dispair I could not find what is
 causing for it.

 I have already captured both errors 2006 and 2013 at the lowest level
 possible in PHP code (in phplib/db_mysql.inc) where when such error
 code is detected a new connection to mysql server is initiated. This
 problem seems to bypass these checks altogether though if you follow
 through the code it would be logically impossible. As this happens
 only on particular systems while on others it does not, I suspect the
 cause is related to a particular version of mysql C client library or
 a combination of particular client and server versions.

 So I am looking for hints myself for how to solve this nasty issue.

 --
 Adrian





 On Oct 2, 2009, at 10:58 AM, Carlo Dimaggio wrote:


 Il giorno 24/lug/09, alle ore 15:02, Adrian Georgescu ha scritto:

 If you lower the mysql connection timeout to a a few minutes you will
 see in syslog that the software is able to reconnect correctly in
 case
 of 2006 or 2013.

 But I have seen this myself too, randomly it fails and though the
 error code is intercepted in mysql connection library used by cdrtool
 (in db_mysql.inc) sometimes it still does not work as expected and
 could not trace the reason how it can do this. Maybe you can inspect
 that code add some debugging statements to it and find the culprit.

 Hi Adrian,

 I took your mail of last july because I'm experiencing with the same
 problems.
 After the mysql timeout (8 hours), cdrtool doesn't reconnect to mysql:
 Database error for query 'select * from prepaid where account = 
 '1...@sip.xxx.it
 '': MySQL server has gone away (2006), link_id =Resource id #53,
 query_id = 

 I think is useful to tell you that I hadn't these problems with an
 ubuntu 8.04 installation (now I have a lenny 64bit)... There could be
 something in this last installation (like some parameters in mysql
 config?)

 Do you have hints for this?

 Thanks and regards,
 Carlo Dimaggio

 ___
 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






No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.14.3/2412 - Release Date: 10/03/09 
18:34:00


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


[OpenSIPS-Users] Opensips AAA / Radius Question

2009-11-21 Thread Alberto Listas
Hi,

I am having difficulty setting up acc with radiusclient-ng and a freeradius 
server to use CDRTool.
Opensips sends 3 records: 1 Start, 1 CallStart and 1 CallStop, the same that
it does with DB backend.

The problem is that Radius doesn't accept the last 2 because it only expects
one record per Session-Id.

So in the Opensips I get:

Nov 21 12:32:37 x4 /sbin/opensips[3931]: rc_send_server: no reply from RADIUS 
server :1813
Nov 21 12:32:37 x4 /sbin/opensips[3931]: ERROR:acc:acc_aaa_request: Radius 
accounting request failed for status: 'Start' Call-Id: 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.'
Nov 21 12:33:38 x4 /sbin/opensips[3932]: rc_send_server: no reply from RADIUS 
server :1813
Nov 21 12:33:38 x4 /sbin/opensips[3932]: ERROR:acc:acc_aaa_request: Radius 
accounting request failed for status: 'Stop' Call-Id: 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.'
Nov 21 12:33:38 x4 media-dispatcher[1243]: error: failed to send radius 
accounting record:

And in the FreeRadius I get:

Sat Nov 21 12:32:17 2009 : Error: rlm_sql (sql): Couldn't insert SQL accounting 
START record - Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_ id'
Sat Nov 21 12:32:17 2009 : Error: rlm_sql_mysql: Cannot store result
Sat Nov 21 12:32:17 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id''
Sat Nov 21 12:32:27 2009 : Error: rlm_sql (sql): Couldn't insert SQL accounting 
START record - Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id'
Sat Nov 21 12:32:27 2009 : Error: rlm_sql_mysql: Cannot store result
Sat Nov 21 12:32:27 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id''

Am I doing something wrong or is this the right behavior?

Thanks,

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


Re: [OpenSIPS-Users] (Solved) Opensips AAA / Radius Question

2009-11-21 Thread Alberto Listas
Hi,

Configuration in the proxy in Freeradius was causing multiple instances of 
radius in the server.
The first one accepted the message but the other returned the message to 
radiusclient-ng
so it looked as if rasdiusclient-ng was actually sending several messages went 
it was only 
sending one message but getting multiple replies.

Just to document in case someone does this by mistake.

Thanks,

Alberto
  - Original Message - 
  From: Alberto Listas 
  To: users 
  Sent: Saturday, November 21, 2009 11:21 AM
  Subject: [OpenSIPS-Users] Opensips AAA / Radius Question


  Hi,

  I am having difficulty setting up acc with radiusclient-ng and a freeradius 
server to use CDRTool.
  Opensips sends 3 records: 1 Start, 1 CallStart and 1 CallStop, the same that
  it does with DB backend.

  The problem is that Radius doesn't accept the last 2 because it only expects
  one record per Session-Id.

  So in the Opensips I get:

  Nov 21 12:32:37 x4 /sbin/opensips[3931]: rc_send_server: no reply from RADIUS 
server :1813
  Nov 21 12:32:37 x4 /sbin/opensips[3931]: ERROR:acc:acc_aaa_request: Radius 
accounting request failed for status: 'Start' Call-Id: 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.'
  Nov 21 12:33:38 x4 /sbin/opensips[3932]: rc_send_server: no reply from RADIUS 
server :1813
  Nov 21 12:33:38 x4 /sbin/opensips[3932]: ERROR:acc:acc_aaa_request: Radius 
accounting request failed for status: 'Stop' Call-Id: 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.'
  Nov 21 12:33:38 x4 media-dispatcher[1243]: error: failed to send radius 
accounting record:

  And in the FreeRadius I get:

  Sat Nov 21 12:32:17 2009 : Error: rlm_sql (sql): Couldn't insert SQL 
accounting START record - Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_ id'
  Sat Nov 21 12:32:17 2009 : Error: rlm_sql_mysql: Cannot store result
  Sat Nov 21 12:32:17 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id''
  Sat Nov 21 12:32:27 2009 : Error: rlm_sql (sql): Couldn't insert SQL 
accounting START record - Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id'
  Sat Nov 21 12:32:27 2009 : Error: rlm_sql_mysql: Cannot store result
  Sat Nov 21 12:32:27 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'ZDVjNmFiZjU5NzA3MWQ4N2E3MWI2MjhiYmE1NmY1N2M.-as2080e7aa-f5066f05' for key 
'sess_id''

  Am I doing something wrong or is this the right behavior?

  Thanks,

  Alberto



--


  ___
  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] CDRTool/Radius Problem

2009-11-20 Thread Alberto Listas
Hi Laszlo,

It was a problem with the dictionaries! Thanks for the suggestion.
I also fixed an error in the config for the new aaa_radius, and now
I get the records in the Radius/CDRTool . But a strange thing happens
when I look at the radius.log I get between 3 and 100 times these repeated
messages:

Fri Nov 20 18:14:31 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'NWFiYTY4NWVmYWZlNjc4OTYyNWMxZWMwZWZlZjIwYWI.-7f47744f-as27abee74' for key$
Fri Nov 20 18:14:31 2009 : Error: rlm_sql (sql): Couldn't insert SQL accounting 
START record - Duplicate entry 'NWFiYTY4NWVmYWZlNjc4OTYyNWMxZWMwZWZlZjIw$
Fri Nov 20 18:14:31 2009 : Error: rlm_sql_mysql: Cannot store result

And this increments the KBIn and KBOut in CDRTool
It looks like the radiusclient-ng is sending the same record more
than 100 times !!! I am going to post this as another issue.

Thanks,

Alberto


  - Original Message - 
  From: Laszlo 
  To: OpenSIPS users mailling list 
  Sent: Thursday, November 19, 2009 7:19 PM
  Subject: Re: [OpenSIPS-Users] CDRTool/Radius Problem


  Hi Alberto,


  2009/11/19 Alberto Listas lis...@b2br.net

Hi,

I am installing Opensips v 1.6.0, MediaProxy v 2.3.9 and CDRTool v 6.9.9 on 
a test system.
When a call finishes I get an error in the Opensips log:

Nov 19 20:37:58 os4 media-dispatcher[9116]: error: failed to send radius 
accounting record: 'Sip-From-Tag'

And Nothing gets added to the CDRTool or Radius Database. In the old 
versions I got error
from /sbin/opensips when radius had trouble not from media-dispatcher. I 
know Radius
is working  because I can telnet in to the radius server. I get no errors 
in the CDRTool/Radius
Server log.

Does anyone have a suggestion?

Thanks,

Alberto



  Looks like a problem with the radius dictionaries.


  -Laszlo



--


  ___
  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] Radius repeats the record to CDRTool/Radius

2009-11-20 Thread Alberto Listas
Hi All,

When I make a call opensips sends the radius info to freeradius without any 
indication of error.
But a strange thing happens, when I look at the radius.log in the freeradius 
server
I get between 2 and 100 times these repeated messages:

Fri Nov 20 18:14:31 2009 : Error: rlm_sql_mysql: MySQL error 'Duplicate entry 
'NWFiYTY4NWVmYWZlNjc4OTYyNWMxZWMwZWZlZjIwYWI.-7f47744f-as27abee74' for key$
Fri Nov 20 18:14:31 2009 : Error: rlm_sql (sql): Couldn't insert SQL accounting 
START record - Duplicate entry 'NWFiYTY4NWVmYWZlNjc4OTYyNWMxZWMwZWZlZjIw$
Fri Nov 20 18:14:31 2009 : Error: rlm_sql_mysql: Cannot store result

And this increments the KBIn and KBOut in CDRTool
It looks like the radiusclient-ng is sending the same record sometimes more 
than 100 times !!! 

Does anyone have a suggestion?

Thanks,

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


[OpenSIPS-Users] CDRTool/Radius Problem

2009-11-19 Thread Alberto Listas
Hi,

I am installing Opensips v 1.6.0, MediaProxy v 2.3.9 and CDRTool v 6.9.9 on a 
test system.
When a call finishes I get an error in the Opensips log:

Nov 19 20:37:58 os4 media-dispatcher[9116]: error: failed to send radius 
accounting record: 'Sip-From-Tag'

And Nothing gets added to the CDRTool or Radius Database. In the old versions I 
got error
from /sbin/opensips when radius had trouble not from media-dispatcher. I know 
Radius
is working  because I can telnet in to the radius server. I get no errors in 
the CDRTool/Radius
Server log.

Does anyone have a suggestion?

Thanks,

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


[OpenSIPS-Users] BYE does not work / Opensips stops working

2009-11-10 Thread Alberto Listas
Hello,

I am installing the new 1.6 and getting a strange behavior.
When the call ended on one side the other side does not get disconnected,
and the log shows:

Nov 10 18:40:38 en4 /sbin/opensips[20610]: WARNING:dialog:dlg_onroute: 
unable to find dialog for BYE with route param 'a94.cd4c751'
Nov 10 18:40:39 en4 /sbin/opensips[20609]: WARNING:dialog:dlg_onroute: 
unable to find dialog for BYE with route param 'a94.cd4c751'
Nov 10 18:40:41 en4 /sbin/opensips[20611]: WARNING:dialog:dlg_onroute: 
unable to find dialog for BYE with route param 'a94.cd4c751'
Nov 10 18:40:45 en4 /sbin/opensips[20609]: WARNING:dialog:dlg_onroute: 
unable to find dialog for BYE with route param 'a94.cd4c751'


I did a ngrep and the SIP Route: shows the correct param.
Eventually the Opensips starts not to accept INVITEs or creates a very long 
setup time for INVITEs (20-40s).
I think I am doing something wrong, could someone please check my config 
below.

Thanks,
Alberto

### Global Parameters #

debug=3
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#log_stderror=yes

/* uncomment the next line to disable TCP (default on) */
#disable_tcp=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* uncomment the next line to disable the auto discovery of local aliases
   based on revers DNS on IPs (default on) */
#auto_aliases=no

/* uncomment the following lines to enable TLS support  (default off) */
#disable_tls = no
#listen = tls:your_IP:5061
#tls_verify_server = 1
#tls_verify_client = 1
#tls_require_client_certificate = 0
#tls_method = TLSv1
#tls_certificate = /usr/local/etc/opensips/tls/user/user-cert.pem
#tls_private_key = /usr/local/etc/opensips/tls/user/user-privkey.pem
#tls_ca_list = /usr/local/etc/opensips/tls/user/user-calist.pem


port=5060

/* uncomment and configure the following line if you want opensips to
   bind on a specific interface/port/proto (default bind on all available) 
*/
#listen=udp:192.168.1.2:5060


### Modules Section 

#set module path
mpath=//lib/opensips/modules/

/* uncomment next line for MySQL DB support */
loadmodule db_mysql.so
loadmodule signaling.so
loadmodule sl.so
loadmodule tm.so
loadmodule rr.so
loadmodule maxfwd.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule textops.so
loadmodule mi_fifo.so
loadmodule uri.so
loadmodule xlog.so
loadmodule acc.so
loadmodule aaa_radius.so
loadmodule auth.so
loadmodule auth_db.so

#loadmodule alias_db.so

#loadmodule domain.so

#loadmodule presence.so
#loadmodule presence_xml.so

loadmodule dialog.so

#
# - nat_traversal
#**
loadmodule nat_traversal.so
#**
modparam(nat_traversal, keepalive_interval, 90)
modparam(nat_traversal, keepalive_method, OPTIONS)
modparam(nat_traversal, keepalive_from, sip:keepal...@mydomain.com)


#
# -- nathelper
#**
loadmodule nathelper.so
#**
modparam(nathelper, natping_interval, 60)
modparam(nathelper, ping_nated_only, 1)
modparam(nathelper, sipping_bflag, 7)
modparam(nathelper, received_avp, $avp(i:801))
modparam(nathelper, sipping_from, sip:pin...@mydomain.com)

#
#**
loadmodule mediaproxy.so
#**
#--- Default Values
modparam(mediaproxy, mediaproxy_socket, 
/var/run/mediaproxy/dispatcher.sock)
modparam(mediaproxy, mediaproxy_timeout, 500)
modparam(mediaproxy, signaling_ip_avp, $avp(s:nat_ip))
modparam(mediaproxy, media_relay_avp, $avp(s:media_relay))

loadmodule drouting.so
loadmodule permissions.so

# - permissions params -
modparam(permissions, db_url, 
mysql://opensips:opensip...@127.0.0.1/opensips)

loadmodule call_control.so

# - setting module-specific parameters ---


# - mi_fifo params -
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)


# - rr params -
# add value to ;lr param to cope with most of the UAs
modparam(rr, enable_full_lr, 1)
# do not append from tag to the RR (no need for this script)
modparam(rr, append_fromtag, 0)


# - registrar params -
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam(registrar, max_contacts, 10)


# - usrloc params -
#modparam(usrloc, db_mode,   0)
/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam(usrloc, db_mode,   2)
modparam(usrloc, db_url,
 mysql://opensips:opensip...@localhost/opensips)
modparam(usrloc, nat_bflag, 6)


# - uri params -
modparam(uri, use_uri_table, 0)


# - acc params -
/* what sepcial events should be accounted ? */
#modparam(acc, early_media, 1)
#modparam(acc, report_ack, 1)
#modparam(acc, report_cancels, 1)
/* by default ww do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable

[OpenSIPS-Users] CDRTool - Prepaid does not decrement balance

2009-07-31 Thread Alberto Listas
Hi,

I am having a difficulty with prepaid in CDRTool. When I telnet to the server 
and
give the commands manually as below the prepaid balance is decremented
correctly. When I place the call thru Opensips the call is billed (as show 
below too) but the prepaid
balance is not decremented. I did not install Call Control yet because it's not
very important that I stop calls on the fly. Could that be the problem?

Thanks in advance for any suggestions,

Alberto

_
os1:~# telnet os2 9024
Trying XXX.XXX.197.172...
Connected to os2.voip.net.
Escape character is '^]'.
MaxSessionTimecallid=6432622...@1 From=sip:2...@os1.voip.net 
To=sip:005521850222...@xxx.xxx.197.171 Duration=7200 Gateway=XXX.XXX.188.229 
Lock=1
402

ShowPrice From=sip:2...@os1.voip.net 
To=sip:005521850222...@xxx.xxx.197.171 Gateway=XXX.XXX.188.229 Duration=59
0.1300
Duration: 59 s
 App: audio
 Destination: 55218
Customer: subscriber=2...@os1.voip.net
 Connect: 0.
   StartTime: 2009-07-31 17:06:51
--
Span: 1
Duration: 60 s
   Increment: 6
Min duration: 30
   ProfileId: plu / weekday
  RateId: plu / 0-24h
Rate: 0.1300 / 60 s
   Price: 0.1300

DebitBalance  callid=6432622...@1 From=sip:2...@os1.voip.net 
To=sip:005521850222...@xxx.xxx.197.171 Gateway=XXX.XXX.188.229 Duration=59
Ok
MaxSessionTime=0
0.1300
Duration: 59 s
 App: audio
 Destination: 55218
Customer: subscriber=2...@os1.voip.net
 Connect: 0.
   StartTime: 2009-07-31 17:08:15
--
Span: 1
Duration: 60 s
   Increment: 6
Min duration: 30
   ProfileId: plu / weekday
  RateId: plu / 0-24h
Rate: 0.1300 / 60 s
   Price: 0.1300

___

  Id Start time Sip Proxy SIP caller SIP destination Dur Price KBIn KBOut 
Status Codecs 
  1N 2009-07-31 11:27:21 XXX.XXX.197.171 2...@os1.voip.net +552185022233 
(BRAZIL CELL 55218) 00:04 0.0650   Ok (200)  
 Signalling information 
 Click here to show only this call id 
 Call id:  1537464575-5264...@189.4.254.119 
 Click here to see the SIP trace for this call   
 From/to tags:  1685903383/013be01d 
 Start time:  2009-07-31 11:27:21  
 Stop time:  2009-07-31 11:27:25 
 Method: Invite from XXX.XXX.254.119:5264  
 From: 2...@os1.voip.net 
 Domain: os1.voip.net 
 To (dialed URI): 005521850222...@os1.voip.net 
 Canonical URI:  005521850222...@os1.voip.net 
 Next hop URI: 005521850222...@xxx.xxx.195.56 
 Destination:  BRAZIL CELL (55218) 
 Billing Party: 2...@os1.voip.net 
 Reseller: 0 
  Rating information 
 Duration: 4 s
  App: audio
  Destination: 55218
  Customer: subscriber=2...@os1.voip.net
  Connect: 0.
  StartTime: 2009-07-31 16:27:21
  --
  Span: 1
  Duration: 30 s
  Increment: 6
  Min duration: 30
  ProfileId: plu / weekday
  RateId: plu / 0-24h
  Rate: 0.1300 / 60 s
  Price: 0.0650 
   
 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from OpenSips

2009-07-22 Thread Alberto Listas
Hi Dan,

Thanks for the info, the doc/Rating.txt is very good but
sometimes you need previous experience to understand
the details.
 
I was already using the param: 
Source-IP=$avp(s:source_ip);
But I wasn't setting any values so the SourceIP column was blank.
I added a line to the cfg to set the value:
$avp(s:source_ip) = $si;

And now the rating identifies the origin by SourceIP 
when the CallingStationId is in the form 123...@1.1.1.1
(and hence the domain is set to the IP of the source)
but when CallingStationId is in the form 1.1.1.1 (just the IP)
the Domain in the info of the call is blank and the rating does not work.

When the Domain is blank the rating engine use the profile
Customer: al...@example.com from the default Customer
configuration of CDRTool. I suppose this is because this customer
has a blank domain field. But this is an error since it should use
the default profile instead.

Anyway, Thanks for your help, now it can rate by IP.

Cheers,

Alberto

  - Original Message - 
  From: DanB 
  To: Alberto Listas 
  Cc: users@lists.opensips.org 
  Sent: Wednesday, July 22, 2009 4:23 AM
  Subject: Re: [OpenSIPS-Users] CDRTool does not identify by IP origin from 
OpenSips


  Hi Alberto,


  By default CDRTool takes the gateway parameter out of Source IP (nicely 
explained also in the doc/RATING.TXT) and if you don't modify the defaults, out 
of radacct.SourceIP column.


  In order to identify the gateway, you need to enforce that SourceIP inside 
opensips script to whatever IP you want to be used as your gateway.
  Example of params in opensips.cfg:
  modparam(acc, radius_extra,Source-IP=$avp(s:mygtw))


  Another trick you can use is to write your own radius sql query which places 
the SourceIP from another radius attribute received.


  Cheers,
  DanB


  On Tue, Jul 21, 2009 at 9:44 PM, Alberto Listas lis...@b2br.net wrote:

Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give 
this command:

ShowPrice From=sip:005521810...@10.0.0.4 To=sip:00552181000...@10.0.0.1 
Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates 
correctly.

When the call comes from the OpenSips it doesn't identify the customer and 
uses
the default profile:

Start time: 2009-07-21 14:55:24 
Stop time: 2009-07-21 14:55:59
Method:Invite from : 
From:5521083200...@10.0.0.4
Domain:10.0.0.4
To (dialed URI):005521810...@10.0.0.4
Canonical URI: 005521810...@10.0.0.1
Next hop URI:005521810...@10.0.0.2
Destination: BRAZIL CELL (55218)
Billing Party:5521810...@10.0.0.4
Reseller:

Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0. ..

Should I set some different variable to FreeRadius for it to identify the 
GATEWAY?

Thanks,

Alberto

___
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] CDRTool does not identify by IP origin from OpenSips

2009-07-21 Thread Alberto Listas
Hi,

I am having a difficulty with the rating in CDRTool. When I telnet and give 
this command:

ShowPrice From=sip:005521810...@10.0.0.4 To=sip:00552181000...@10.0.0.1 
Gateway=10.0.0.4 Duration=30
(IPs where changed)

The rating engine identifies the customer by the gateway and rates correctly.

When the call comes from the OpenSips it doesn't identify the customer and uses
the default profile:

Start time: 2009-07-21 14:55:24 
Stop time: 2009-07-21 14:55:59
Method:Invite from : 
From:5521083200...@10.0.0.4
Domain:10.0.0.4
To (dialed URI):005521810...@10.0.0.4
Canonical URI: 005521810...@10.0.0.1
Next hop URI:005521810...@10.0.0.2
Destination: BRAZIL CELL (55218)
Billing Party:5521810...@10.0.0.4
Reseller:

Duration: 35 s
App: audio
Destination: 55218
Customer: default
Connect: 0. ..

Should I set some different variable to FreeRadius for it to identify the 
GATEWAY?

Thanks,

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


Re: [OpenSIPS-Users] CDRTool - Rating engine does not rate

2009-07-13 Thread Alberto Listas
I did not see an error in the import. But I also solved the problem
adding a profile for grn_premium.
Thanks,
Alberto
- Original Message - 
From: bay2x1 r...@racequeen.ph
To: users@lists.opensips.org
Sent: Monday, July 13, 2009 2:05 AM
Subject: Re: [OpenSIPS-Users] CDRTool - Rating engine does not rate



 I think the problem is in your profiles table, check if you have a profile
 entry/record for grn_premium .  If you encounter an error while importing
 the sample data for CDRTool (importRatingTables.php) we might have the 
 same
 problem.  I resolve this issue by inserting a record for grn_premium using
 the CDRTool web application (profiles section).



 ASHWINI NAIDU wrote:

 Have you populated all the relavent data needed for CDRTool rating
 Destinations table,customers, prfiles and rates.

 if yes. Delete the entries in Your memcache table and restart ur rating
 engine and try to get search again. I guess this should work.


 On Sat, Jul 11, 2009 at 3:21 AM, Alberto Listas lis...@b2br.net wrote:

 Hi,

 I have installed OpenSips 1.5.1, FreeRadius 2.1.6, CDRTool 6.8.0. The
 calls
 work but they all appear as
 free in CDRTool. I am using the standard customer and rate tables that
 come
 with the
 software. When I telnet to the rating engine and use the example in the
 documentation
 I get the result below:

 ShowPrice From=sip:1...@example.com sip%3a...@example.com To=
 sip:0031650222...@example.com sip%3a0031650222...@example.com
 Gateway=10.0.0.1 Duration=59
 0
 Duration: 59 s
 App: audio
 Destination: 31650
 Customer: domain=example.com
 (And nothing else...)

 I don't get a price and the /var/log/syslog displays this error:

 Jul 10 18:28:49 os2 cdrtool[11392]: Error: Cannot find rates for 
 callid=,
 billing party=...@example.com, customer domain=example.com,
 gateway=10.0.0.1, destination=31650, profile=grn_premium, app=audio

 I don't see the error. There is an entry in customers for the domain
 example.com, there
 is a rate for destination 31650. But the rating engine does find any.

 Anybody has a suggestion???

 Thanks,

 Alberto


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




 -- 
 Thanking You,
 Ashwini BR Naidu

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




 -
 http://opensips.blogspot.com http://opensips.blogspot.com
 -- 
 View this message in context: 
 http://n2.nabble.com/CDRTool---Rating-engine-does-not-rate-tp3241434p3248819.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






No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.375 / Virus Database: 270.13.6/2221 - Release Date: 07/06/09 
17:54:00


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


[OpenSIPS-Users] CDRTool - Rating engine does not rate

2009-07-10 Thread Alberto Listas
Hi,

I have installed OpenSips 1.5.1, FreeRadius 2.1.6, CDRTool 6.8.0. The calls 
work but they all appear as
free in CDRTool. I am using the standard customer and rate tables that come 
with the
software. When I telnet to the rating engine and use the example in the 
documentation
I get the result below:

ShowPrice From=sip:1...@example.com To=sip:0031650222...@example.com 
Gateway=10.0.0.1 Duration=59
0
Duration: 59 s
 App: audio
 Destination: 31650
 Customer: domain=example.com
(And nothing else...)

I don't get a price and the /var/log/syslog displays this error:

Jul 10 18:28:49 os2 cdrtool[11392]: Error: Cannot find rates for callid=, 
billing party=...@example.com, customer domain=example.com, 
gateway=10.0.0.1, destination=31650, profile=grn_premium, app=audio

I don't see the error. There is an entry in customers for the domain 
example.com, there
is a rate for destination 31650. But the rating engine does find any.

Anybody has a suggestion???

Thanks,

Alberto 


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


[OpenSIPS-Users] Mediaproxy 2.3.4 on 1 machine

2009-05-21 Thread Alberto Listas
Hi,

I am trying to install a test system with OpenSIPS
and Mediaproxy to use FreeRadius and CDRTool.
Can 2.3.4 run dispatcher and relay on the same machine?

Thanks,

Alberto

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