Re: [OpenSIPS-Users] Message buffer formatting

2024-04-10 Thread Robert Dyck
I spoke too soon. When I run opensips in debug mode on the terminal the 
formatting looks good. If I monitor the log facility the $mb dump is not 
formatted. Perhaps this is normal?

On Tuesday, April 9, 2024 11:47:05 P.M. PDT Bogdan-Andrei Iancu wrote:
> There is no formatting added, maybe the diff comes for the actual
> logging. What are the 2 versions you tested ?
> 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>https://www.opensips-solutions.com
>https://www.siphub.com
> 
> On 10.04.2024 00:21, Robert Dyck wrote:
> > In the past I would insert xlog with $mb into my script for debugging
> > purposes. Now I find that the message buffer output is not being
> > formatted.
> > 
> > 
> > Instead of
> > 
> > 
> > Message Buffer
> > 
> > REGISTER sip:192.168.1.2 SIP/2.0
> > 
> > Via: SIP/2.0/UDP
> > 192.168.1.4:5070;branch=z9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport
> > 
> > 
> > I get
> > 
> > 
> > Message Buffer#012 REGISTER sip:192.168.1.2 SIP/2.0#015#012Via:
> > SIP/2.0/UDP 192.168.1.4:5070;branch=z
> > 9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport#015#012
> > 
> > 
> > Instead of LF I get #012
> > 
> > Instead of CR I get #015
> > 
> > 
> > What may have caused this change and how can I restore the old behaviour?
> > 
> > 
> > ___
> > 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] Message buffer formatting

2024-04-10 Thread Robert Dyck
I had been running 3.4. I fired up 3.3. Had to modify the config because syslog 
syntax had changed. $mb worked as expected.  I went back to 3.4. I got notices 
about the log stuff being deprecated so I went back to the new syntax.

Now $mb works as expected on 3.4. I have concluded that something about the 
original 3.4 config was messed up.

All good now.

On Tuesday, April 9, 2024 11:47:05 P.M. PDT Bogdan-Andrei Iancu wrote:
> There is no formatting added, maybe the diff comes for the actual
> logging. What are the 2 versions you tested ?
> 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>https://www.opensips-solutions.com
>https://www.siphub.com
> 
> On 10.04.2024 00:21, Robert Dyck wrote:
> > In the past I would insert xlog with $mb into my script for debugging
> > purposes. Now I find that the message buffer output is not being
> > formatted.
> > 
> > 
> > Instead of
> > 
> > 
> > Message Buffer
> > 
> > REGISTER sip:192.168.1.2 SIP/2.0
> > 
> > Via: SIP/2.0/UDP
> > 192.168.1.4:5070;branch=z9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport
> > 
> > 
> > I get
> > 
> > 
> > Message Buffer#012 REGISTER sip:192.168.1.2 SIP/2.0#015#012Via:
> > SIP/2.0/UDP 192.168.1.4:5070;branch=z
> > 9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport#015#012
> > 
> > 
> > Instead of LF I get #012
> > 
> > Instead of CR I get #015
> > 
> > 
> > What may have caused this change and how can I restore the old behaviour?
> > 
> > 
> > ___
> > 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] on from and to header.

2024-04-10 Thread Ben Newlin
RFC 3261 is explicit that the From and To headers in a response MUST be equal 
to those in the request, with the exception of the potential addition of a tag 
in the To header if not already present.

https://www.rfc-editor.org/rfc/rfc3261.html#section-8.2.6.2

Ben Newlin

From: Users  on behalf of Johan De Clercq 

Date: Wednesday, April 10, 2024 at 9:44 AM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] on from and to header.
 EXTERNAL EMAIL - Please use caution with links and attachments


This is more a protocol question then anything else.

A sends a call B
INVITE B@5.6.7.8
from: http://sip:A@1.2.3.4:5060>>;tag=1
to: mailto:sip%3AB@5.6.7.8>>
call-id: 1
..

B responds with from and to in e164 format
200 OK
from: http://sip:+32A@1.2.3.4:5060>>;tag=1
to: mailto:sip%3A%2B32B@5.6.7.8>>; tag=2
call-id: 1

