Re: [OpenSIPS-Users] DB migration

2019-10-10 Thread Liviu Chircu

On 10.10.2019 22:44, zzz wrote:


Hello,

What would be the best way to migrate Opensips DB 2.4.x to 3.0.1 ?

I suppose the doc on the web 
https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0


is wrong since it says there should be used

opensipsdbctl migrate opensips_2_4 opensips_3_0

Thank you for the tip!  I just fixed the docs.  The DB migration logic 
has been duplicated

into the opensips-cli now.

Cheers,

--
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

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


Re: [OpenSIPS-Users] DB migration

2019-10-10 Thread Johan De Clercq
THe doc is correct.   Do note that there are script changes

Outlook voor iOS downloaden


Van: Users  namens zzz 
Verzonden: donderdag, oktober 10, 2019 9:47 PM
Aan: OpenSIPS users mailling list
Onderwerp: [OpenSIPS-Users] DB migration

Hello,
What would be the best way to migrate Opensips DB 2.4.x to 3.0.1 ?
I suppose the doc on the web 
https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0
is wrong since it says there should be used
opensipsdbctl migrate opensips_2_4 opensips_3_0

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


[OpenSIPS-Users] DB migration

2019-10-10 Thread zzz
Hello,
What would be the best way to migrate Opensips DB 2.4.x to 3.0.1 ?
I suppose the doc on the web 
https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0
is wrong since it says there should be used
opensipsdbctl migrate opensips_2_4 opensips_3_0

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


Re: [OpenSIPS-Users] Adding custom headers when sending REFER with t_new_request function

2019-10-10 Thread Tekin, Arda
Thank you very much Fabian, your solution works pretty well. Now I am able to 
add headers by this way. 

I would be grateful if developers can also explain us how we can use ctx for 
t_new_request function. 

Kind regards,
Arda Tekin 

-Original Message-
From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Fabian Gast
Sent: Thursday, October 10, 2019 9:22 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Adding custom headers when sending REFER with 
t_new_request function

Attention: This email was sent from someone outside of Afiniti. Always use 
caution when opening attachments, clicking links from unknown senders or when 
receiving unexpected emails.



Hi,

The ctx parameter never worked for me, i allways got a
ERROR:tm:w_t_new_request: failed to add ctx AVP, ignorring...
for this.

I use something like

t_new_request("OPTIONS","sip:ping@TODOMAIN:5061;transport=tls","sip:pong@DOMAIN","sip:ping@DOMAIN");

local_route {
if (is_method("OPTIONS") && $rd == "TODOMAIN") {
append_hf("X-MY-HEADER: asdfasdf\n\n");

}
}

maybe this helps you a little bit..

Fabian

- Ursprüngliche Mail -
> Von: "Tekin, Arda" 
> An: "OpenSIPS users mailling list" 
> Gesendet: Mittwoch, 9. Oktober 2019 22:46:02
> Betreff: [OpenSIPS-Users] Adding custom headers when sending REFER with   
> t_new_request function

> Hello,
>
>
>
> I am trying to initiate and send a REFER message from OpenSIPS after 
> call hold signaling completed.
>
>
>
> t_new_request function of tm module allows to send this message 
> immediately, this is how I used the function,
>
>
>
> t_new_request("REFER", "sip:moh@172.16.30.166", "1001 
> sip:1001@172.16.30.164",
> "1000 sip:1000@172.16.30.164", "text/plain Hello Alice!");
>
>
>
> but I need to add some extra headers into this message before sending 
> it. As far as I understand the last parameter (ctx) of function is used for 
> that purpose.
> Could you please explain how I can use last parameter in order to add 
> multiple headers into message.

___
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] Convert 183 to 180?

2019-10-10 Thread solarmon
Thanks all.

Apologies for my confusion and misunderstanding.

I have now tried it, and it does indeed work in the way I want.

On Wed, 9 Oct 2019 at 14:33, David Villasmil 
wrote:

