Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-30 Thread Bogdan-Andrei Iancu

Hi Denis,

yes, but the errors on failed attempted connections are not related to 
drouting (they are linked to the acc module).


In DR, even before attempting to perform any DB query, there is a log 
about receiving the MI "dr_reload" command - which is only one. Some 
how, I am not convinced that a second dr_reload is actually reaching 
OpenSIPS.


Regards,

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

On 30.09.2016 08:46, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Bogdan!

Yes, in the log i noticed only one dr_reload when the problem appears.
I wanted to show that opensips tries to make many attempts to connect 
to mysql but dr_rules becomes empty.


Next dr_reload had been applied over 9 minutes about.

mailto:denis7...@mail.ru


Hi Denis,

The log you attached shows one single dr_reload command received, 
leading to the load of 198 GWs. After that there are no logs related 
to DR at all.


Regards,
Bogdan
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.09.2016 09:47, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Liviu!

The problem is still active.
In attachment you can see the latest log of the problem.

After the last string mysql connection became correct.

I want to ask, does it make any sense to increase timer parameters for 
mysql connection.
Ok, suppose we have some problem with the server and increasing of 
 timer parameters will help for it, but why does dr_rules becomes 
empty if it has mysql connection problem?



mailto:denis7...@mail.ru


	Correct, Denis - they have nothing to do with each other. I am just 
trying to isolate our problem (by excluding "too many reconnects"), so 
we can better understand what's happening.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2016 15:45, Denis wrote:





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


[OpenSIPS-Users] YUM and APT repositories downtime

2016-09-30 Thread Nick Altmann
Hello everyone!

Sep 30-Oct 01, YUM (yum.opensips.org) and APT (apt.opensips.org)
repositories will be down few times up to an hour because of infrastructure
upgrade.

Sorry for the inconvenience.

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


Re: [OpenSIPS-Users] string modification

2016-09-30 Thread Bogdan-Andrei Iancu

Yes, it is.

Or you can do it shorter:
$rU = $(rU{re.subst,"/-//g"});

Regards

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

On 30.09.2016 13:46, Denis wrote:

Re: [OpenSIPS-Users] string modification Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :


$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete 
some character from some string if i do not know where this character 
will be inside the string?


For example, input string 123-45-67, or 12-345-67, but output string 
should be 1234567.


Thank you.


mailto:denis7...@mail.ru

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



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


Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-30 Thread Bogdan-Andrei Iancu

Hi Denis.

The log you posted covers only 16:21, so I cannot see the 16:29 reload.

Please pot the whole log on a pastebin or dropbox.

Regards,

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

On 30.09.2016 11:57, Denis wrote:
Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Ok, but exactly 
in 16:21 (time you can see in the log) we got the main problem, i.e. 
after dr_reload.


Everything became fine after next dr_reload command has been received
Sep 26 16:29:41 opensips-main 
/usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:dr_reload_cmd: dr_reload MI command received!
Sep 26 16:29:41 opensips-main 
/usr/local/opensips2.2/sbin/opensips[30942]: INFO:drouting:add_dst: 
pgw tree 0x7fd11c20a480




mailto:denis7...@mail.ru


Hi Denis,

yes, but the errors on failed attempted connections are not related to 
drouting (they are linked to the acc module).


In DR, even before attempting to perform any DB query, there is a log 
about receiving the MI "dr_reload" command - which is only one. Some 
how, I am not convinced that a second dr_reload is actually reaching 
OpenSIPS.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 08:46, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Bogdan!

Yes, in the log i noticed only one dr_reload when the problem appears.
I wanted to show that opensips tries to make many attempts to connect 
to mysql but dr_rules becomes empty.


Next dr_reload had been applied over 9 minutes about.

mailto:denis7...@mail.ru


Hi Denis,

The log you attached shows one single dr_reload command received, 
leading to the load of 198 GWs. After that there are no logs related 
to DR at all.


Regards,
Bogdan
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.09.2016 09:47, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Liviu!

The problem is still active.
In attachment you can see the latest log of the problem.

After the last string mysql connection became correct.

I want to ask, does it make any sense to increase timer parameters for 
mysql connection.
Ok, suppose we have some problem with the server and increasing of 
 timer parameters will help for it, but why does dr_rules becomes 
empty if it has mysql connection problem?