My gut feeling says to me that A will not like this and hence that B should 
respong with A and B instead of +32A and +32B.
But can somebody explain me why or why not?

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


[OpenSIPS-Users] on from and to header.

2024-04-10 Thread Johan De Clercq
This is more a protocol question then anything else.

A sends a call B
INVITE B@5.6.7.8
from: ;tag=1
to: 
call-id: 1
..

B responds with from and to in e164 format
200 OK
from: ;tag=1
to: ; tag=2
call-id: 1

My gut feeling says to me that A will not like this and hence that B should
respong with A and B instead of +32A and +32B.
But can somebody explain me why or why not?

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


[OpenSIPS-Users] UsrLoc Events are not working with Full-Sharing-CacheDB-Cluster and MongoDB

2024-04-10 Thread Yury Kirsanov
Hi,
I've got three OpenSIPS nodes in a cluster and it was working fine in
'full-sharing-cluster' mode. Then I decided to add MongoDB as a cachedb to
store all the registrations, so I enabled the mongodb module and added
'cachedb_url' parameter into the usrloc module config. After doing that I
noticed that I'm not receiving events for usrloc on all nodes as it was
before. For example, registration comes to OpenSIPS node 3, it successfully
processes the registration request and stores it into MongoDB. But the
other 2 nodes do not see that event!

Even if I subscribe for events using following code:

t_newtran();
t_wait_for_new_branches();

$avp(filter) = "aor="+$tU;
notify_on_event("E_UL_CONTACT_UPDATE",$avp(filter),"fork_call", 20);
notify_on_event("E_UL_CONTACT_INSERT",$avp(filter),"fork_call", 20);

I'm not receiving the event notifications anywhere but on the node where
the SIP REGISTER packet came. This doesn't allow to use
't_inject_branches("event")' command.

I have following routes defined for events:

event_route[E_UL_CONTACT_INSERT]
event_route[E_UL_CONTACT_UPDATE]
event_route[E_UL_CONTACT_DELETE]
route[fork_call]

None of them are getting called on other nodes of the cluster except for
the node that accepted the REGISTER packet.

Here's my cluster and usrloc configuration:

# USRLoc module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "working_mode_preset", "full-sharing-cachedb-cluster")
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "location_cluster", 1)
modparam("usrloc", "cachedb_url",
"mongodb://10.x.x.1,10.x.x.2,10.x.x.3:27017/opensipsDB.userlocation")

# Clusterer Module
loadmodule "clusterer.so"
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "my_node_info",
"cluster_id=1,node_id=1,url=bin:10.y.y.1:3857,flags=seed")
modparam("clusterer", "neighbor_node_info",
"cluster_id=1,node_id=2,url=bin:10.y.y.2:3857,flags=seed")
modparam("clusterer", "neighbor_node_info",
"cluster_id=1,node_id=3,url=bin:10.y.y.3:3857,flags=seed")
modparam("clusterer", "seed_fallback_interval", 5)
modparam("clusterer", "ping_interval", 1)
modparam("clusterer", "ping_timeout", 500)
modparam("clusterer", "node_timeout", 10)
modparam("clusterer", "sharing_tag", "vip1/1=active")

# Event Route module
loadmodule "event_route.so"

# Event Routing module
loadmodule "event_routing.so"

# Event Stream
loadmodule "event_stream.so"

# Registrar module
loadmodule "registrar.so"
modparam("registrar", "received_avp", "$avp(received)")
modparam("registrar", "min_expires", 60)
modparam("registrar", "default_expires", 120)
modparam("registrar", "max_expires", 3600)
modparam("registrar", "max_contacts", 1)
modparam("registrar", "attr_avp", "$avp(event_attr)")

Am I doing something wrong? How to enable event notifications on all nodes
in a full sharing cachedb cluster? Thanks.

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


Re: [OpenSIPS-Users] Message buffer formatting

2024-04-10 Thread Bogdan-Andrei Iancu
There is no formatting added, maybe the diff comes for the actual 
logging. What are the 2 versions you tested ?


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 10.04.2024 00:21, Robert Dyck wrote:


