[OpenSIPS-Users] OpenSIPS2.4 Cluster Module Dialog Sync

2019-08-23 Thread Steve Kumar
Hi,

I have to 2 openSIPS nodes setup in HA and one node is seed one. So
whenever a backup node is rebooted it's unable to resync the dialog. It
sends the dialog sync request tho. But it's discarding the receiving
packets. Here are the logs.

clusterer:send_sync_req: Sent sync request for capability 'dialog-dlg-repl'
to node 1, cluster 1
Aug 23 17:45:10 openSIPS-1 /usr/local/sbin/opensips[20714]:
INFO:clusterer:handle_sync_packet: discarding sync packet version 1, need
version 2
Aug 23 17:45:10 openSIPS-1 /usr/local/sbin/opensips[20714]:
INFO:clusterer:handle_sync_packet: discarding sync packet version 1, need
version 2


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


Re: [OpenSIPS-Users] opensips/rtpporxy and early media

2019-08-23 Thread Miha via Users

Hi Razvan

just one thing to be clear as I do not see anything in my debugging mode.

So after i get beck 180 ringing, must call:

rtpproxy_answer("rfo",,"2");
and
rtpproxy_stream2uas("/tmp/wav.wav", "-1"); (I did conversion and files 
are like wav.wav.3, .0, .8)


Must I do something else? This is done on on_replay route. I guess I 
must change to 183 session in progress?



thank you for help!
Miha





On 8/19/2019 8:57 PM, Miha via Users wrote:

Hi, Răzvan!

thank you, so i was thinking right :)


br
miha

On Mon, 19 Aug 2019 17:28:07 +0300
  Răzvan Crainea  wrote:

Hi, Miha!

You first need to convert the wav file you want to stream
to a RTP payload, one for each codec you support. To do
that, you can use the makeann tool that rtpproxy
provides[1].
Once you have those files (named file.3 for GSM, file.0
for PCMU. file.8 for PCMA), you need to call the
rtpproxy_stream2uac("file"). This will automatically do
the codec selection and choose the right file.

[1] https://github.com/sippy/rtpproxy/tree/master/makeann

Best regards,
Răzvan

On 8/19/19 4:07 PM, Miha via Users wrote:

Hello guys

first time doing this, normally I use freeswitch... Se

in combination with rtpproxy how to enable ringback tone.
I need to call rtpproxy_stream2() i add it as file? Or
there is some other option for this if I would like that
is played by UAS?


thank you for help!
miha

___
Users mailing list
Users@lists.opensips.org


http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.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


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


Re: [OpenSIPS-Users] opensips-v2.4.6 - CRASH

2019-08-23 Thread Bogdan-Andrei Iancu
Sorry, you mentioned 2.4 - the instructions are the same, but for 2.4 
version (GIT and package) of course :)


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/23/19 4:11 PM, Bogdan-Andrei Iancu wrote:

Hi Hamid,

This is an old known issue. Please update from latest 3.0 GIT branch 
or use the nightly builds for packages.


Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/
On 8/23/19 4:00 PM, Hamid Hashmi wrote:
If I create a dialog with in-dilaog pings like create_dialog("pPB") . 
Service got crashed in local route.


(gdb) bt
#0  0x in ?? ()
#1  0x7ff20c965b3d in replicate_dialog_cseq_updated 
(dlg=dlg@entry=0x7ff211d34af8, leg=leg@entry=0) at dlg_replication.c:858
#2  0x7ff20c90bd1b in send_leg_msg (dlg=dlg@entry=0x7ff211d34af8, 
method=method@entry=0x7ff20cb7c650 , src_leg=out>, dst_leg=dst_leg@entry=0,
hdrs=hdrs@entry=0x0, body=body@entry=0x0, 
func=func@entry=0x7ff20c901abc , 
param=param@entry=0x7ff211d34af8, 
release=release@entry=0x7ff20c901674 ,

reply_marker=0x7ff211d7f35c "\001") at dlg_req_within.c:640
#3  0x7ff20c905579 in dlg_options_routine (ticks=, 
attr=) at dlg_timer.c:958

