Re: [OpenSIPS-Users] How to manage REFER Packet

2021-03-12 Thread Calvin Ellison
Hi Donat

You're right, I did mean a 3xx response, not a made-up redirect method. My
apologies, we use Redirect internally as the text of our 3xx codes and I
confused myself. I blame the rest on, um, brain fog?

My point to the original question of the author is whether REFER is really
what they want, or if a 3xx is a better solution for their scenario. As you
pointed out, there's a lot more involved in supporting REFER. If that's
all Freeswitch will give them, they have a bit of a hill to climb, but it's
doable.

Sorry again for creating any confusion.


Regards,

*Calvin Ellison*
Systems Architect
calvin.elli...@voxox.com
+1 (213) 285-0555

---
*voxox.com  *
5825 Oberlin Drive, Suite 5
San Diego, CA 92121
[image: Voxox]


On Thu, Mar 11, 2021 at 9:13 AM Donat Zenichev 
wrote:

> Good day Calvin.
> There is no SIP method called "REDIREDCT" as you say.
> Currently there are 6 general methods defined in RFC 3261, you can see
> them here: https://tools.ietf.org/html/rfc3261#section-27.4
>
> And of course a list of SIP specifications (documents) including following
> methods: PRACK, SUBSCRIBE, NOTIFY, PUBLISH, REFER, MESSAGE, UPDATE
> which are defined in the list of other RFC documents.
>
> But there is no method which you called. So that, please do not confuse
> the community with a wrong terminology.
>
> The thing you are referring to (if I managed to understand this correctly)
> is just a basic processing of 3XX type of responses (Redirection server).
> This block of response codes is commonly called as redirection responses.
> Response codes are not the same thing as SIP methods.
> And most of all would be "302 Moved Temporarily" used, to provide Contact
> information where to find the requested side. Depends on setup.
>
> This however seems to be completely not related to the original question
> of the author.
>
> Best regards.
>
>
> On Thu, Mar 11, 2021 at 6:26 PM Calvin Ellison 
> wrote:
>
>> Is it your intention to transfer an established call, or do you really a
>> redirect?
>>
>> In the case of a redirect you're actually looking for the REDIREDCT
>> method not the REFER method. Instead of returning a 200 OK then REFER, you
>> would return a 300 REDIRECT with the new URI in the Contact header. That
>> completes the first dialogue and then you start a new dialogue to the
>> destination provided by the REDIRECT.
>>
>>
>> Regards,
>>
>>
>> Calvin Ellison
>> Systems Architect
>> calvin.elli...@voxox.com
>> +1 (213) 285-0555
>>
>> ---
>> voxox.com
>> 5825 Oberlin Drive, Suite 5
>> San Diego, CA 92121
>>
>> On Sun, Mar 7, 2021, 23:12 Vinayak Makwana 
>> wrote:
>>
>>> Hello Everyone,
>>>  I would like to manage REFER packet with opensips script
>>>  In my case i want manage REFER packet like whenever i opensips proxy
>>> getting REFER packet from freeswitch at that time i need to convert this
>>> REFER packet into INVITE packet from opensips script and send to the
>>> endpoint.
>>> Is their  any possibilities where I can manage this thing in opensips
>>> 3.1.x ?
>>> Please suggest me.
>>>
>>> My scenario like this:
>>>
>>> AopensipsB(Freswitch)
>>>   |   -INVITE --->|   ---INVITE-->   |
>>>
>>>   |   <-200OK ---|  <---200OK--|
>>>   |  <-INVITE ---   |   <---REFER|
>>>
>>> *Disclaimer*
>>> In addition to generic Disclaimer which you have agreed on our website,
>>> any views or opinions presented in this email are solely those of the
>>> originator and do not necessarily represent those of the Company or its
>>> sister concerns. Any liability (in negligence, contract or otherwise)
>>> arising from any third party taking any action, or refraining from taking
>>> any action on the basis of any of the information contained in this email
>>> is hereby excluded.
>>>
>>> *Confidentiality*
>>> This communication (including any attachment/s) is intended only for the
>>> use of the addressee(s) and contains information that is PRIVILEGED AND
>>> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
>>> of this communication is prohibited. Please inform originator if you have
>>> received it in error.
>>>
>>> *Caution for viruses, malware etc.*
>>> This communication, including any attachments, may not be free of
>>> viruses, trojans, similar or new contaminants/malware, interceptions or
>>> interference, and may not be compatible with your systems. You shall carry
>>> out virus/malware scanning on your own before opening any attachment to
>>> this e-mail. The sender of this e-mail and Company including its sister
>>> concerns shall not be liable for any damage that may incur to you as a
>>> result of viruses, incompleteness of this message, a delay in receipt of
>>> this message or any other computer problems.
>>> ___
>>> Users mailing 