mailto:denis7...@mail.ru


	Correct, Denis - they have nothing to do with each other. I am just 
trying to isolate our problem (by excluding "too many reconnects"), so 
we can better understand what's happening.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2016 15:45, Denis wrote:





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


[OpenSIPS-Users] string modification

2016-09-30 Thread Denis
Hello!

I am sorry that it was early, but my question is, how can i delete some 
character from some string if i do not know where this character will be inside 
the string?

For example, input string 123-45-67, or 12-345-67, but output string should be 
1234567.

Thank you.


mailto:denis7...@mail.ru___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Record-Route and Dialog topology_hiding()

2016-09-30 Thread Bogdan-Andrei Iancu

Hi Ben,

Sorry, I missed your email :(.

But you should not do match_dialog, but topology_hiding_match()
http://www.opensips.org/html/docs/modules/2.2.x/topology_hiding.html#id293644
This is not require any loose_route() or so.

Best regards,

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

On 05.08.2016 17:22, Newlin, Ben wrote:


Bogdan,

Just as an update, this does not work. The match_dialog function must 
do loose routing on its own and even though I call remove_hf(“Route”) 
before match_dialog(), it still processes the Route header on the 
incoming message. So match_dialog returns true, but the TH refactoring 
is not applied and $du is set to the IP from the incoming message’s 
Route header, which is my server.


Ben Newlin

*From: *Bogdan-Andrei Iancu 
*Date: *Monday, August 1, 2016 at 7:13 AM
*To: *"Newlin, Ben" , OpenSIPS users mailling 
list 

*Subject: *Re: [OpenSIPS-Users] Record-Route and Dialog topology_hiding()

Hi Ben,

I see your problem here. So, let's explore this:
1) for sending the call to carrier, on OpenSIPS, you do TH (with 
advertise) resulting in a Contact with the public IP of the SBC.

2) also, manually add a RR header with the private IP of OpenSIPS.
3) send call to SBC, which will add its own RR stuff.

Now, on the sequential request from Carrier, the RURI will contain the 
Contact of OpenSIPS (the pub IP of SBC), some Route hdrs due the SBC 
and the Route we added on OpenSIPS.
- when request gets to SBC, the SBC will do loose route, consume its 
Route headers, and it will use the next available Route which points 
to the priv IP of OpenSIPS (and it will not use the public IP in RURI 
for routing)
- requests gets to OpenSIPS, simply remove_hf() and Route headers (do 
not do any loose_route() as it is useless) and hit th_matching -> this 
will refactor the request (RURI, Contact, Route) for the leg on the 
other side -> this should be fine.


For the other direction (still sequential), you do th_matching on 
OpenSIPS and nothing more. This will send a request holding the Routes 
due the SBC, a Contact with the public IP and and RURI pointing 
probably to the carrier.


Shortly you do standard TH, but on outbound scenario, add a fake RR 
header to trick the SBC to route the sequential to your OpenSIPS.


Does it make sense ?


Regards,

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

On 29.07.2016 18:05, Newlin, Ben wrote:

Here is the scenario:

My servers are only listening on a private IP address. There is a
public address on our SBC. I have a carrier that requires that the
Contact IP address matches the public address we provided to them.
So when I do TH on my server I have to also do
set_advertised_address to advertise the public address in the
Contact header. Sequential requests use the Contact as the Request
URI and the SBC is doing RR so all requests will come back through
it. When the SBC receives a sequential request it strips its Route
headers and forwards to the Request URI (previous Contact URI).
But that URI now points back to the SBC, so it cannot deliver the
request. If my server could Record-Route the initial request with
its private address, the SBC would be able to route the request
back to it.

Here is a trace of my scenario: http://pastebin.com/x927mFtq. I
created it with SIPp so some endpoints are on the same IPs but
with different ports. The public IP is 192.168.99.100, with port
7060 representing the PSTN carrier and port 5060 the SBC. The
private IP is 10.0.2.15, with port 5060 being the SBC again and
port 6060 being my server. You can see that the ACK cannot be
delivered correctly to my server with this configuration.