> I think he’s just confused thinking that would change the reply TO THE
> provider. But this is not the case, the reply 183 comes FROM the provider
> and by “intercepting” it and changing it to 180, it’s the 180 what goes to
> the caller.
>
> On Wed, 9 Oct 2019 at 14:26, Ben Newlin  wrote:
>
>> You are trying to change a reply because the 183 response is a reply to
>> the INVITE. It is not the final reply, but it is still a reply. In fact,
>> the change_reply_status  function explicitly does not allow you to change
>> final replies, only provisional replies like 1xx.
>>
>>
>>
>> You need to use an onreply_route [1], either the global one or a
>> transaction one using t_on_reply [2], and the in that reply route you will
>> check if the response is 183 (t_check_status [3]) and if it is use
>> change_reply_status to change it to a 180.
>>
>>
>>
>> [1] https://www.opensips.org/Documentation/Script-Routes-2-4#toc4
>>
>> [2] https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_reply
>>
>> [3]
>> https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status
>>
>>
>>
>>
>>
>> Ben Newlin
>>
>>
>>
>> *From: *Users  on behalf of David
>> Villasmil 
>> *Reply-To: *OpenSIPS users mailling list 
>> *Date: *Wednesday, October 9, 2019 at 5:42 AM
>> *To: *OpenSIPS users mailling list 
>> *Subject: *Re: [OpenSIPS-Users] Convert 183 to 180?
>>
>>
>>
>> That’s exactly what it does. You might want to check for the absence of
>> sdp with
>>
>>
>>
>> if(has_body("application/sdp"))
>>
>>
>>
>> On Wed, 9 Oct 2019 at 10:03, solarmon  wrote:
>>
>> Hi,
>>
>>
>>
>> Had a quick look at the change_reply_status() function and I'm a bit
>> unsure as it suitability for what I am wanting to do.
>>
>>
>>
>> Our setup has opensips sitting between our system and a SIP provider. The
>> 183 is coming from SIP provider and I would like to convert this to 180
>> before passing it on to our system.
>>
>>
>>
>> The documentation for change_reply_status() suggest it is used to
>> "Intercept a SIP reply". I am not looking to change a 'reply' to the SIP
>> provider, or to our system. I want to convert the 183 message from the SIP
>> provider and pass it on as 180 to our system.
>>
>>
>>
>> Will this  change_reply_status() function allow us to do that?
>>
>>
>>
>> On Mon, 7 Oct 2019 at 14:23, solarmon  wrote:
>>
>> Hi,
>>
>>
>>
>> Thanks. I forgot to say that I'm using openSIPS 2.4.x, but the same
>> function is available for it too:
>>
>>
>>
>>
>> https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#change_reply_status
>>
>>
>>
>>
>> Thanks for the tip!
>>
>>
>>
>>
>>
>> [image: Image removed by sender.]
>> 
>>
>> Virus-free. www.avg.com
>> 
>>
>>
>>
>> On Mon, 7 Oct 2019 at 14:00, Ben Newlin  wrote:
>>
>> I think you are looking for this:
>> https://opensips.org/html/docs/modules/3.0.x/sipmsgops.html#change_reply_status
>>
>>
>>
>> Ben Newlin
>>
>>
>>
>> *From: *Users  on behalf of solarmon <
>> solar...@one-n.co.uk>
>> *Reply-To: *OpenSIPS users mailling list 
>> *Date: *Monday, October 7, 2019 at 5:15 AM
>> *To: *OpenSIPS users mailling list 
>> *Subject: *[OpenSIPS-Users] Convert 183 to 180?
>>
>>
>>
>> Hi,
>>
>>
>>
>> Our system connected to openSIPS is not handling 183 (with and without
>> SDP) very well and is non-trivial for us to try to change the behavior. If
>> we receive an initial 183 without SDP, it does not processed a subsequent
>> 183 with SDP.
>>
>>
>>
>> We would like to explore how 183 (with and without SDP) can be converted
>> to 180 (with and without SDP) see if this can resolve our issues. Can this
>> be achieved and are there any examples of how this could be done?
>>
>>
>>
>> Thank you in advance for any help.
>>
>>
>>
>> *Error! Filename not specified.*
>> 
>>
>> Virus-free. www.avg.com
>> 
>>
>>
>>
>> ___
>> 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
>>
>> --
>>
>> Regards,
>>
>>
>>
>> David Villasmil
>>
>> email: david.villasmil.w...@gmail.com
>>
>> phone: +34669448337
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailma

[OpenSIPS-Users] potential memory leak

2019-10-10 Thread johan


    Hi,


Since I have added proto_smpp to my script, I see the following error 
after x days in my log.


Oct 10 13:51:56 hendrix /data/opensips/sbin/opensips[6857]: 
ERROR:proto_smpp:build_enquire_link_request: malloc error for payload
Oct 10 13:51:56 hendrix /data/opensips/sbin/opensips[6857]: 
ERROR:proto_smpp:send_enquire_link_request: error creating 
enquire_link_sm request
Oct 10 13:52:12 hendrix /data/opensips/sbin/opensips[6857]: 
ERROR:core:fm_malloc: not enough free pkg memory (136 bytes left, need 
2184), please increase the "-M" command line parameter!
Oct 10 13:52:12 hendrix /data/opensips/sbin/opensips[6857]: 
ERROR:core:receive_msg: no pkg mem left for sip_msg
Oct 10 13:52:14 hendrix /data/opensips/sbin/opensips[6857]: 
ERROR:core:fm_malloc: not enough free pkg memory (136 bytes left, need 
2184), please increase the "-M" command line parameter!



I have never had this before.

Can it be that there is a memory leak in proto_smpp ?

Can you please indicate how I need to troubleshoot this ?


BR,


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