Re: [OpenSIPS-Users] Changing the expire parameter in the Contact field

2021-03-12 Thread Mark Allen
You can also use the "subst" function from the textops module to make
changes to the Contact HF using a regexp

On Fri, 12 Mar 2021 at 14:50, Joseph Barrero  wrote:

> Ovidiu, thank you for the suggestion.  I don't know why I didn't think
> that remove_hf would work, but after I re-read the module documents it
> looks as though it will do what I need.  I will give it a try.  Thank you
> again!
>
> - Joe
>
> On Fri, Mar 12, 2021 at 7:55 AM Ovidiu Sas  wrote:
>
>> You can save the received header into a variable, perform changes to it,
>> remove the old Contact header and append the new one (from the variable).
>>
>> -ovidiu
>>
>> On Fri, Mar 12, 2021 at 8:48 AM Joseph Barrero 
>> wrote:
>>
>>> Callum,
>>>
>>> Unfortunately, the contact information and parameters are read-only and
>>> cannot be set using a transformation.  I've also tried fix_nated_contact
>>> and it appends an additional expire parameter to the end of the contact
>>> header.  As such, I end up with, expires=486;expires=60.
>>>
>>> - Joe
>>>
>>> On Fri, Mar 12, 2021 at 5:41 AM Callum Guy 
>>> wrote:
>>>
 Hi Joseph,

 I haven't fully digested your scenario however you may have some luck
 using the nathelper function fix_nated_contact - presuming NAT is not an
 issue.


 https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact

 Otherwise you'll probably be able to achieve this using general
 transformations, should be quite straightforward if you only have a single
 Contact:

 https://www.opensips.org/Documentation/Script-Tran-3-1#toc60

 Hope that helps,

 Callum


 On Fri, 12 Mar 2021 at 03:55, Joseph Barrero 
 wrote:

> Is there a way to replace the expires parameter in a Contact header
> within a reply route?
>
> The issue I'm trying to solve is the following.
>
> I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS
> server is performing mid-registrar duties for Freeswitch.  However, when I
> take the primary OpenSIPS server down for maintenance and bring it back
> online, Freeswitch still has the other registration active.  When the UA
> tries to register again on the primary OpenSIPS server, the mid-register
> module sends a request over to Freeswitch, and Freeswitch returns two
> contacts; one contact with the modparam("mid_registrar",
> "outgoing_expires", 600) value and the other contact with an expiration of
> whatever value it happens to be on (in this example it is 600 - time
> elapsed) from the registration created by the secondary OpenSIPS server.
>
> The problem is that the expiration parameter in the 200 Ok reply to
> the UA from OpenSIPS on a successful registration has the second 
> expiration
> value instead of the shorter expiration value set in
> modparam("mid_registrar", "max_expires", 60).
>
> The result, is that the UA goes from 60-second registrations to
> whatever the second expiration value had at the time (a value between 0 
> and
> 599).  When the second expiration is higher than 60 seconds, the UA's
> registration is expired on OpenSIPS for up to 599 seconds.
>
> What I'd like to do is simply change the expire parameter in the
> contact header to 60 seconds on the reply route.
>
> Any help will be greatly appreciated.
>
> Thank you,
> Joe Barrero
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


 *0333 332   |  x-on.co.uk   |   **
    
    **  |  Coronavirus
 **
 |  Practice Index Reviews *

 THE ITSPA AWARDS 2020  AND Best
 ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks
 of the Internet Telephony Services Providers' Association, used under
 licence.

 *From April 1st 2021 our office address will change to: Units 22-24
 Riduna Park, Melton IP12 1QT.*

 X-on is a trading name of Storacall Technology Ltd a limited company
 registered in England and Wales.
 Registered Office : Avaland House, 110 London Road, Apsley, Hemel
 Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.
 The information in this e-mail is confidential and for use by the
 addressee(s) only. If you are not the intended recipient, please notify
 X-on immediately on +44(0)333 332  and delete the
 message from your computer. If you are not a named addressee you must
 not use, disclose, disseminate, distribute, copy, print or reply to this
 email. 

