im using kamailio with two interfaces external and internal.
i need a way either to :
* enable topoh hiding only when outgoing interface is external ( mask contact and Via ip only when ougoing interface is external
* or if it is not possible to enable it only in one direction.i want to know how to configure dynamic(for example in xavp or avp) ip to put in Contact and Via when topoh is enabled.
i see that the 'mask_ip' parameter of topoh module is a string. so we can not set a dynamic value here unfortunately.
is there an rsync endpoint available or is there a possiblity of setting
this up? Creating a mirror via HTTP is a rather quick and dirty solution
and while the deb-repo can be mirrored using debmirror, the rpm repo is
hard to sync to a non-CentOS-based machine due to missing dependencies
such as yum and reposync in latest Debian-based systems.
Would be great to get some input in regards to this topic.
On Mon, May 07, 2018 at 04:44:14PM +0200, Daniel Tryba wrote:
> Sure. Attached. Problem appears to be that the topos query can't find
> callid-totag (from the response).
> I'll try the same scenario with the mysql backend to see if it behaves
Config works fine with mysql as topos backend. So the bug is restricted
the formal notification that the development for the next major version
5.6.0 is now frozen. The focus has to be on testing the master branch.
Also, the master branch should not get commits with new features till
the branch 5.6 is created, expected to happen in 2-4 weeks, a matter of
how testing goes on. Meanwhile, the commits with new features in the C
code can be pushed to personal branches, new pull requests can still be
done, but they will be merged after branching 5.6.
Can still be done commits with documentation improvements, enhancements
to related tools (e.g., kamctl, kamcmd), merging exiting pull requests
at this moment, exporting missing KEMI functions and completing the
of the new modules added for 5.6.
Once the branch 5.6 is created, new features can be pushed again to
master branch as usual. From that moment, the v5.6.0 should be out very
soon, time used for further testing but also preparing the release of
If someone is not sure if a commit brings a new feature, just make a
pull request and it can be discussed there on github portal or via
sr-dev mailing list.
A summary of what is new in upcoming 5.6 is going to be built at:
Upgrade guidelines will be collected at:
Everyone is more than welcome to contribute to the above wiki pages,
especially to the upgrade guidelines, to help everyone else during the
migration process from v5.5.x to 5.6.x.
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Hello! I wish everyone who reads this message a good day.
I would appreciate some guidance with the configuration of my Kamailio.
Initially, I have the following architecture:
Endpoints <----Public IP----> Kamailio (listen PrivateIP advertise
PublicIP) <----Private IP----> Asterisk
In general, calls initiated from outside the system work perfectly, but I
have a problem with calls initiated from Asterisk.
According to what I was able to investigate and understand, the problem
arises from the fact that Kamailio uses the public IP for the entire
routing system that involves the Record-Route and Route Headers. This in
turn causes Asterisk to get lost trying to send messages outside of the
INITIAL INVITE transaction, for example, the ACK response to the 200 Ok
received from the Endpoint since it tries to use Kamailio's public IP to
which Asterisk doesn't have access.
I tried to force Asterisk to send all messages to Kamailio's private IP
regardless of their nature, but it doesn't seem like an appropriate
On the other hand, I tried to modify the architecture a bit so that it was
something similar to this:
Endpoints <---- Public IP----> Kamailio (listen PrivateIP:P1 advertise
PublicIP) <---- PrivateIP-----> Kamailio (listen PrivateIP:P2) <----
PrivateIP ----> Asterisk
It seems to me that this would solve the problem, but I have two doubts
about this architecture, the first is that I would like to know if there is
an easier way to solve the problem that I am not considering, and on the
other hand, I have not found a way to identify from which interface is
receiving the message to perform the routing properly.
Thanks for the attention.
*Esta mensagem pode conter informação confidencial ou privilegiada, sendo
seu sigilo protegido por lei. Se você não for o destinatário ou a pessoa
autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as
informações nela contidas ou tomar qualquer ação baseada nessas
informações. Se você recebeu esta mensagem por engano, por favor, avise
imediatamente ao remetente, respondendo o e-mail e em seguida apague-a.
Agradecemos sua cooperação.
*This message may contain confidential or
privileged information and its confidentiality is protected by law. If you
are not the addressed or authorized person to receive this message, you
must not use, copy, disclose or take any action based on it or any
information herein. If you have received this message by mistake, please
advise the sender immediately by replying the e-mail and then deleting it.
Thank you for your cooperation.
I am trying to make UAC register with a SIP telco. But when I run...
shell$ kamctl rpc uac.reg_add mydomain.com 0123456789 myteldomain.com 0123456789 sip6.telco.nl telcoreseller.nl 999999 secretpw . udp:sip6.telco.nl 360 0 10 'udp:[fd8:9::10]:5090'
...it gives me the cryptic response...
ERROR: jsonrpcs [jsonrpcs_mod.c:666]: jsonrpc_scan(): field is not a string - type 3
The module docs only give "..." as example of attributes. And, according to...
...it also seems to be behind on diff_expires, timer_expires, reg_init.
What I am missing is the format, and in some cases the purpose of attributes.
Could you help me to an example, perhaps based on the command I am trying?
P.S. It's been years since I worked with OpenSIPS. It feels like Kamailio is
friendlier, and easier to use.
I have a observation which I don't understand...
Let's assume we have an inbound $rU = 12345
And I want to change $rU outbound to 0012345
$rU = "0012345";
The call is being sent out with unaltered R-URI Username: 12345
$rU = "0012345";
The call is being sent out with the intended new R-URI Username: 0012345
Looking at the docs:
I can not figure out, why I see this difference.
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
I m p r o W a r e A G - Leiter Commerce Kunden
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
We're attempting to implement a mid-registrar for websocket connections but
are running into some issues where the tcpconn-id and socket attributes are
not stored correctly in memory (usrloc).
REGISTER Flow: UA1 -> P1 (Mid-Registrar) ~> P2 (Core Proxy/Registrar)
INVITE Flow: UA2 -> P2 -> P1 -> UA1
UA1: baresip cli connecting to P1 using websockets
Everything is running locally on a dev machine, and we're using Docker to
launch P1 and P2.
The below code snippet is what we use on P1, and has been simplified.
The general idea is as following:
1) UA1 sets up the websocket connection and sends a REGISTER request to P1
2) P1 checks if this request has already been sent to P2
2.a) If not, then relay the request to P2. Upon receiving a 200 OK from
P2 we save the registration in usrloc
2.b) If so, then absorb the request (save) and generate a reply
3) UA2 tries to call UA1 via P1 and P2
The problem occurs at 2.a since the REGISTER request is forwarded using UDP
and the 200 OK is also received using UDP.
When the registration is stored in reply route, the Socket
(udp:x.x.x.x:xxxx) and Tcpconn-Id (-1) are not set to what we would prefer
(see Output 1)
TCP was also tried as the transport between P1 and P2. Upon receiving the
reply from P2 the Tcpconn-Id and Socket of the connection between P1 and P2
was saved in the binding.
When 2.b occurs the Socket and Tcpconn-Id are set to the correct values
(see Output 2)
Making a call when the binding state is at 2.a we receive the following
error: "TCP/TLS connection (id: 0) for WebSocket could not be found"
Making a call when the binding state is at 2.b works perfectly fine since
the correct Tcpconn-Id is set.
We did find a solution, or rather a workaround to this issue:
1) Always call the save function in request_route
2) If P2 responds with an error (non-200 OK) use the unregister function to
remove the binding
We also tried the tcpops tcp_set_otcpid and tcp_set_otcpid_flag functions
after lookup, but this didn't do anything.
def ksr_request_route(self, msg):
aor = "aor"
if result := kemi.htable.sht_is_null("registrations", aor) == 1:
aor = "aor"
if result := kemi.registrar.lookup_uri("registrations", aor):
def ksr_register_reply_route(self, msg):
if kemi.tm.t_check_status("200") == 1:
aor = "aor"
kemi.htable.sht_sets("registrations", aor, "")
Output 1: Binding state when request is being forwarded
Path: [not set]
1: ws:192.168.80.1:62184 -> ws:192.168.80.15:80 (state: OPEN, last used 3s
ago, sub-protocol: sip)
Output 2: Binding state when request is being absorbed
User-Agent: baresip v2.0.2 (x86_64/darwin)
Path: [not set]
1: ws:192.168.80.1:62184 -> ws:192.168.80.15:80 (state: OPEN, last used 1s
ago, sub-protocol: sip)
I ask your help for a strange situation with topos, 183 (before a 200OK)
and SIP INFO
My topology is kamailio in front of asterisks; so kamailio has 2 interfaces
(1Public to talk with customers and carriers and 1 Private to talk with
In the image:
- the first column is the customer
- the second is the public interface of kamailio
- the third is the private interface of kamaiio
- the fourth is asterisk
As you can see in the image, the customer send an INVITE and the carrier
give back the IVR messages in a 183 (before a 200OK) asking for an IVR
The customer (configured to use SIP INFO) types a key and sends in INFO,
but as you can see kamailio sends the INFO to himself to private interface
instead of sending it to asterisk as if the contact that handled topos
contained incorrect information.
[image: Schermata 2022-04-26 alle 19.40.32.png]
- If the customer is configured with a RFC2833
- or if the IVR messages is not in a 183 but is sent after a 200OK
- or if I disabe TOPOS
*all works fine*
I used kamailio 5.5.3, I also try to upgrade to 5.5.4 but nothing change
Maybe could be connected with
Could be a kamailio bug for this particular situation or am I getting lost
in a glass of water?
thanks a lot
phone: +39 340 11 28 800
address: Via Lucrezio 13, Trieste Italy