In the past I would insert xlog with $mb into my script for debugging 
purposes. Now I find that the message buffer output is not being 
formatted.



Instead of


Message Buffer

REGISTER sip:192.168.1.2 SIP/2.0

Via: SIP/2.0/UDP 
192.168.1.4:5070;branch=z9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport



I get


Message Buffer#012 REGISTER sip:192.168.1.2 SIP/2.0#015#012Via: 
SIP/2.0/UDP 192.168.1.4:5070;branch=z

9hG4bKce021e1d6a292d1504d0ff89e60c9ba;rport#015#012


Instead of LF I get #012

Instead of CR I get #015


What may have caused this change and how can I restore the old behaviour?


___
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] Waiting for 200 OK

2024-04-10 Thread Parthesh Bhavsar via Users
Sorry my bad!
Actually I need to Wait for a specific time after 200 OK received from Bleg.
So in that specific time If I received Re-invite from Aleg then I need to
simply realy or if not received then need to do some other operation.

Regards,
*Parthesh Bhavsar | Software Engineer | VOIP*



On Tue, Apr 9, 2024 at 9:11 PM Ben Newlin  wrote:

> This is a valid point that I missed. You can’t send an INVITE back to the
> UAC while the original INVITE remains unanswered. The UAC should/must
> respond with a 491 Request Pending.
>
>
>
> This is the use case that UPDATE was created for, and that would work if
> the UAC supports it. If it must be INVITE then you would have to be a B2BUA
> because you would have to answer the initial INVITE from the UAC while the
> outgoing INVITE was still in progress, so that you could do the re-INVITE.
>
>
>
> Ben Newlin
>
>
>
> *From: *Bogdan-Andrei Iancu 
> *Date: *Tuesday, April 9, 2024 at 10:55 AM
> *To: *Parthesh Bhavsar , OpenSIPS users
> mailling list , Ben Newlin <
> ben.new...@genesys.com>
> *Subject: *Re: [OpenSIPS-Users] Waiting for 200 OK
>
> * EXTERNAL EMAIL - Please use caution with links and attachments *
>
>
> --
>
> Hi,
>
> my 2 cents here - how comes you want to send a RE-INVITE _BEFORE_ having
> the dialog established???
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
>   https://www.siphub.com
>
> On 09.04.2024 17:35, Parthesh Bhavsar via Users wrote:
>
> It seems after setting T_fr_timeout parameter it was sending a CANCEL
> request to another leg but for my requirement I need to send Reinvite. Also
> for generating Reinvite I have used  dlg_send_sequential() as I use
> opensips as a proxy server. Any other modules on which I look for?
>
>
>
> Regards,
>
> *Parthesh Bhavsar | Software Engineer | VOIP*
>
>
>
>
>
> On Tue, Apr 9, 2024 at 7:36 PM Ben Newlin  wrote:
>
> The timing requirement can be solved using the $T_fr_timeout parameter [1].
>
>
>
> For sending a re-Invite back to the UAC I believe you’d have to be a B2BUA.
>
>
>
> [1] - https://opensips.org/docs/modules/3.4.x/tm.html#pv_T_fr_timeout
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of Parthesh
> Bhavsar via Users 
> *Date: *Tuesday, April 9, 2024 at 5:31 AM
> *To: *OpenSIPS users mailling list 
> *Subject: *[OpenSIPS-Users] Waiting for 200 OK
>
> * EXTERNAL EMAIL - Please use caution with links and attachments *
>
>
> --
>
> Hello,
>
> I have a requirement where If I get 183 responses then I need to wait for
> a specific period of time for 200 OK and if 200 OK is not received in that
> time then I need to send Reinvte back to UA with some modifications. I have
> gone through the SST module but have not  found anything relevant to match
> my requirements. Can anyone suggest some module or function on which I can
> go further to meet my requirements.
>
>
> Regards,
>
> *Parthesh Bhavsar | Software Engineer | VOIP*
>
>
>
>
>
> * *
>
> *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.
>
>
>
> * *
>
> *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