The problem here stems from the fact that Topology Hiding should
really be done at the edge of the network in order to be most
effective. But my OpenSIPS server doesn’t sit on the Edge of the
network, it is behind an SBC. So TH is complicated by the fact
that my OpenSIPS has no public IP of its own and must advertise
the public IP of the SBC instead, but future requests must still
be routable into the private network. I am really using TH to hide
the two ends of the call from each other, not to hide my internal
network topology.

Ben Newlin

*From: *Bogdan-Andrei Iancu 

*Date: *Friday, July 29, 2016 at 8:40 AM
*To: *"Newlin, Ben" 
, OpenSIPS users mailling list
 
*Subject: *Re: [OpenSIPS-Users] Record-Route and Dialog
topology_hiding()

Hi Ben,

Sorry to disagree, but IMHO they do exclude one each other.

Adding RR to TH should not be seen as a way of fixing some broken

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-30 Thread Denis
Bogdan, you need all log between two dr_reload?

mailto:denis7...@mail.ru


Hi Denis.

The log you posted covers only 16:21, so I cannot see the 16:29 reload.

Please pot the whole log on a pastebin or dropbox.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 11:57, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Ok, but exactly in 16:21 
(time you can see in the log) we got the main problem, i.e. after dr_reload.

Everything became fine after next dr_reload command has been received
Sep 26 16:29:41 opensips-main /usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:dr_reload_cmd: dr_reload MI command received!
Sep 26 16:29:41 opensips-main /usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:add_dst: pgw tree 0x7fd11c20a480



mailto:denis7...@mail.ru


Hi Denis,

yes, but the errors on failed attempted connections are not related to drouting 
(they are linked to the acc module).

In DR, even before attempting to perform any DB query, there is a log about 
receiving the MI "dr_reload" command - which is only one. Some how, I am not 
convinced that a second dr_reload is actually reaching OpenSIPS.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 08:46, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Bogdan!

Yes, in the log i noticed only one dr_reload when the problem appears.
I wanted to show that opensips tries to make many attempts to connect to mysql 
but dr_rules becomes empty.

Next dr_reload had been applied over 9 minutes about.

mailto:denis7...@mail.ru


Hi Denis,

The log you attached shows one single dr_reload command received, leading to 
the load of 198 GWs. After that there are no logs related to DR at all.

Regards,
Bogdan
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.09.2016 09:47, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Liviu!

The problem is still active.
In attachment you can see the latest log of the problem.

After the last string mysql connection became correct.

I want to ask, does it make any sense to increase timer parameters for mysql 
connection.
Ok, suppose we have some problem with the server and increasing of  timer 
parameters will help for it, but why does dr_rules becomes empty if it has 
mysql connection problem?


mailto:denis7...@mail.ru


Correct, Denis - they have nothing to do with each other. I am just trying to 
isolate our problem (by excluding "too many reconnects"), so we can better 
understand what's happening.
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2016 15:45, Denis wrote:
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] string modification

2016-09-30 Thread Bogdan-Andrei Iancu

Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :


$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,

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

On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete 
some character from some string if i do not know where this character 
will be inside the string?


For example, input string 123-45-67, or 12-345-67, but output string 
should be 1234567.


Thank you.


mailto:denis7...@mail.ru


___
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] string modification

2016-09-30 Thread Denis
Sorry, Bogdan
But one more, dialplan can do it?

mailto:denis7...@mail.ru


Yes, it is.

Or you can do it shorter:
$rU = $(rU{re.subst,"/-//g"});

Regards
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:46, Denis wrote:

Re: [OpenSIPS-Users] string modification Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :
   
$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete some 
character from some string if i do not know where this character will be inside 
the string?

For example, input string 123-45-67, or 12-345-67, but output string should be 
1234567.

Thank you.


mailto:denis7...@mail.ru 

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


Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-30 Thread Bogdan-Andrei Iancu

yes

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

On 30.09.2016 12:29, Denis wrote:
Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Bogdan, you need 
all log between two dr_reload?


mailto:denis7...@mail.ru


Hi Denis.

The log you posted covers only 16:21, so I cannot see the 16:29 reload.

Please pot the whole log on a pastebin or dropbox.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 11:57, Denis wrote:

	Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Ok, but exactly 
in 16:21 (time you can see in the log) we got the main problem, i.e. 
after dr_reload.


