[OpenSIPS-Users] Presence behind NAT

Callum Guy callum.guy at x-on.co.uk
Mon Oct 14 05:50:59 EDT 2019


Hi All,

Hopefully a simple question related to the behaviour of the presence module
on my registrar.

I have configured OpenSIPs to enable dialoginfo updates against specific
user agents. When the user agent places/receives a call the PUBLISH event
is generated correctly. This resolves a UA at a locally served domain and
pushes the request out to the public address of the local server.  In my
environment this server is behind NAT and we end up seeing requests being
generated and sent from the internal interface to the public address of the
sending server which seems wrong, at at least inefficient.

Is anyone able to suggest an improvement to my configuration, perhaps I can
improve domain awareness somehow? Is this the correct behaviour?

Many thanks,

Callum

----

Relevant configuration (running OpenSIPs 3.0.1):

loadmodule "presence.so"
loadmodule "presence_dialoginfo.so"
loadmodule "pua.so"
loadmodule "pua_dialoginfo.so"

modparam("presence", "server_address", "sip:*public-ip*:5060")
modparam("presence", "mix_dialog_presence", 1)
modparam("presence", "fallback2db", 1)
modparam("presence", "max_expires_subscribe", 14700)
modparam("presence", "max_expires_publish", 14700)

...

# Fired when placing a call
route[ENABLE_BLF_CALLER] {
    xlog("L_INFO", "INFO: Enabling presence for calling party ($fu)
ID:$ci\n");
    dialoginfo_set("A");
}

# Fired when receiving a call
route[ENABLE_BLF_CALLEE] {
    xlog("L_INFO", "INFO: Enabling presence for called party ($ru)
ID:$ci\n");
    dialoginfo_set("B");
}

---

Example transmission:

192.168.153.210:5060 -> PUBLIC-IP(of example.com):5060

PUBLISH sip:12345 at example.com SIP/2.0
Via: SIP/2.0/UDP 192.168.153.210:5060;branch=z9hG4bK4316.2ff8a84.0
To: sip:12345 at example.com
From: <sip:12345 at example.com>;tag=260776ec80eaeff43e316f7930643583-5872
CSeq: 10 PUBLISH
Call-ID: 0168d45862da3b23-189847 at 192.168.153.210
Max-Forwards: 70
Content-Length: 643
User-Agent: me
Event: dialog
Expires: 301
Content-Type: application/dialog-info+xml

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" state="partial"
entity="sip:12345 at example.com"><dialog
id="1ca15ca3-215b-4d9d-b401-770408889a6a_I_3150144_A0_5da442c9a33f9.0"
call-id="1ca15ca3-215b-4d9d-b401-770408889a
_I_3150144_A0_5da442c9a33f9" local-tag="1323791516"
remote-tag="UvKaaK3vUvega"
direction="recipient"><state>early</state><remote><identity>
sip:01728726500 at 192.168.153.226</identity><target uri="
sip:01728726500 at 192.168.153.226"/></remote><
cal><identity>sip:12345 at example.com</identity><target uri="
sip:12345 at example.com"/></local></dialog></dialog-info>

-- 





*0333 332 0000  |  www.x-on.co.uk <http://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> *


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 0000 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.










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20191014/4fae4cfe/attachment.html>


More information about the Users mailing list