#4  0x004ccdaf in handle_timer_job () at timer.c:730
#5  0x005ca36d in handle_io (idx=, 
event_type=2, fm=0x7ff2139c6b10) at net/net_udp.c:265
#6  io_wait_loop_epoll (h=, t=, 
repeat=) at net/../io_wait_loop.h:284
#7  udp_start_processes (chd_rank=chd_rank@entry=0x88b6d0 
, startup_done=startup_done@entry=0x0) at 
net/net_udp.c:389

#8  0x0041b543 in main_loop () at main.c:782
#9  main (argc=, argv=) at main.c:1439

Please find the debug logs in the attachment.

Regards


*Hamid R. Hashmi*

__

www.hrhashmi.blogspot.com 

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi...@gmail.com 
; _hamid2kviii@hotmail.com_


Sype: _hamidrhashmi_


___
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


Re: [OpenSIPS-Users] opensips-v2.4.6 - CRASH

2019-08-23 Thread Bogdan-Andrei Iancu

Hi Hamid,

This is an old known issue. Please update from latest 3.0 GIT branch or 
use the nightly builds for packages.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/23/19 4:00 PM, Hamid Hashmi wrote:
If I create a dialog with in-dilaog pings like create_dialog("pPB") .  
Service got crashed in local route.


(gdb) bt
#0  0x in ?? ()
#1  0x7ff20c965b3d in replicate_dialog_cseq_updated 
(dlg=dlg@entry=0x7ff211d34af8, leg=leg@entry=0) at dlg_replication.c:858
#2  0x7ff20c90bd1b in send_leg_msg (dlg=dlg@entry=0x7ff211d34af8, 
method=method@entry=0x7ff20cb7c650 , src_leg=out>, dst_leg=dst_leg@entry=0,
hdrs=hdrs@entry=0x0, body=body@entry=0x0, 
func=func@entry=0x7ff20c901abc , 
param=param@entry=0x7ff211d34af8, release=release@entry=0x7ff20c901674 
,

reply_marker=0x7ff211d7f35c "\001") at dlg_req_within.c:640
#3  0x7ff20c905579 in dlg_options_routine (ticks=, 
attr=) at dlg_timer.c:958

#4  0x004ccdaf in handle_timer_job () at timer.c:730
#5  0x005ca36d in handle_io (idx=, 
event_type=2, fm=0x7ff2139c6b10) at net/net_udp.c:265
#6  io_wait_loop_epoll (h=, t=, 
repeat=) at net/../io_wait_loop.h:284
#7  udp_start_processes (chd_rank=chd_rank@entry=0x88b6d0 
, startup_done=startup_done@entry=0x0) at 
net/net_udp.c:389

#8  0x0041b543 in main_loop () at main.c:782
#9  main (argc=, argv=) at main.c:1439

Please find the debug logs in the attachment.

Regards


*Hamid R. Hashmi*

__

www.hrhashmi.blogspot.com 

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi...@gmail.com 
; _hamid2kviii@hotmail.com_


Sype: _hamidrhashmi_


___
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 FreeSWITCH TCP support

2019-08-23 Thread Bogdan-Andrei Iancu

Thanks for the update!

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/23/19 1:46 PM, Matthias Kneer via Users wrote:


Hi Bogdan,

thank you very much for your reply.

Do you do full TCP from UA to FS? or OpenSIPS converts from TCP (UA 
side) to UDP (FS side) ? 


Yes I do. In the meanwhile I was able to identify the issue.

I did a check in my openSIPS logic which checks if a request is 
originating from one of the systems in my dispatcher list: 
/ds_is_in_list("$si","$sp")/ I also did checked for the port at this 
point, which is always 5060 for UDP. For TCP this is of course some 
port in a high range - and also not listed in the dispatcher table.


After I removed the additional port check: 
/ds_is_in_list("$si","")///everything started to work. FreeSWITCH 
still lists the registration as UDP, with the TCP source port, but 
since the traffic is properly flowing as TCP (also from the fs) that's 
not something I care about.