Everything became fine after next dr_reload command has been received
Sep 26 16:29:41 opensips-main 
/usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:dr_reload_cmd: dr_reload MI command received!
Sep 26 16:29:41 opensips-main 
/usr/local/opensips2.2/sbin/opensips[30942]: INFO:drouting:add_dst: 
pgw tree 0x7fd11c20a480




mailto:denis7...@mail.ru


Hi Denis,

yes, but the errors on failed attempted connections are not related to 
drouting (they are linked to the acc module).


In DR, even before attempting to perform any DB query, there is a log 
about receiving the MI "dr_reload" command - which is only one. Some 
how, I am not convinced that a second dr_reload is actually reaching 
OpenSIPS.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 08:46, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Bogdan!

Yes, in the log i noticed only one dr_reload when the problem appears.
I wanted to show that opensips tries to make many attempts to connect 
to mysql but dr_rules becomes empty.


Next dr_reload had been applied over 9 minutes about.

mailto:denis7...@mail.ru


Hi Denis,

The log you attached shows one single dr_reload command received, 
leading to the load of 198 GWs. After that there are no logs related 
to DR at all.


Regards,
Bogdan
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.09.2016 09:47, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Liviu!

The problem is still active.
In attachment you can see the latest log of the problem.

After the last string mysql connection became correct.

I want to ask, does it make any sense to increase timer parameters for 
mysql connection.
Ok, suppose we have some problem with the server and increasing of 
 timer parameters will help for it, but why does dr_rules becomes 
empty if it has mysql connection problem?



mailto:denis7...@mail.ru


	Correct, Denis - they have nothing to do with each other. I am just 
trying to isolate our problem (by excluding "too many reconnects"), so 
we can better understand what's happening.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2016 15:45, Denis wrote:





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


Re: [OpenSIPS-Users] string modification

2016-09-30 Thread Denis
Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :

$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete some 
character from some string if i do not know where this character will be inside 
the string?

For example, input string 123-45-67, or 12-345-67, but output string should be 
1234567.

Thank you.


mailto:denis7...@mail.ru 

___

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] Routing in opensips

2016-09-30 Thread Bogdan-Andrei Iancu

Hi Eric,

As a first step, can you confirm that the INVITE (sent out by your 
OPenSIPS to the internet) has in VIA hdr the public IP of your NAT ?


Best regards,

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

On 29.09.2016 19:14, Eric Freeman wrote:


It is still not working, I added my public IP as requested. I do not 
have any gateways or anything set up. Do I need to add anything?


I added this to the route statement:


if (!uri==myself) {

append_hf("P-hint: outbound\r\n");

set_advertised_address("XXX.XX.XXX.X");

route(relay);


I am still receiving these errors:

Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:rr:find_first_route: No Route headers found


Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:rr:loose_route: There is no Route HF


Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: flags=78




Eric Freeman

Technical Director/NA for TBWA\Chiat\Day

TBWA\Chiat\Day New York
488 Madison Ave.
New York NY 10022
United States of America
Tel: +12128041324 

*From:* Bogdan-Andrei Iancu 
*Sent:* Tuesday, September 20, 2016 8:38:31 AM
*To:* Eric Freeman; OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] Routing in opensips
He Eric,

In the script (generated by menuconfig), you have an IF block with :
append_hf("P-hint: outbound\r\n");

That block is executed if one of your users is dialing an external SIP 
domain. So, that is the place where the calls will break out to public 
internet.


As your OpenSIPS has a private IP (not routable in internet), you need 
to configure it to advertise the public IP of your NAT via the 
set_advertise_address() - see:

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

Put there the public IP of your NAT. Also, be sure you create in your 
router (running the NAT) a port forwarding from the public IP port 
5060 UDP to the private IP of your OpenSIPS port 5060 UDP.


Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 15.09.2016 13:10, Eric Freeman wrote:

Yes.

Get Outlook for iOS 


*From:* Bogdan-Andrei Iancu 
*Sent:* Thursday, September 15, 2016 4:57:45 AM
*To:* Eric Freeman; OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] Routing in opensips
Hello Eric,

So, you OpenSIPS is running behind a NAT ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 14.09.2016 18:43, Eric Freeman wrote:


Thank you. I am using the residential script and my device is 
registered. When I register two devices I can call between them. 
But, when I want to send the traffic out to the Internet I receive 
these types of errors. My device is a 10 address trying to call 
public IPs on the Internet. It appears I need to add a default route 
in opensips? It seems like it can't send the traffic to the Internet 
or a default route. The opensips server itself can get onto the 
Internet.



