Re: [OpenSIPS-Users] TCP-related errors

2022-01-11 Thread Ben Newlin
We are just migrating to OpenSIPS 3.2 and I also have seen these errors, though 
I saw them under significant load.

I opened a Github issue for it here: 
https://github.com/OpenSIPS/opensips/issues/2724

Ben Newlin

From: Users  on behalf of Jeff Pyle 

Date: Tuesday, January 11, 2022 at 7:25 PM
To: OpenSIPS users mailling list 
Subject: [OpenSIPS-Users] TCP-related errors
Hello,

I have two similarly configured systems running a recent OpenSIPS 3.2 with may 
errors like this:

CRITICAL:core:io_watch_add:
>>> fd_array idx 1 (fd=193) points to bogus map 
>>> (fd=-1,type=0,flags=2000,data=(nil))

It seems you have hit a programming bug.
Please help us make OpenSIPS better by reporting it at 
https://github.com/OpenSIPS/opensips/issues

and

ERROR:tls_openssl:openssl_tls_async_connect: failed to retrieve SO_ERROR 
[server=52.114.76.76:5061] (3) No such process
ERROR:proto_tls:tls_async_write: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from 
52.114.32.169:6912 failed to accept
ERROR:proto_tls:tls_read_req: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from 
52.114.132.46:3008 failed to accept
ERROR:proto_tls:tls_read_req: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from 
52.114.32.169:3072 failed to accept

I'm wondering if this is truly a bug as the text suggests, or if I have a 
misconfiguration.  I increased the number of file descriptors available to 
opensips in /etc/security/limits.conf on one of the systems about 10 minutes 
ago, and so far, no more errors.  Normally I would have seen them by now.

Both systems have low traffic, less than 1 cps.

I don't have a lot of experience using OpenSIPS with TCP.  It wouldn't surprise 
me if I've missed something.



- Jeff


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


[OpenSIPS-Users] TCP-related errors

2022-01-11 Thread Jeff Pyle
Hello,

I have two similarly configured systems running a recent OpenSIPS 3.2 with
may errors like this:

CRITICAL:core:io_watch_add:
>>> fd_array idx 1 (fd=193) points to bogus map
(fd=-1,type=0,flags=2000,data=(nil))

It seems you have hit a programming bug.
Please help us make OpenSIPS better by reporting it at
https://github.com/OpenSIPS/opensips/issues

and

ERROR:tls_openssl:openssl_tls_async_connect: failed to retrieve SO_ERROR
[server=52.114.76.76:5061] (3) No such process
ERROR:proto_tls:tls_async_write: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from
52.114.32.169:6912 failed to accept
ERROR:proto_tls:tls_read_req: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from
52.114.132.46:3008 failed to accept
ERROR:proto_tls:tls_read_req: failed to do pre-tls handshake!
ERROR:tls_openssl:openssl_tls_accept: SSL_ERROR_SYSCALL err=Success(0)
ERROR:tls_openssl:openssl_tls_accept: New TLS connection from
52.114.32.169:3072 failed to accept

I'm wondering if this is truly a bug as the text suggests, or if I have a
misconfiguration.  I increased the number of file descriptors available to
opensips in /etc/security/limits.conf on one of the systems about 10
minutes ago, and so far, no more errors.  Normally I would have seen them
by now.

Both systems have low traffic, less than 1 cps.

I don't have a lot of experience using OpenSIPS with TCP.  It wouldn't
surprise me if I've missed something.



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


Re: [OpenSIPS-Users] Call issue with mid-registrar - Can't figure out issue

2022-01-11 Thread Sugar
Can someone assist me?
 Original message From: "s.lancret"  
Date: 1/8/22  12:46 PM  (GMT-06:00) To: users@lists.opensips.org Subject: 
[OpenSIPS-Users] Call issue with mid-registrar - Can't figure outissue 
I seem to have an issue getting mid- registrar to work.



I have opensips with internal iP and fqdn say proxy.sip.domain.com



The asterisk/freepbx with pjsip extension at sip.domain.com



The two internal networks and dns resolution works fine.



The extensions can call each other directly through asterisk when linphone 
domain is sip.domain.com.