Re: [OpenSIPS-Users] Changing the expire parameter in the Contact field

2021-03-12 Thread Joseph Barrero
Ovidiu, thank you for the suggestion.  I don't know why I didn't think that
remove_hf would work, but after I re-read the module documents it looks as
though it will do what I need.  I will give it a try.  Thank you again!

- Joe

On Fri, Mar 12, 2021 at 7:55 AM Ovidiu Sas  wrote:

> You can save the received header into a variable, perform changes to it,
> remove the old Contact header and append the new one (from the variable).
>
> -ovidiu
>
> On Fri, Mar 12, 2021 at 8:48 AM Joseph Barrero 
> wrote:
>
>> Callum,
>>
>> Unfortunately, the contact information and parameters are read-only and
>> cannot be set using a transformation.  I've also tried fix_nated_contact
>> and it appends an additional expire parameter to the end of the contact
>> header.  As such, I end up with, expires=486;expires=60.
>>
>> - Joe
>>
>> On Fri, Mar 12, 2021 at 5:41 AM Callum Guy  wrote:
>>
>>> Hi Joseph,
>>>
>>> I haven't fully digested your scenario however you may have some luck
>>> using the nathelper function fix_nated_contact - presuming NAT is not an
>>> issue.
>>>
>>>
>>> https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact
>>>
>>> Otherwise you'll probably be able to achieve this using general
>>> transformations, should be quite straightforward if you only have a single
>>> Contact:
>>>
>>> https://www.opensips.org/Documentation/Script-Tran-3-1#toc60
>>>
>>> Hope that helps,
>>>
>>> Callum
>>>
>>>
>>> On Fri, 12 Mar 2021 at 03:55, Joseph Barrero 
>>> wrote:
>>>
 Is there a way to replace the expires parameter in a Contact header
 within a reply route?

 The issue I'm trying to solve is the following.

 I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS
 server is performing mid-registrar duties for Freeswitch.  However, when I
 take the primary OpenSIPS server down for maintenance and bring it back
 online, Freeswitch still has the other registration active.  When the UA
 tries to register again on the primary OpenSIPS server, the mid-register
 module sends a request over to Freeswitch, and Freeswitch returns two
 contacts; one contact with the modparam("mid_registrar",
 "outgoing_expires", 600) value and the other contact with an expiration of
 whatever value it happens to be on (in this example it is 600 - time
 elapsed) from the registration created by the secondary OpenSIPS server.

 The problem is that the expiration parameter in the 200 Ok reply to the
 UA from OpenSIPS on a successful registration has the second expiration
 value instead of the shorter expiration value set in
 modparam("mid_registrar", "max_expires", 60).

 The result, is that the UA goes from 60-second registrations to
 whatever the second expiration value had at the time (a value between 0 and
 599).  When the second expiration is higher than 60 seconds, the UA's
 registration is expired on OpenSIPS for up to 599 seconds.

 What I'd like to do is simply change the expire parameter in the
 contact header to 60 seconds on the reply route.

 Any help will be greatly appreciated.

 Thank you,
 Joe Barrero
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>>>
>>>
>>> *0333 332   |  x-on.co.uk   |   **
>>>    
>>>    **  |  Coronavirus
>>> **
>>> |  Practice Index Reviews *
>>>
>>> THE ITSPA AWARDS 2020  AND Best
>>> ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks
>>> of the Internet Telephony Services Providers' Association, used under
>>> licence.
>>>
>>> *From April 1st 2021 our office address will change to: Units 22-24
>>> Riduna Park, Melton IP12 1QT.*
>>>
>>> X-on is a trading name of Storacall Technology Ltd a limited company
>>> registered in England and Wales.
>>> Registered Office : Avaland House, 110 London Road, Apsley, Hemel
>>> Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.
>>> The information in this e-mail is confidential and for use by the
>>> addressee(s) only. If you are not the intended recipient, please notify
>>> X-on immediately on +44(0)333 332  and delete the
>>> message from your computer. If you are not a named addressee you must
>>> not use, disclose, disseminate, distribute, copy, print or reply to this
>>> email. Views or opinions expressed by an individual
>>> within this email may not necessarily reflect the views of X-on or its
>>> associated companies. Although X-on routinely screens for viruses,
>>> addressees should scan this email and any attachments
>>> for viruses. X-on makes no representation or warranty 