Aug 22 15:12:55 cd-ubuntu-opensips /usr/local/sbin/opensips[11973]: 
DBG:core:get_hdr_field


: found end of header

Aug 22 15:12:55 cd-ubuntu-opensips /usr/local/sbin/opensips[11973]: 
DBG:rr:find_first_rout


e: No Route headers found

Aug 22 15:12:55 cd-ubuntu-opensips /usr/local/sbin/opensips[11973]: 
DBG:rr:loose_route: Th


ere is no Route HF

Aug 22 15:12:55 cd-ubuntu-opensips /usr/local/sbin/opensips[11973]: 
DBG:dialog:w_create_di


alog2: bye on timeout activated


Thank you,


Eric Freeman



*From:* Bogdan-Andrei Iancu 
*Sent:* Wednesday, September 14, 2016 10:47:23 AM
*To:* OpenSIPS users mailling list; Eric Freeman
*Subject:* Re: [OpenSIPS-Users] Routing in opensips
Hi Eric,

A good starting point is the residential script that can be 
generated via the menuconfig tool. See:

http://www.opensips.org/Documentation/Generating-Configs-2-2

Then have your unit registered with your OpenSIPS.

Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 12.09.2016 18:15, Eric Freeman wrote:


I am very new to opensips and I want to use it for one application. 
I have installed version: opensips 2.2.1 (x86_64/linux)


on Ubuntu 14.04.2 LTS

Release: 14.04


I have a video conference unit and I want to be able make SIP calls 
to other video conference


units over the Internet.


I believe I need to set up some type of routing to route calls from 
this device out


to the Internet. I believe I need to add some commands to the route 
section of the configuration file. Can someone please let me know 
what commands I need to the config to allow the unit to call other 
units 

Re: [OpenSIPS-Users] string modification

2016-09-30 Thread Denis
Thank you.

mailto:denis7...@mail.ru


Yes, it is.

Or you can do it shorter:
$rU = $(rU{re.subst,"/-//g"});

Regards
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:46, Denis wrote:

Re: [OpenSIPS-Users] string modification Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :
   
$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete some 
character from some string if i do not know where this character will be inside 
the string?

For example, input string 123-45-67, or 12-345-67, but output string should be 
1234567.

Thank you.


mailto:denis7...@mail.ru 

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


Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-30 Thread Denis
Bogdan, log is here
https://cloud.mail.ru/public/HRtb/zn9igdL7C 

mailto:denis7...@mail.ru


yes
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 12:29, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Bogdan, you need all log 
between two dr_reload?

mailto:denis7...@mail.ru


Hi Denis.

The log you posted covers only 16:21, so I cannot see the 16:29 reload.

Please pot the whole log on a pastebin or dropbox.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 11:57, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Ok, but exactly in 16:21 
(time you can see in the log) we got the main problem, i.e. after dr_reload.

Everything became fine after next dr_reload command has been received
Sep 26 16:29:41 opensips-main /usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:dr_reload_cmd: dr_reload MI command received!
Sep 26 16:29:41 opensips-main /usr/local/opensips2.2/sbin/opensips[30942]: 
INFO:drouting:add_dst: pgw tree 0x7fd11c20a480



mailto:denis7...@mail.ru


Hi Denis,

yes, but the errors on failed attempted connections are not related to drouting 
(they are linked to the acc module).

In DR, even before attempting to perform any DB query, there is a log about 
receiving the MI "dr_reload" command - which is only one. Some how, I am not 
convinced that a second dr_reload is actually reaching OpenSIPS.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 08:46, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Bogdan!

Yes, in the log i noticed only one dr_reload when the problem appears.
I wanted to show that opensips tries to make many attempts to connect to mysql 
but dr_rules becomes empty.

Next dr_reload had been applied over 9 minutes about.

mailto:denis7...@mail.ru


Hi Denis,

The log you attached shows one single dr_reload command received, leading to 
the load of 198 GWs. After that there are no logs related to DR at all.

Regards,
Bogdan
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.09.2016 09:47, Denis wrote:

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello, Liviu!

The problem is still active.
In attachment you can see the latest log of the problem.

After the last string mysql connection became correct.