pjsip settings rewrite contact yes, direct media yes, from_domain 
sip.domain.com.



When linphone points to sip.domain.com with outbound proxy proxy.sip.domain.com 
I can call external numbers like cellphones and landlines but cannot reach 
internal extensions that
 need to go through opensips (ie mobile phones - for push notifications).



If from_domain is an ip calls reach (the uac debug shows the Bye received but 
no ringing occurs) but no ringing occurs so extension eventually goes to voice 
mail and can leave a
 voice mail.



One extension can call the other but not vice versa. The extension that can 
call the other two way audio is fine.



We have pn enabled = false for now until we can fix call issues period



calls do not seem to work at all without using the call dialog module but with 
the call module the issues above occur.



Here is what we find:



if we have opensips

socket=udp:10.x.x.x.x:5068 as proxy.sip.domain.com



pjsip info above with from_domain=sip.domain.com



internal extensions go to voicemail hear ringing from the calling extension but 
called extension does not ring.



Here is a copy of config with all removed ip and sensitive info - If a function 
is missing, it is not in the original as opensips does not complain on start.



Can you help me discern the issue. we used dialog only to get from uri for push 
notifications only when we enable push notifications (which we have disabled 
for now until we can
 get mid registrar to work)?



Other info to note: proxy.sip.domain.com, 172.31.11.60 and sip.domain.com is in 
the domain table. Tried posting config but list complains to big and moderator 
has yet to approve.
 Here is snippet:  Register works fine.



#handle loose routing

if (has_totag()) {

route(handle_loose_routing);

exit;

} 
...




if (is_method("INVITE")) {

if($avp(usedialog))

route(create_dialog);

do_accounting("log");

}





...