Re: [OpenSIPS-Users] OpenSIPs & CP - Documentation (Dynamic Routing, DialPlans, CP)

2021-03-12 Thread Schneur Rosenberg
Why don't you get Bogdans book? It's called Building telephony systems with
OpenSIPs second edition, it's a little old but it's a good start.

On Fri, Mar 12, 2021, 08:55 Rick McGill - ₪  wrote:

> Dear OpenSIPs Community,
>
> I'm very new to OpenSIPS and have a new fresh install and have started to
> customize it.
> So if my question seems so very basic this is why.
>
> I have the following:
> Debian 1.7 (Buster)
> OpenSIPs 3.1
> OpenSIPs Control Panel
> RTPproxy
>
> I have a couple of uses setup and can call with softphone from User to user
> on OpenSIPS.
> I have an FreePBX/Asterisk SIP Trunk setup to OpenSIPS.   With outbound
> routes and all configured and working properly.
> I also have on OpenSIPS a Route/Gateway or Trunk from OpenSIPs to CommPeak
> For Outbound calls.
>
> The issue I'm having is learning or finding documentation on how exactly to
> setup Dialplan, Dynamic Routes, Permissions and such so that I can get a
> call from Ext on Asterisk routed to OpenSIPS then out to CommPeak for an
> outbound International call.
>
> Currently when I try to make this type of call OpenSIPS says for example
> 662...@sip.netrovoip.comuserloc does not exists and hangs up.
> Sip.netrovoip.com is my OpenSIPs server
> So apparently with all my efforts my Dialplan, Permissions, and Dynamic
> Routes is not working no matter what changes I keep trying in them.
>
> FYI I have not yet edited or customized the file
> /var/www/opensips-cp/config/tools/system/dialplan/local.inc.php
>
> I cannot find out what code and customization I should do for attrib and
> what I can use standard in OpenSIPS-CP
>
> $config->attrs_cb=array(
> <-->// name , description
> <-->"a" => "Descr a",
> <-->"b" => "Descr b",
> <-->"c" => "Descr c",
>
> So My question is:
> Where can I find some comprehensive detailed documentation (if it exists)
> so
> I can learn more about the following?:
> Dialplans
> Dynamic Routes
> And whatever else I need to learn to get this kind of basic Dynamic Routing
> working?
> I have gone thru the OpenSIPS-CP documentation and the OpenSIPs.org too but
> there it seems a bit basic or outdated.
>
> Also I do have my Regular Expressions Quick Reference v1.2 but no matter
> what I program in CP it does not seem to work.
> I think I'm missing some very basic but major bit of information on how to
> get this simple Asterisk -> OpenSIPS -> CommPeak outbound call basic setup
> configured / working.
>
> Again sorry if all this sound like such a basic knowledge set of questions.
>
>
> 
> ---
> Rick McGill – CEO
> r...@netrovoip.com | r...@netropolitanworks.com
> Thailand: +66-2105-4262  x1001  |   USA: +1-737-237-2030   |Mobile:
> +66-85557-3000
> Support:: +66-97047-2000  |  SKYPE & LINE ID:  NetroVOIP  |
> supp...@netrovoip.com
>   ₪  www.NetroVOIP.com  Telecommunications / Video Consulting & Solutions
> Provider
>
> 
> ---
>
>
>
> ___
> 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] Changing the expire parameter in the Contact field