I want to ask, does it make any sense to increase timer parameters for mysql 
connection.
Ok, suppose we have some problem with the server and increasing of  timer 
parameters will help for it, but why does dr_rules becomes empty if it has 
mysql connection problem?


mailto:denis7...@mail.ru


Correct, Denis - they have nothing to do with each other. I am just trying to 
isolate our problem (by excluding "too many reconnects"), so we can better 
understand what's happening.
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 12.09.2016 15:45, Denis wrote:
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips crash when doing load test

2016-09-30 Thread Ramachandran, Agalya (Contractor)
Hi Bogdan,

I have taken 2.1.4 code base, added the below fixes on top of it


1.   Fix potential starvation for the timer tasks. 
66c337cc89a2b5c3e1bbd78c289371efcda21886

2.   rest_client: Improve polling logic during TCP connect - 
c40f2b057209b8078520abc95e5d1bf5e5a28db6

3.   rest_client: Add "connect_poll_interval" module parameter - 
f5abfb3dee649a14ae39ad74d7f04454f815748f

4.   rest_client: Fix bogus condition 
-3ba7be6692c6987faecb9c4c904035d5e7c0f916


When I try to perform load test on that code base, randomly am seeing OpenSIPS 
is crashing.
Here is the full trace of the core file. Let me know if you need any additional 
information or logs.
Am seeing crash is occurring at start_timer_extra_processes().

[root@poc-siplb-cmc-e-004 corefiles]# gdb /usr/local/sbin/opensips 
core.opensips.sig11.3977
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/sbin/opensips...done.
[New LWP 3977]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid'.
Program terminated with signal 11, Segmentation fault.
#0  final_response_handler (fr_tl=0x7f55fcd82948) at timer.c:383
383 if (is_invite(t) && should_cancel_branch(t, r_buf->branch) ) {
Missing separate debuginfos, use: debuginfo-install 
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 glibc-2.17-106.el7_2.4.x86_64 
keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-12.el7_2.x86_64 
libcom_err-1.42.9-7.el7.x86_64 libcurl-7.29.0-25.el7.centos.x86_64 
libidn-1.28-4.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 
libssh2-1.4.3-10.el7_2.1.x86_64 nspr-4.10.8-2.el7_1.x86_64 
nss-3.19.1-19.el7_2.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 
nss-util-3.19.1-9.el7_2.x86_64 openldap-2.4.40-9.el7_2.x86_64 
openssl-libs-1.0.1e-51.el7_2.4.x86_64 pcre-8.32-15.el7.x86_64 
xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64
(gdb) bt
#0  final_response_handler (fr_tl=0x7f55fcd82948) at timer.c:383
#1  timer_routine (ticks=, set=) at timer.c:1066
#2  0x0049d03a in handle_timer_job () at timer.c:597
#3  start_timer_extra_processes (chd_rank=chd_rank@entry=0x84c570 
) at timer.c:557
#4  0x00419b9a in main_loop () at main.c:748
#5  main (argc=, argv=) at main.c:1282

Regards,
Agalya

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


Re: [OpenSIPS-Users] opensips crash when doing load test

2016-09-30 Thread Ramachandran, Agalya (Contractor)
Hi Bogdan,

One more dump

#0  final_response_handler (fr_tl=0x7fded2484110) at timer.c:383
383 if (is_invite(t) && should_cancel_branch(t, r_buf->branch) ) {
Missing separate debuginfos, use: debuginfo-install 
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 glibc-2.17-106.el7_2.4.x86_64 
keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-12.el7_2.x86_64 
libcom_err-1.42.9-7.el7.x86_64 libcurl-7.29.0-25.el7.centos.x86_64 
libidn-1.28-4.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 
libssh2-1.4.3-10.el7_2.1.x86_64 nspr-4.10.8-2.el7_1.x86_64 
nss-3.19.1-19.el7_2.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 
nss-util-3.19.1-9.el7_2.x86_64 openldap-2.4.40-9.el7_2.x86_64 
openssl-libs-1.0.1e-51.el7_2.4.x86_64 pcre-8.32-15.el7.x86_64 
xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64
(gdb) bt
#0  final_response_handler (fr_tl=0x7fded2484110) at timer.c:383
#1  timer_routine (ticks=, set=) at timer.c:1066
#2  0x0049d3cd in handle_timer_job () at timer.c:597
#3  0x0059223e in handle_io (fm=, fm=, 
fm=, idx=, event_type=2)
at net/net_udp.c:265
#4  io_wait_loop_epoll (h=, t=, repeat=) at net/../io_wait_loop.h:225
#5  udp_rcv_loop (si=si@entry=0x7fded841dcb0) at net/net_udp.c:308
#6  0x00593e05 in udp_start_processes (chd_rank=chd_rank@entry=0x84c570 
, startup_done=startup_done@entry=0x0)
at net/net_udp.c:448
#7  0x00419b73 in main_loop () at main.c:736
#8  main (argc=, argv=) at main.c:1282