if (is_method("INVITE|MESSAGE|NOTIFY")) {

route(trace);

xlog("source ip is ($si)\n");

xlog("source port is ($sp)\n");

xlog("request uri is ($ru)\n");

xlog("request uri is ($rp)\n");

xlog("realm is ($ar)\n");

xlog("User Agent is ($ua)\n");



if(route(is_from_main)){

xlog("looking up $ru!\n");

route(fix_domain);

mid_registrar_lookup("location", "m");

$var(rc) = $retcode;




xlog("request uri is now ($ru) after lookup\n");

xlog("Lookup return code $var(rc)\n");

switch ($var(rc)) {

case 1:

    # we found at least 1 non-PN contact!

    $var(do_relay) = true;

    break;

case 2:

    # success, but all contacts are PN-enabled, so we're

    # sending PNs / awaiting re-registrations from them

    $var(do_relay) = false;

$dlg_val(contact_id) = $(tu{uri.param,ctid});

    break;

default:

    xlog("L_INFO", "DBG: no contacts found ($var(rc))\n");

    t_reply(404, "Not Found");

    exit;

}









if ($var(do_relay) && !t_relay())

    send_reply(500, "Internal Server Error");




        exit;

} else {



#fix linphone missing port issue that causes request time outs if proxy and 
main registrar port isn't the same



if(($(ua{s.substr,0,8}) == "Linphone") || ($(ua{s.substr,0,6}) == "EZ Sip")) {

xlog("fix linphone missing port issue that causes request time outs if proxy 
and main registrar port isn't the same");

route(fix_uac);

}

}

}

...






route[handle_loose_routing]{




# handle hop-by-hop ACK (no routing required)

if ( is_method("ACK") && t_check_trans() ) {

route(trace);

t_relay();

exit;

}



xlog("totag before loose_route ru is $ru");

# sequential request within a dialog should

# take the path determined by record-routing

if ( !loose_route() ) {

# we do record-routing for all our traffic, so we should not

# receive any sequential requests without Route hdr.

send_reply(404,"Not here");

exit;

} 



xlog("totag before route relay ruri is $ru and du is $du");



# Uncomment to enable pn_purr full RFC 8599 support

if (!is_method("ACK")){

xlog("PN_PROCESS_PURR will be called\n");

       async (pn_process_purr("location"), resume_route);

#if(check_route_param("pn-wake=true"))

# xlog("L_INFO", "[LOG] Manual Push Request arm\n");

}

​












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


Re: [OpenSIPS-Users] Parse P-Asserted-Identity

2022-01-11 Thread Kingsley Tart
That's interesting - I'm more accustomed to seeing those tags on an
RPID header than PAID. With PAID I would have expected a separate
Privacy header to contain the "id" string.

Is this still OK with the RFCs?

Cheers,
Kingsley.

On Mon, 2021-11-29 at 13:22 +0100, Mickael MONSIEUR wrote:
> Hello,
> 
> My provider add to my INVITE's :
> 
> P-Asserted-Identity: "Anonymous"
> ;party=calling;privacy=yes;screen=no
> 
> Whether the call should be Anonymized to end-users.
> 
> How to get the value of "privacy" ?
> 
> I try:
> 
> if( $(ai{privacy}) == "yes" )
> 
> But it does not work. (error when starting opensips)
> 
> Thanks
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


Re: [OpenSIPS-Users] opensips 3.2 B2B module and RTPProxy/RTPEngine

2022-01-11 Thread Mark Farmer
Not sure how I missed it but I see now that the call-id, totag & fromtag
can be passed as flags.

I guess that is the right way to handle it?


On Tue, 11 Jan 2022 at 10:26, Mark Farmer  wrote:

> Hi all. Can anyone tell me if I am on the right track here please?
>
> I am trying to use B2B modules to implement the REFER scenario but I also
> need to engage RTPEngine.
> I am studying the RTPEngine module trying to understand how to accomplish
> this taking into account the above point about using the call-id, totag,
> fromtag.
>
> It looks to me that I need to use the record-call flag and pass the
> call-id. totag & fromtag as metadata. Is that right?
>
> Best regards
> Mark.
>
>
> On Wed, 2 Jun 2021 at 08:47, Răzvan Crainea  wrote:
>
>> Hi, Xaled!
>>
>> You can engange RTPengine for a B2B session, however you will have to
>> make sure that you are using the correct callid/from-tag/to-tag for the
>> entire communication to RTPengine. To do so, I would recommend you start
>> with a rtengine_offer() for the initial invite, then store the
>> callid/from-tag/to-tag in the $b2b_logic.ctx [1], and use those keys in
>> all the sequential requests/replies.
>>
>> [1] https://opensips.org/docs/modules/3.2.x/b2b_logic.html#b2b_logic.ctx
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Core Developer
>> http://www.opensips-solutions.com
>>
>> On 5/26/21 12:27 PM, David Villasmil wrote:
>> > Are you 100% sure opensips can “talk” to rtpengine? How do you know?
>> >
>> > On Wed, 26 May 2021 at 09:24, mailto:xa...@web.de>>
>> wrote:
>> >
>> > Apologies for keep on bugging on this issue, but would really
>> > appreciate any hints.
>> >
>> > -Original Message-
>> > From: Users > > > On Behalf Of
>> xa...@web.de
>> > 
>> > Sent: Wednesday, May 19, 2021 1:30 PM
>> > To: 'OpenSIPS users mailling list' > > >
>> > Subject: Re: [OpenSIPS-Users] opensips 3.2 B2B module and
>> > RTPProxy/RTPEngine
>> >
>> > Hi
>> >
>> > Would appreciate any hints on how to run the new 3.2 B2B module with
>> > RTPProxy or RTPEngine.
>> >
>> > Thanks,
>> > Xaled
>> > -Original Message-
>> > From: Users > > > On Behalf Of
>> xa...@web.de
>> > 
>> > Sent: Friday, May 14, 2021 1:34 PM
>> > To: 'OpenSIPS users mailling list' > > >
>> > Subject: [OpenSIPS-Users] opensips 3.2 B2B module and
>> RTPProxy/RTPEngine
>> >
>> > Hi,
>> >
>> > Are the any examples of using the new B2B module in 3.2 with
>> > RTPProxy or RTPEngine? I tried adding _offer and _answer call
>> > accordingly but never saw RTPProxy or RTPEngine engaged.
>> >
>> > Even a simple example for A-B call with B2B and RTPEngine would be
>> > much appreciated.
>> >
>> > Thanks,
>> > Xaled
>> >
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org 
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > 
>> >
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org 
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > 
>> >
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org 
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> > 
>> >
>> > --
>> > Regards,
>> >
>> > David Villasmil
>> > email: david.villasmil.w...@gmail.com
>> > 
>> > phone: +34669448337
>> >
>> > ___
>> > 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
>>
>
>
> --
> Mark Farmer
> farm...@gmail.com
>


-- 
Mark Farmer
farm...@gmail.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] registrar and kv_store

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

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

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


Re: [OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Liviu Chircu

On 11.01.2022 11:50, Alberto wrote:


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


Hello, Alberto!

The "kv_store" column is for internal purposes, hence there is no way to 
READ or WRITE values to it from the opensips.cfg script.


Regarding attr_avp^[1] : why not store your data in JSON format (perhaps 
using the $json_compact^[2] ) variable?  This way, you can give it 
structure, using as many nesting levels as necessary in order to fit all 
of it.


[1]: https://opensips.org/docs/modules/3.3.x/registrar.html#param_attr_avp
[2]: https://opensips.org/docs/modules/3.3.x/json.html#pv_json_compact

Best Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

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


Re: [OpenSIPS-Users] opensips 3.2 B2B module and RTPProxy/RTPEngine

2022-01-11 Thread Mark Farmer
Hi all. Can anyone tell me if I am on the right track here please?

I am trying to use B2B modules to implement the REFER scenario but I also
need to engage RTPEngine.
I am studying the RTPEngine module trying to understand how to accomplish
this taking into account the above point about using the call-id, totag,
fromtag.

It looks to me that I need to use the record-call flag and pass the
call-id. totag & fromtag as metadata. Is that right?

Best regards
Mark.


On Wed, 2 Jun 2021 at 08:47, Răzvan Crainea  wrote:

> Hi, Xaled!
>
> You can engange RTPengine for a B2B session, however you will have to
> make sure that you are using the correct callid/from-tag/to-tag for the
> entire communication to RTPengine. To do so, I would recommend you start
> with a rtengine_offer() for the initial invite, then store the
> callid/from-tag/to-tag in the $b2b_logic.ctx [1], and use those keys in
> all the sequential requests/replies.
>
> [1] https://opensips.org/docs/modules/3.2.x/b2b_logic.html#b2b_logic.ctx
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 5/26/21 12:27 PM, David Villasmil wrote:
> > Are you 100% sure opensips can “talk” to rtpengine? How do you know?
> >
> > On Wed, 26 May 2021 at 09:24, mailto:xa...@web.de>>
> wrote:
> >
> > Apologies for keep on bugging on this issue, but would really
> > appreciate any hints.
> >
> > -Original Message-
> > From: Users  > > On Behalf Of xa...@web.de
> > 
> > Sent: Wednesday, May 19, 2021 1:30 PM
> > To: 'OpenSIPS users mailling list'  > >
> > Subject: Re: [OpenSIPS-Users] opensips 3.2 B2B module and
> > RTPProxy/RTPEngine
> >
> > Hi
> >
> > Would appreciate any hints on how to run the new 3.2 B2B module with
> > RTPProxy or RTPEngine.
> >
> > Thanks,
> > Xaled
> > -Original Message-
> > From: Users  > > On Behalf Of xa...@web.de
> > 
> > Sent: Friday, May 14, 2021 1:34 PM
> > To: 'OpenSIPS users mailling list'  > >
> > Subject: [OpenSIPS-Users] opensips 3.2 B2B module and
> RTPProxy/RTPEngine
> >
> > Hi,
> >
> > Are the any examples of using the new B2B module in 3.2 with
> > RTPProxy or RTPEngine? I tried adding _offer and _answer call
> > accordingly but never saw RTPProxy or RTPEngine engaged.
> >
> > Even a simple example for A-B call with B2B and RTPEngine would be
> > much appreciated.
> >
> > Thanks,
> > Xaled
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > 
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > 
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > 
> >
> > --
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.w...@gmail.com
> > 
> > phone: +34669448337
> >
> > ___
> > 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
>


-- 
Mark Farmer
farm...@gmail.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] registrar and kv_store

2022-01-11 Thread Alberto
Hi,

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

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

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

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

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