2021-03-12 Thread Ovidiu Sas
You can save the received header into a variable, perform changes to it,
remove the old Contact header and append the new one (from the variable).

-ovidiu

On Fri, Mar 12, 2021 at 8:48 AM Joseph Barrero  wrote:

> Callum,
>
> Unfortunately, the contact information and parameters are read-only and
> cannot be set using a transformation.  I've also tried fix_nated_contact
> and it appends an additional expire parameter to the end of the contact
> header.  As such, I end up with, expires=486;expires=60.
>
> - Joe
>
> On Fri, Mar 12, 2021 at 5:41 AM Callum Guy  wrote:
>
>> Hi Joseph,
>>
>> I haven't fully digested your scenario however you may have some luck
>> using the nathelper function fix_nated_contact - presuming NAT is not an
>> issue.
>>
>>
>> https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact
>>
>> Otherwise you'll probably be able to achieve this using general
>> transformations, should be quite straightforward if you only have a single
>> Contact:
>>
>> https://www.opensips.org/Documentation/Script-Tran-3-1#toc60
>>
>> Hope that helps,
>>
>> Callum
>>
>>
>> On Fri, 12 Mar 2021 at 03:55, Joseph Barrero 
>> wrote:
>>
>>> Is there a way to replace the expires parameter in a Contact header
>>> within a reply route?
>>>
>>> The issue I'm trying to solve is the following.
>>>
>>> I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS
>>> server is performing mid-registrar duties for Freeswitch.  However, when I
>>> take the primary OpenSIPS server down for maintenance and bring it back
>>> online, Freeswitch still has the other registration active.  When the UA
>>> tries to register again on the primary OpenSIPS server, the mid-register
>>> module sends a request over to Freeswitch, and Freeswitch returns two
>>> contacts; one contact with the modparam("mid_registrar",
>>> "outgoing_expires", 600) value and the other contact with an expiration of
>>> whatever value it happens to be on (in this example it is 600 - time
>>> elapsed) from the registration created by the secondary OpenSIPS server.
>>>
>>> The problem is that the expiration parameter in the 200 Ok reply to the
>>> UA from OpenSIPS on a successful registration has the second expiration
>>> value instead of the shorter expiration value set in
>>> modparam("mid_registrar", "max_expires", 60).
>>>
>>> The result, is that the UA goes from 60-second registrations to whatever
>>> the second expiration value had at the time (a value between 0 and 599).
>>> When the second expiration is higher than 60 seconds, the UA's registration
>>> is expired on OpenSIPS for up to 599 seconds.
>>>
>>> What I'd like to do is simply change the expire parameter in the contact
>>> header to 60 seconds on the reply route.
>>>
>>> Any help will be greatly appreciated.
>>>
>>> Thank you,
>>> Joe Barrero
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> *0333 332   |  x-on.co.uk   |   **
>>    
>>    **  |  Coronavirus
>> **
>> |  Practice Index Reviews *
>>
>> THE ITSPA AWARDS 2020  AND Best
>> ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks
>> of the Internet Telephony Services Providers' Association, used under
>> licence.
>>
>> *From April 1st 2021 our office address will change to: Units 22-24
>> Riduna Park, Melton IP12 1QT.*
>>
>> X-on is a trading name of Storacall Technology Ltd a limited company
>> registered in England and Wales.
>> Registered Office : Avaland House, 110 London Road, Apsley, Hemel
>> Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.
>> The information in this e-mail is confidential and for use by the
>> addressee(s) only. If you are not the intended recipient, please notify
>> X-on immediately on +44(0)333 332  and delete the
>> message from your computer. If you are not a named addressee you must not
>> use, disclose, disseminate, distribute, copy, print or reply to this email. 
>> Views
>> or opinions expressed by an individual
>> within this email may not necessarily reflect the views of X-on or its
>> associated companies. Although X-on routinely screens for viruses,
>> addressees should scan this email and any attachments
>> for viruses. X-on makes no representation or warranty as to the absence
>> of viruses in this email or any attachments.
>>
>> ___
>> 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] Changing the expire parameter in the Contact field