From: Ramachandran, Agalya (Contractor)
Sent: Friday, September 30, 2016 9:44 AM
To: 'Bogdan-Andrei Iancu' ; OpenSIPS users mailling list 

Subject: opensips crash when doing load test

Hi Bogdan,

I have taken 2.1.4 code base, added the below fixes on top of it


1.   Fix potential starvation for the timer tasks. 
66c337cc89a2b5c3e1bbd78c289371efcda21886

2.   rest_client: Improve polling logic during TCP connect - 
c40f2b057209b8078520abc95e5d1bf5e5a28db6

3.   rest_client: Add "connect_poll_interval" module parameter - 
f5abfb3dee649a14ae39ad74d7f04454f815748f

4.   rest_client: Fix bogus condition 
-3ba7be6692c6987faecb9c4c904035d5e7c0f916


When I try to perform load test on that code base, randomly am seeing OpenSIPS 
is crashing.
Here is the full trace of the core file. Let me know if you need any additional 
information or logs.
Am seeing crash is occurring at start_timer_extra_processes().

[root@poc-siplb-cmc-e-004 corefiles]# gdb /usr/local/sbin/opensips 
core.opensips.sig11.3977
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/sbin/opensips...done.
[New LWP 3977]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid'.
Program terminated with signal 11, Segmentation fault.
#0  final_response_handler (fr_tl=0x7f55fcd82948) at timer.c:383
383 if (is_invite(t) && should_cancel_branch(t, r_buf->branch) ) {
Missing separate debuginfos, use: debuginfo-install 
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 glibc-2.17-106.el7_2.4.x86_64 
keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-12.el7_2.x86_64 
libcom_err-1.42.9-7.el7.x86_64 libcurl-7.29.0-25.el7.centos.x86_64 
libidn-1.28-4.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 
libssh2-1.4.3-10.el7_2.1.x86_64 nspr-4.10.8-2.el7_1.x86_64 
nss-3.19.1-19.el7_2.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 
nss-util-3.19.1-9.el7_2.x86_64 openldap-2.4.40-9.el7_2.x86_64 
openssl-libs-1.0.1e-51.el7_2.4.x86_64 pcre-8.32-15.el7.x86_64 
xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64
(gdb) bt
#0  final_response_handler (fr_tl=0x7f55fcd82948) at timer.c:383
#1  timer_routine (ticks=, set=) at timer.c:1066
#2  0x0049d03a in handle_timer_job () at timer.c:597
#3  start_timer_extra_processes (chd_rank=chd_rank@entry=0x84c570 
) at timer.c:557
#4  0x00419b9a in main_loop () at main.c:748
#5  main (argc=, argv=) at main.c:1282

Regards,
Agalya

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


Re: [OpenSIPS-Users] Routing in opensips