Best regards,
Matthias

___
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] opensips-v2.4.6 - CRASH

2019-08-23 Thread Hamid Hashmi
If I create a dialog with in-dilaog pings like create_dialog("pPB") .  Service 
got crashed in local route.

(gdb) bt
#0  0x in ?? ()
#1  0x7ff20c965b3d in replicate_dialog_cseq_updated 
(dlg=dlg@entry=0x7ff211d34af8, leg=leg@entry=0) at dlg_replication.c:858
#2  0x7ff20c90bd1b in send_leg_msg (dlg=dlg@entry=0x7ff211d34af8, 
method=method@entry=0x7ff20cb7c650 , src_leg=, 
dst_leg=dst_leg@entry=0,
hdrs=hdrs@entry=0x0, body=body@entry=0x0, func=func@entry=0x7ff20c901abc 
, param=param@entry=0x7ff211d34af8, 
release=release@entry=0x7ff20c901674 ,
reply_marker=0x7ff211d7f35c "\001") at dlg_req_within.c:640
#3  0x7ff20c905579 in dlg_options_routine (ticks=, 
attr=) at dlg_timer.c:958
#4  0x004ccdaf in handle_timer_job () at timer.c:730
#5  0x005ca36d in handle_io (idx=, event_type=2, 
fm=0x7ff2139c6b10) at net/net_udp.c:265
#6  io_wait_loop_epoll (h=, t=, repeat=) at net/../io_wait_loop.h:284
#7  udp_start_processes (chd_rank=chd_rank@entry=0x88b6d0 , 
startup_done=startup_done@entry=0x0) at net/net_udp.c:389
#8  0x0041b543 in main_loop () at main.c:782
#9  main (argc=, argv=) at main.c:1439

Please find the debug logs in the attachment.


Regards


Hamid R. Hashmi

__

www.hrhashmi.blogspot.com

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi...@gmail.com; 
hamid2kv...@hotmail.com

Sype:  hamidrhashmi
Aug 23 12:45:18 sip-3 SafariOSIP-12[11703]: DBG:dialog:ref_dlg: ref dlg 
0x7ff211d34af8 with 1 -> 4
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:dialog:send_leg_msg: sending 
[OPTIONS] to caller (0)
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:dialog:ref_dlg: ref dlg 
0x7ff211d34af8 with 1 -> 5
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:tm:t_uac: 
next_hop=
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:mk_proxy: doing DNS 
lookup...
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:tm:t_uac: sending socket is 
10.71.3.12
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:tm:dlg2hash: 30869
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:tm:print_request_uri: 
sip:923455908023@58.65.176.42:37166;transport=TLS;ob
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:tm:t_uac: building sip_msg from 
buffer
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_msg: SIP Request:
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_msg:  method:  

Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_msg:  uri: 

Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_msg:  version: 

Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: flags=2
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_via_param: found 
param type 232,  = ; state=16
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_via: end of header 
reached, state=5
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: via found, 
flags=2
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: this is the 
first via
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: 
flags=
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_to_param: 
tag=869c10ef-2e19-4c8b-89de-b416d5546498
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:_parse_to: end of header 
reached, state=29
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:_parse_to: display={}, 
ruri={sip:923455908...@ociqacall.waafi.com}
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:get_hdr_field:  [81]; 
uri=[sip:923455908...@ociqacall.waafi.com]
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:get_hdr_field: to body 
[]
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:get_hdr_field: cseq 
: <1> 
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:get_hdr_field: 
content_length=0
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:get_hdr_field: found end 
of header
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: flags=78
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_to_param: 
tag=3166b458-d24d-4e5b-8beb-dfb673170837
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:_parse_to: end of header 
reached, state=29
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:_parse_to: display={}, 
ruri={sip:923345448...@ociqacall.waafi.com}
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: [923345448283 923455908023 
982d846e-8f97-46db-941a-91dc43438d3f OPTIONS] LOCAL ROUTE OPTIONS
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: 
flags=
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:pv_get_contact_body: no 
contact header!
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:destroy_index_avp: AVP 
with the specified index not found
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:parse_headers: 
flags=
Aug 23 12:45:19 sip-3 SafariOSIP-12[11703]: DBG:core:pv_get_contact_body: no 
contact header!
Aug 23 

