[OpenSIPS-Users] Strange behavior on ipv4 / ipv6 dual stack server with/without mhomed

2017-10-20 Thread Daniel Lakeland
I have a situation where my "internal" phones can call each other, even 
when one is registered via ipv4 and one via ipv6 (thanks to some 
rewriting of the SDP and Asterisk as a media server)


However, when I do the following, I get lines like the following in the 
syslogs:


Oct 20 20:52:50 orbit2 /usr/sbin/opensips[14070]: 
ERROR:core:proto_udp_send: 
sendto(sock,0x7fc96010bb90,455,0,0x7fc9600cb570,16): Network is 
unreachable(101) [xxx.xxx.xxx.xxx:5070]
Oct 20 20:52:50 orbit2 /usr/sbin/opensips[14070]: ERROR:tm:msg_send: 
send() to xxx.xxx.xxx.xxx:5070 for proto udp/1 failed
Oct 20 20:52:50 orbit2 /usr/sbin/opensips[14070]: ERROR:tm:t_uac: 
attempt to send to 'sip:1xxx...@xxx.xxx.xxx.xxx:5070' failed
Oct 20 20:52:51 orbit2 /usr/sbin/opensips[14070]: 
ERROR:core:proto_udp_send: 
sendto(sock,0x7fc96010bb90,455,0,0x7fc9600cb570,16): Network is 
unreachable(101) [104

.237.158.242:5070]
Oct 20 20:52:51 orbit2 /usr/sbin/opensips[14070]: ERROR:tm:msg_send: 
send() to xxx.xxx.xxx.xxx:5070 for proto udp/1 failed
Oct 20 20:52:52 orbit2 /usr/sbin/opensips[14070]: 
ERROR:core:proto_udp_send: 
sendto(sock,0x7fc96010bb90,455,0,0x7fc9600cb570,16): Network is 
unreachable(101) [104

.237.158.242:5070]
Oct 20 20:52:52 orbit2 /usr/sbin/opensips[14070]: ERROR:tm:msg_send: 
send() to xxx.xxx.xxx.xxx:5070 for proto udp/1 failed
Oct 20 20:52:54 orbit2 /usr/sbin/opensips[14070]: 
ERROR:core:proto_udp_send: 
sendto(sock,0x7fc96010bb90,455,0,0x7fc9600cb570,16): Network is 
unreachable(101) [104

.237.158.242:5070]
Oct 20 20:52:54 orbit2 /usr/sbin/opensips[14070]: ERROR:tm:msg_send: 
send() to xxx.xxx.xxx.xxx:5070 for proto udp/1 failed
Oct 20 20:52:58 orbit2 /usr/sbin/opensips[14070]: 
INFO:dialog:reply_from_caller: terminating dialog ( due to timeout ) 
with callid = [23bddf6f5c321df91760ff3614340...@mydomain.org]


heres how the call flows:

Phone 1 ipv4 TLS -> Proxy <---ipv4 UDP> Asterisk on port 
5070 same server as proxy <---ipv6 UDP ---> Proxy <-- ipv4 UDP---> provider



I get a call with audio for about 30 seconds and then OpenSips sends 
errors and the call aborts. The provider's sip trace just shows a "Bye" 
from asterisk, so I guess the call is aborting on the "phone" leg


I just discovered the "mhomed" variable, but when I tried this, it still 
aborts.
I've tried manually forcing the socket... but I think maybe I'm not 
doing it in all the appropriate places. It may also be that this is a 
Red Herring, as it seems like the messages *do* get delivered?



What I see in a sip_trace is that the only things being sent to the 
xxx.xxx.xxx.xxx:5070 port are messages from the proxy to asterisk on the 
Phone1 side of the call. Though since the sending blocks and aborts in 
the logs, I'm not sure if the stuck messages hit the sip trace.


I'm running the "firehol" firewall and it's a VPS server, I can't seem 
to figure out how to remove the nf_conntrack_nat module as this vps has 
no knowledge of the kernel modules. (?? I am not that familiar with the 
VPS kernel environment) the proxy should be able to talk to Asterisk, 
and in fact, it seems like doing an asterisk sip trace that asterisk is 
getting the messages...



On the Phone 1 leg I see:

INVITE
Session Progress from asterisk
OK from asterisk
Ack from phone1

etc both are hitting the proxy and the asterisk server I believe

Please note that *when I call direct to another local sip phone I have 
no problems*