2016-09-30 Thread Eric Freeman
Hopefully this is the relevant information you need from the log. I am trying 
to call 111@199.48.152.152. The IP of the opensips server si 10.88.23.10 and 
has a public IP of 204.17.231.3.  The IP address of the video conference server 
is 10.89.71.12.


Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_msg: SIP Request:

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_msg:  method:  

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_msg:  uri: 

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_msg:  version: 

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: flags=2

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_to: end of header reached, state=10

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_to: display={}, ruri={sip:111@199.48.152.152}

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:get_hdr_field:  [26]; uri=[sip:111@199.48.152.152]

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:get_hdr_field: to body [#015#012]

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:get_hdr_field: cseq : <1> 

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_via_param: found param type 235,  = ; state=6

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_via_param: found param type 232,  = 
; state=16

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_via: end of header reached, state=5

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: via found, flags=2

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: this is the first via

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:receive_msg: After parse_msg...

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:receive_msg: preparing to run routing scripts...

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: flags=100

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:maxfwd:is_maxfwd_present: value = 70

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:uri:has_totag: no totag

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: flags=78

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:tm:t_lookup_request: start searching: hash=25578, isACK=0

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:tm:matching_3261: RFC3261 transaction matching failed

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:tm:t_lookup_request: no transaction found

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_to_param: 
tag=2c770a98-c47590a-13c4-45026-57ed3cdd-1bac9941-57ed3cdd

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_to: end of header reached, state=29

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_to: display={"Conference Room"}, 
ruri={sip:LifeSize@10.88.23.13;transport=UDP}

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if host==us: 11==11 &&  [10.88.23.13] == 
[10.88.23.13]

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if port 5060 matches port 5060

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:parse_headers: flags=200

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:get_hdr_field: content_length=1759

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:get_hdr_field: found end of header

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:rr:find_first_route: No Route headers found

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if host==us: 14==11 &&  [199.48.152.152] == 
[10.88.23.13]

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if port 5060 matches port 5060

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if host==us: 14==11 &&  [199.48.152.152] == 
[10.88.23.13]

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:grep_sock_info: checking if port 5060 matches port 5060

Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
DBG:core:check_self: host != me

Sep 29 12:10:17 cd-ubuntu-opensips 

Re: [OpenSIPS-Users] string modification

2016-09-30 Thread Denis
Please, Bogdan, can you give me some example?

Thank you.

mailto:denis7...@mail.ru


YEs, sure it can.
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:58, Denis wrote:

Re: [OpenSIPS-Users] string modification Sorry, Bogdan
But one more, dialplan can do it?

mailto:denis7...@mail.ru


Yes, it is.

Or you can do it shorter:
   $rU = $(rU{re.subst,"/-//g"});

Regards
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:46, Denis wrote:

Re: [OpenSIPS-Users] string modification Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :
  
$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete some 
character from some string if i do not know where this character will be inside 
the string?

For example, input string 123-45-67, or 12-345-67, but output string should be 
1234567.

Thank you.


mailto:denis7...@mail.ru 

___
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] string modification

2016-09-30 Thread Bogdan-Andrei Iancu

YEs, sure it can.

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

On 30.09.2016 13:58, Denis wrote:

Re: [OpenSIPS-Users] string modification Sorry, Bogdan
But one more, dialplan can do it?

mailto:denis7...@mail.ru


Yes, it is.

Or you can do it shorter:
   $rU = $(rU{re.subst,"/-//g"});

Regards
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:46, Denis wrote:

Re: [OpenSIPS-Users] string modification Thank you, Bogdan

Just in case, is this correctly?

$var(input) = $rU;
$var(output)=$(var(input){re.subst,"/-//g"});
$rU=$var(output);

mailto:denis7...@mail.ru


Hi,

The easiest way is by using a regexp substitution (see 
http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :


$var(input)="123-45-67";
$var(output) = $(var(input){re.subst,"/-//g"});

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.09.2016 13:00, Denis wrote:

string modification Hello!

I am sorry that it was early, but my question is, how can i delete 
some character from some string if i do not know where this character 
will be inside the string?


For example, input string 123-45-67, or 12-345-67, but output string 
should be 1234567.


Thank you.


mailto:denis7...@mail.ru

___
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] codec_delete

2016-09-30 Thread Julian Santer

Hi guys,

we need to delete a rtpmap.
We made an "upgrade" from 1.6 to 2.1. On the 1.6 codec_delete works fine.
We are running the latest git checkout from the 2.1.4.

My code looks like:
if (codec_exists("G729"))
{
xlog("L_INFO", "Removing G.729");
codec_delete("G729");
}

The codec_exists works, but the codec is not been deleted:

Sep 30 21:51:00 core2 OpenSIPS[29371]: Removing G.729

Please let me know if you need more information.

Kind regards,
Julian Santer


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


[OpenSIPS-Users] User_preferences vs db_alias for forwarding.

2016-09-30 Thread Jeff Wilkie
Using 1.10. Is there any issues using db_alias for forwarding as opposed to
user_preferences?

Thanks

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