[SR-Users] need different Contact with the UAC modul.

Henning Westerholt hw at skalatan.de
Fri Oct 18 11:34:22 CEST 2019


Hello Daniel,

Adding a new column would be another option indeed. Using the existing socket is also a valid approach, or as I mentioned yesterday, the existing local domain column.

The socket usually contains an IP address, the domain usually a DNS name. Most people will probably have the l_domain column set, the socket not everybody.

Maybe just adding both (socket and l_domain) together with a mode parameter (0 = existing reg_contact_addr, 1 = l_domain, 2 = socket)?

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Daniel-Constantin Mierla
Sent: Friday, October 18, 2019 8:43 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>; Hans-Jürgen Brand <hans-juergen.brand at gmx.net>
Subject: Re: [SR-Users] need different Contact with the UAC modul.


Hello,
On 09.10.19 18:32, "Hans-Jürgen Brand" wrote:
Hello List,

i use the uac modul with remote users in SQL db.
I have 2 users in this database. Kamailio is installed in private network (192.168.100.0/24). The first user in UAC tabel is a remote user on sip server in the same network. For that I have set up the UAS with modparam("uac", "reg_contact_addr", "192.168.100.xx:5060") and this works fine. The second user is a remote user on public network. Kamailio can be reached over Dyndns Name and NAT Router will forwared SIP on 5080 and RTP to RTPENGINE. Registration works, but the public SIP Server get a wrong CONTACT Header. If I change the modparam("uac", "reg_contact_addr", "mySipServer:5080") the external user works fine, but the internal is not working.
Can I change the Contact Header before Kamailio send out the Register? or can I set diffrent modparam("uac", "reg_contact_addr",....)

Is Kamailio listening on two sockets and you have uacreg records with the socket field set? Maybe the module can be extended to use the socket field to build the Contact address, or just add a new field in database table to hold the contact host, port and protocol (user part will be filled by the module in the code).

For now, like Henning said, try to update the contact header in event_route[tm:local-request].

Cheers,
Daniel

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191018/e60975b0/attachment.html>


More information about the sr-users mailing list