2021-03-12 Thread Joseph Barrero
Callum,

Unfortunately, the contact information and parameters are read-only and
cannot be set using a transformation.  I've also tried fix_nated_contact
and it appends an additional expire parameter to the end of the contact
header.  As such, I end up with, expires=486;expires=60.

- Joe

On Fri, Mar 12, 2021 at 5:41 AM Callum Guy  wrote:

> Hi Joseph,
>
> I haven't fully digested your scenario however you may have some luck
> using the nathelper function fix_nated_contact - presuming NAT is not an
> issue.
>
>
> https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact
>
> Otherwise you'll probably be able to achieve this using general
> transformations, should be quite straightforward if you only have a single
> Contact:
>
> https://www.opensips.org/Documentation/Script-Tran-3-1#toc60
>
> Hope that helps,
>
> Callum
>
>
> On Fri, 12 Mar 2021 at 03:55, Joseph Barrero  wrote:
>
>> Is there a way to replace the expires parameter in a Contact header
>> within a reply route?
>>
>> The issue I'm trying to solve is the following.
>>
>> I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS server
>> is performing mid-registrar duties for Freeswitch.  However, when I take
>> the primary OpenSIPS server down for maintenance and bring it back online,
>> Freeswitch still has the other registration active.  When the UA tries to
>> register again on the primary OpenSIPS server, the mid-register module
>> sends a request over to Freeswitch, and Freeswitch returns two contacts;
>> one contact with the modparam("mid_registrar", "outgoing_expires", 600)
>> value and the other contact with an expiration of whatever value it happens
>> to be on (in this example it is 600 - time elapsed) from the registration
>> created by the secondary OpenSIPS server.
>>
>> The problem is that the expiration parameter in the 200 Ok reply to the
>> UA from OpenSIPS on a successful registration has the second expiration
>> value instead of the shorter expiration value set in
>> modparam("mid_registrar", "max_expires", 60).
>>
>> The result, is that the UA goes from 60-second registrations to whatever
>> the second expiration value had at the time (a value between 0 and 599).
>> When the second expiration is higher than 60 seconds, the UA's registration
>> is expired on OpenSIPS for up to 599 seconds.
>>
>> What I'd like to do is simply change the expire parameter in the contact
>> header to 60 seconds on the reply route.
>>
>> Any help will be greatly appreciated.
>>
>> Thank you,
>> Joe Barrero
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> *0333 332   |  x-on.co.uk   |   **
>    
>    **  |  Coronavirus
> **
> |  Practice Index Reviews *
>
> THE ITSPA AWARDS 2020  AND Best
> ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks
> of the Internet Telephony Services Providers' Association, used under
> licence.
>
> *From April 1st 2021 our office address will change to: Units 22-24 Riduna
> Park, Melton IP12 1QT.*
>
> X-on is a trading name of Storacall Technology Ltd a limited company
> registered in England and Wales.
> Registered Office : Avaland House, 110 London Road, Apsley, Hemel
> Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.
> The information in this e-mail is confidential and for use by the
> addressee(s) only. If you are not the intended recipient, please notify
> X-on immediately on +44(0)333 332  and delete the
> message from your computer. If you are not a named addressee you must not
> use, disclose, disseminate, distribute, copy, print or reply to this email. 
> Views
> or opinions expressed by an individual
> within this email may not necessarily reflect the views of X-on or its
> associated companies. Although X-on routinely screens for viruses,
> addressees should scan this email and any attachments
> for viruses. X-on makes no representation or warranty as to the absence of
> viruses in this email or any attachments.
>
> ___
> 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] Changing the expire parameter in the Contact field