Re: [OpenSIPS-Users] OpenSIPS FreeSWITCH TCP support

2019-08-23 Thread Matthias Kneer via Users

Hi Bogdan,

thank you very much for your reply.

Do you do full TCP from UA to FS? or OpenSIPS converts from TCP (UA 
side) to UDP (FS side) ? 


Yes I do. In the meanwhile I was able to identify the issue.

I did a check in my openSIPS logic which checks if a request is 
originating from one of the systems in my dispatcher list: 
/ds_is_in_list("$si","$sp")/ I also did checked for the port at this 
point, which is always 5060 for UDP. For TCP this is of course some port 
in a high range - and also not listed in the dispatcher table.


After I removed the additional port check: 
/ds_is_in_list("$si","")///everything started to work. FreeSWITCH still 
lists the registration as UDP, with the TCP source port, but since the 
traffic is properly flowing as TCP (also from the fs) that's not 
something I care about.


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


Re: [OpenSIPS-Users] OpenSIPS FreeSWITCH TCP support

2019-08-23 Thread Bogdan-Andrei Iancu

Hi Matthias,

Do you do full TCP from UA to FS? or OpenSIPS converts from TCP (UA 
side) to UDP (FS side) ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 7/22/19 7:26 PM, Matthias Kneer via Users wrote:

Hello,

I'm using OpenSIPS as a loadbalancer / failover proxy and mid 
registrar in AOR mode, also for doing the NAT keepalives, in front of 
2 FreeSWITCHes.


While using UDP everything works fine. Since I now want to implement 
TLS, I first started to test TCP to have the baseline working to go on 
with TLS afterwards. Unfortunately, while using TCP, none of TCP 
registered phones receives inbound calls - while outbound calls from 
these phones to other UDP registered phones work without an issue. The 
registration seems to work fine and also the information in the 
userlocation of OpenSIPS properly recognizing the registration over TCP:

# opensipsctl ul show
Domain:: location hash_size=512
    AOR:: 2...@sip.example.org
    Contact:: 
sip:212@[EXTERNAL_PHONE_IP]:40009;transport=TCP;rinstance=ebc7149013d15489 
Q=

    ContactID:: 1156589880790491998
    Expires:: 18
    Callid:: Y6nJ2r4Iwm6WNL_KHqcLOQ..
    Cseq:: 2
    User-agent:: Zoiper rv2.9.2
    Received:: 
sip:[EXTERNAL_PHONE_IP]:40009;transport=tcp

    State:: CS_SYNC
    Flags:: 0
    Cflags::
    Socket:: tcp:[OPENSIPS_IP]:5060
    Methods:: 5951

It looks like FreeSWITCH is not recognizing that the phones are 
registered through TCP even though the packets seem to contain the 
required information. Here's a dump of a the registration through TCP 
taken from the FreeSWITCH: https://pastebin.com/mbMffLK7



And here's the output of the active registrations on the FreeSWITCH 
for the above mentioned phone, which also contains the transport 
information in the contact header:


Call-ID:    Y6nJ2r4Iwm6WNL_KHqcLOQ..
User:   2...@sip.example.org
Contact:    "212 ZoIPer" 


Agent:  Zoiper rv2.9.2
Status: Registered(UDP)(unknown) EXP(2019-07-22 18:02:32) 
EXPSECS(131)

Ping-Status:    Reachable
Ping-Time:  0.00
Host:   freeswitch
IP: [OPENSIPS_IP]
Port:   51540
Auth-User:  212
Auth-Realm: sip.example.org
MWI-Account:    2...@sip.example.org

Could someone guide me, at which point I do have to handle TCP 
different from UDP? I'm pretty new to this whole VoIP / SIP topic.


Thanks in advance,
Matthias


___
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] runtime changes of module parameters

2019-08-23 Thread Bogdan-Andrei Iancu