I'm tearing my hair out a bit here

Can anyone think why opensips would have trouble sending like this? Is 
this something specific to VPS virtual networking stuff?


THanks !



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


Re: [OpenSIPS-Users] Error: invalid sendtoparameters

2017-10-20 Thread Nabeel
Hi,

The listen part parameter is as follows:

listen=udp:162.XXX.X.206:5060


OpenSIPS version: 2.2

OS: CentOS 7



On 20 October 2017 at 08:50, Abdul Basit  wrote:

> please share you opnesips.cfg especially the section you configured listen
> parameter.
>
> what's opensips version and OS you are using?
>
> --
> regards,
>
> abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445
>
> On 20 October 2017 at 09:22, Nabeel  wrote:
>
>> Hello,
>>
>> Please help me understand this error below. Is it of concern?
>> The server is not bound to localhost, it is bound to public IPs.
>>
>>
>>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>>> ERROR:core:proto_udp_send: 
>>> sendto(sock,0x7f1f89c2bcf0,4,0,0x7ffc5f146db0,16):
>>> Invalid argument(22)
>>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>>> CRITICAL:core:proto_udp_send: invalid sendtoparameters#012one possible
>>> reason is the server is bound to localhost and#012attempts to send to the
>>> net
>>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>>> ERROR:nathelper:msg_send: send() for proto 1 failed
>>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>>> ERROR:nathelper:nh_timer: sip msg_send failed!
>>
>>
>>
>> ___
>> 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


[OpenSIPS-Users] Wrong Contact in location table

2017-10-20 Thread Dragomir Haralambiev
Hello,


I have follow line in my script:
if (is_method("REGISTER")) {
fix_nated_register();
fix_nated_contact();

save("location","c1", "$fu");
}
Opensips receive REGISTER  with

"Contact: "


I try to see location table
opensipsctl  ul show

AOR:: 516203
Contact:: sip:516203@192.168.2.203:5060 Q=
ContactID:: 926418920300655256
Expires:: 270
Callid:: 509678716@192.168.2.203
Cseq:: 2
User-agent:: Yealink SIP-T19P 31.72.0.75
State:: CS_SYNC
Flags:: 0
Cflags:: NAT_BFLAG
Socket:: udp:1.2.3.4:5566
Methods:: 16383

Why after save("location") Contact address in location table is not fix?
How setup Opensips to write into location table fixed Contact?

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


Re: [OpenSIPS-Users] Configure Install Prefix

2017-10-20 Thread Mundkowsky, Robert
Usually people do not try to install in "/" which is the root directory.  Which 
technically likely has no prefix.

You usually want to install application in their own subdirectory if you are 
using a prefix for easier management. For example:

/opensips-2.2.3 or /apps/opensips-2.2.3 or ...

Otherwise you want to let it install in the normal locations for a specific OS 
(e.g. libs like go to /usr/local/lib, configs into /etc ,).

Robert


-Original Message-
From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Social Boh
Sent: Friday, October 20, 2017 2:16 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Configure Install Prefix

Hello,

OpenSIPs 2.3

On make menuconfig -> Configure Compile Options -> Configure Install Prefix if 
I configure /  only, the installation happen on /usr/local

If I choose /usr it's OK.

On 2.2 version this not happens.

Any hint?

Regards

--
---
I'm SoCIaL, MayBe


___
Users mailing list
Users@lists.opensips.org
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers=02%7C01%7Crmundkowsky%40ets.org%7Ccac0512948924e432ef108d517e6d9b4%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636441202635858519=%2FeSR6XS1oi37JTvfxLPVvVInCofjFwtP3GPMoxGt%2FsI%3D=0



This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.


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


[OpenSIPS-Users] Configure Install Prefix

2017-10-20 Thread Social Boh

Hello,

OpenSIPs 2.3

On make menuconfig -> Configure Compile Options -> Configure Install 
Prefix if I configure /  only, the installation happen on /usr/local


If I choose /usr it's OK.

On 2.2 version this not happens.

Any hint?

Regards

--
---
I'm SoCIaL, MayBe


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


Re: [OpenSIPS-Users] Problem in handling BYE using topology_hiding_match()

2017-10-20 Thread Bogdan-Andrei Iancu

Hi Ravinder,

As per the trace, the ACK is properly routed (frames 17 & 18). Also the 
incoming BYE (frame 19) is forwarded after a long time (see frame 22), 
still there is a funny 501 reply for BYE (before the relay) in frame 21.