2021-03-12 Thread Callum Guy
Hi Joseph,

I haven't fully digested your scenario however you may have some luck using
the nathelper function fix_nated_contact - presuming NAT is not an issue.

https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact

Otherwise you'll probably be able to achieve this using general
transformations, should be quite straightforward if you only have a single
Contact:

https://www.opensips.org/Documentation/Script-Tran-3-1#toc60

Hope that helps,

Callum


On Fri, 12 Mar 2021 at 03:55, Joseph Barrero  wrote:

> Is there a way to replace the expires parameter in a Contact header within
> a reply route?
>
> The issue I'm trying to solve is the following.
>
> I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS server
> is performing mid-registrar duties for Freeswitch.  However, when I take
> the primary OpenSIPS server down for maintenance and bring it back online,
> Freeswitch still has the other registration active.  When the UA tries to
> register again on the primary OpenSIPS server, the mid-register module
> sends a request over to Freeswitch, and Freeswitch returns two contacts;
> one contact with the modparam("mid_registrar", "outgoing_expires", 600)
> value and the other contact with an expiration of whatever value it happens
> to be on (in this example it is 600 - time elapsed) from the registration
> created by the secondary OpenSIPS server.
>
> The problem is that the expiration parameter in the 200 Ok reply to the UA
> from OpenSIPS on a successful registration has the second expiration value
> instead of the shorter expiration value set in modparam("mid_registrar",
> "max_expires", 60).
>
> The result, is that the UA goes from 60-second registrations to whatever
> the second expiration value had at the time (a value between 0 and 599).
> When the second expiration is higher than 60 seconds, the UA's registration
> is expired on OpenSIPS for up to 599 seconds.
>
> What I'd like to do is simply change the expire parameter in the contact
> header to 60 seconds on the reply route.
>
> Any help will be greatly appreciated.
>
> Thank you,
> Joe Barrero
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 





*0333 332   |  x-on.co.uk   |   ** 
    
   **  |  Coronavirus 
**  |  
Practice Index Reviews *


THE ITSPA 
AWARDS 2020  AND Best ITSP - Mid 
Market, Best Software and Best Vertical Solution are trade marks of the 
Internet Telephony Services Providers' Association, used under licence.

*From April 1st 2021 our office address will change to: Units 22-24 Riduna 
Park, Melton IP12 1QT.*

X-on
is a trading name of Storacall Technology Ltd 
a limited company registered in
England and Wales.

Registered Office : 
Avaland House, 110 London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. 
Company Registration No. 2578478.

The information in this e-mail is 
confidential and for use by the addressee(s)
only. If you are not the 
intended recipient, please notify X-on immediately on +44(0)333 332  
and delete the
message from your computer. If you are not a named addressee 
you must not use,
disclose, disseminate, distribute, copy, print or reply 
to this email. Views
or opinions expressed by an individual
within this 
email may not necessarily
reflect the views of X-on or its associated 
companies. Although X-on routinely
screens for viruses, addressees should 
scan this email and any attachments
for
viruses. X-on makes no 
representation or warranty as to the absence of viruses
in this email or 
any attachments.










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