Hi Mark,

This feature was planned for 3.0, but it didn't make it - with limited 
resources, other features had higher priorities. See the end page of 
https://opensips.org/Development/Opensips-3-0-Planning


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 7/19/19 11:45 AM, Mark Farmer wrote:

Good morning everyone

I've been looking through the documentation pages for OpenSIPS 3.0 
regarding module parameter changes during runtime but I don't seem to 
be able to find out how to actually do it. Have I missed something?


Thanks
Mark.


___
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] is_contact_registered - not working as expected

2019-08-23 Thread Bogdan-Andrei Iancu

Hi Peter,

Indeed, that's a good point - the `fix_nated_contact()` is changing the 
contact (with the IP and port from the network level), messing up the 
matching.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/22/19 10:16 PM, Peter Pulham wrote:

Hi,

A bit more testing and I realised that if I xlog the contact $ct it 
printed the value of the contact in the INVITE:




Which looked fine and matched the usrloc table. However, if I xlog 
$ct.field(uri) it printed a value with the public IP:


sip:5001@x.x.x.x:49710;ob

So it looks like I need to do my checking before I do any NAT contact 
fixup.


This also explains why non NAT'd contacts were working.

Thanks for the help, set me on the right path to finally get to the issue.

Many thanks

On Thu, Aug 22, 2019 at 10:33 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


In this case, the function will perform a string matching between
the first valid contact URI from the message and the registered
contacts (the `Contact` field). Again, it is a string matching
over the entire SIP URI.

So far, based on your logs, I would say they should match. Could
you doublecheck again ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/22/19 12:07 PM, Peter Pulham wrote:

Hi,

I am calling is_contact_registered("location")

For the mi command, I used "mi ul_show_contact location
5...@domain.net " in opensips-cli

Many thanks

On Thu, Aug 22, 2019 at 10:00 AM Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Hi Peter,

How exactly do you invoke the is_contact_registered()
function (as params) for your script?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 8/21/19 10:34 PM, Peter Pulham wrote:

Hi,

Thanks for the input.

Adding the logging of $ct before call is_contact_registered
show this (also added a log for when it returned false):

Aug 21 19:24:52 ip-10-100-100-62
/usr/local/sbin/opensips[21114]: CONTACT OF REGISTER: "Peter
Pulham" 
Aug 21 19:24:52 ip-10-100-100-62
/usr/local/sbin/opensips[21114]: IS CONTACT REGISTERED
RETURNED FALSE

The contact from the ul_show_contact command shows the same
contact:

{
    "AOR": "5...@domain.net ",
    "Contacts": [
        {
            "Contact": "sip:5001@y.y.y.y:49710;ob",
            "ContactID": "1491535901589791905",
            "Expires": 18,
            "Q": "",
            "Callid": "8..5AzWHdLmUQNXHdQhwDR3qMwOGPaWH",
            "Cseq": 56286,
            "User-agent": "Telephone 1.4",
            "Received": "sip:x.x.x.x:49710",
            "State": "CS_NEW",
            "Flags": 0,
            "Cflags": "NAT",
            "Socket": "udp:z.z.z.z:5060",
            "Methods": 8063
        }
    ]
}

y.y.y.y is the same in the log as the mi output.

Through testing, I have realised that if the contact is not
NAT'd then the is_contact_registered returns true.

Any input appreciated.

On Wed, Aug 21, 2019 at 11:56 AM Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Hi Peter,

To doublecheck, do this:

* before calling the is_contact_registered(), use xlog()
to print the contact you are testing (use $ct).

* before running the test, use the ul_show_contact MI
function [1] to print the in-memory contacts for the
desired AOR.


[1]

https://opensips.org/html/docs/modules/2.4.x/usrloc.html#mi_ul_show_contact

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 08/16/2019 06:38 PM, Peter Pulham wrote:

Hi,

I am using mid_registrar to save registrations to the
location table.

If I use is_registered - everything works as expected.
So AOR matching is working.

However, when I use is_contact_registered - it returns
false.

I have checked the contact header in the request