Could you also post somewhere the OpenSIPS logs (level 4, debug) 
corresponding to processing the incoming BYE (from 19) ?


Best regards,

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

On 10/18/2017 11:21 AM, Ravindrakumar Bhatt wrote:

Hi Bogdan,
please find my opensips call log as requested:
https://pastebin.com/7ypH0z0x

as well as pcap for same call is attached with mail.
PFA

Thanks and regards,
Ravindra Bhatt

On Wed, Oct 18, 2017 at 12:52 PM, Bogdan-Andrei Iancu 
> wrote:


Hi Ravindra,

Please post a link to the SIP trace/capture showing the entire SIP
call (INVITE + 200 OK + ACK + BYE). The trace must cover all in
and out traffic in OpenSIPS.

Regards,

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

On 10/17/2017 12:29 PM, Ravindrakumar Bhatt wrote:

Hello,
i am using opensips v2.2.1 as SBC.
call flow is like caller->opensips->server->opensips->callie.call
is established successfully but when BYE is sent by any user it
is not recognised by topology_hiding_match() also i am not
getting any dialog related values(DLG_status,DLG_did etc) in ACK
or BYE method.

here is my logic for  requset handling :

route[PROCESS_INVITE] {

route("SETCDR");
if(t_check_trans()) {
drop();
}
route("CHECK_NAT");
create_dialog();
do_accounting("aaa","cdr|failed");
route("REALY_ROUTE");
exit;
}

route[RELAY_ROUTE] {
if(is_method("INVITE|UPDATE")) {
xlog("L_INFO","CI:$ci In Relay Route RU:$ru DU:$du Tu:$tu
TU:$tU CT:$ct\n");
if(!has_totag() && is_method("INVITE") &&
!isflagset(15)) {
xlog("L_INFO","CI:$ci Topology_Hiding
Call\n");
setflag(15);
topology_hiding("UC");
#   record_route();


}
if($avp(use-rtpproxy)=="YES") {
route(PROCESS_RTPPROXY_OFFER);
}
xlog("L_INFO","CI:$ci Routing Call
IP:$avp(dest-ip) PORT:$avp(dest-port)\n");

$avp(call_status)="Failed";
t_on_branch("DEFAULT_BRANCH_ROUTE");
t_on_reply("DEFAULT_REPLY_ROUTE");
}

xlog("L_INFO","DAILOG STATUS  $DLG_end_reason
$DLG_did $DLG_status $DLG_count\n");

#   record_route();
if (!t_relay()) {
sl_reply_error();
}
exit;
}

route[MATCH_DIALOG] {

xlog("L_INFO",":DAILOG STATUS $rm:
$DLG_end_reason $DLG_did $DLG_status $DLG_count\n"); #HERE I
AM GETTING most values null
if(has_totag() &&
is_method("INVITE|ACK|BYE|UPDATE|REFER|PRACK|INFO") ) {
xlog("L_INFO","INSIDE MATCH_DIALOG  $rm\n");
#   loose_route();
xlog(" found match request to a dialog \n");
if(topology_hiding_match()) {   
#THIS CONDITIONS FAILS FOR ALL REQUESTS

if(is_method("BYE")) {
rtpproxy_unforce();
}
route("RELAY_ROUTE");
}
}
}

what is going wrong here ? is there any way to handle this issue?

Thanks and  regards ,
Ravindra Bhatt


___
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] Error: invalid sendtoparameters

2017-10-20 Thread Abdul Basit
please share you opnesips.cfg especially the section you configured listen
parameter.

what's opensips version and OS you are using?

--
regards,

abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445

On 20 October 2017 at 09:22, Nabeel  wrote:

> Hello,
>
> Please help me understand this error below. Is it of concern?
> The server is not bound to localhost, it is bound to public IPs.
>
>
>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>> ERROR:core:proto_udp_send: sendto(sock,0x7f1f89c2bcf0,4,0,0x7ffc5f146db0,16):
>> Invalid argument(22)
>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>> CRITICAL:core:proto_udp_send: invalid sendtoparameters#012one possible
>> reason is the server is bound to localhost and#012attempts to send to the
>> net
>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>> ERROR:nathelper:msg_send: send() for proto 1 failed
>> Oct 20 05:10:12 server2 /usr/local/sbin/opensips[923]:
>> ERROR:nathelper:nh_timer: sip msg_send failed!
>
>
>
> ___
> 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