Hi,
maybe I'm stupid, but I can not find out how to send 4 byte UDP NAT packets to the sip server.
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 15) modparam("nathelper|registrar", "received_avp", "$avp(s:rcv)")
I'm a absolute beginner with kamailio and the page about the nathelper Module is not really helpful.
At the moment no pings are sendet. But I receive 4 byte packets from the sip server.
After 15 minutes my calls are cancelled because of the missing pings. Without proxy, the phone send the pings directly to the sip server and the call stays alive.
When I experiment with some other nathelper settings, kamailo start results in errors.
Any help would be appreciated.
Best regards,
Bernd
Hi,
The usrloc keepalive sends only via SIP OPTIONS.. Is this right? So it is not what I want
Do I need some usrloc settings?
Btw. I use kamailio 5.6
Best regards,
Bernd
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
Thank you for this hints.
I will try if I can manage one of the possibilities.
Am 17.02.2023 um 12:19 schrieb Daniel-Constantin Mierla:
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
Hi,
I don't think that your ideas are possible. I need to send the keepalive to the PBX on the same ip:port connection which is in use.
If I add something static, this will not work.
Am 17.02.2023 um 12:19 schrieb Daniel-Constantin Mierla:
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
Well, if you don't know the ip:port of the pbx and the pbx does not register ... but you should know something about the PBX, how do you send traffic to it and how do you trust the traffic from it?
On 17.02.23 12:39, Bernd Krueger-Knauber wrote:
Hi,
I don't think that your ideas are possible. I need to send the keepalive to the PBX on the same ip:port connection which is in use.
If I add something static, this will not work.
Am 17.02.2023 um 12:19 schrieb Daniel-Constantin Mierla:
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
-- EDNT GmbH Werner-von-Siemens-Strasse 7 64625 Bensheim www.ednt.de
Registergericht: Darmstadt Registernummer: 24972
Geschäftsführer: Karlheinz Knapp
The phones registers at the PBX via the kamailio transparent proxy. So I can find out the ip:port of the PBX
The kamailio proxy is needed since the phones are iPhones and I implemented the push notifications.
The phones uses an own software with an own UA string. If this UA string is Ok and the target is the PBX, I allow the traffic.
The other way round I accept only stuff from the PBX to stored hash entries.
My last idea: I can execute kamctl with the exec modul end add an entry in the ul list with the used ip:port combination and remove it after the BYE message
Am 17.02.2023 um 13:15 schrieb Daniel-Constantin Mierla:
Well, if you don't know the ip:port of the pbx and the pbx does not register ... but you should know something about the PBX, how do you send traffic to it and how do you trust the traffic from it?
On 17.02.23 12:39, Bernd Krueger-Knauber wrote:
Hi,
I don't think that your ideas are possible. I need to send the keepalive to the PBX on the same ip:port connection which is in use.
If I add something static, this will not work.
Am 17.02.2023 um 12:19 schrieb Daniel-Constantin Mierla:
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
-- EDNT GmbH Werner-von-Siemens-Strasse 7 64625 Bensheim www.ednt.de
Registergericht: Darmstadt Registernummer: 24972
Geschäftsführer: Karlheinz Knapp
Hi,
I was able to place the PBX with kamctl in the ul as contact. I see also, that 4 byte packets are transmitted to the PBX, but ...
unfortunately kamailio use for each outgoing call to the PBX the port 5060 as source. SIP can sort this out by the record and via entries and the callid. This is not possible with the 4 byte ka packets. The PBX awaits keepalives per call, else it terminates the call after arround 15 minutes.
I found no hint how to tell kamailio to use different source ports per call. Is there a way?
Else I have to send SIP ping, but they can not placed via kamctl, because I can not add all required fields.
How should I do the keepalive to the PBX per call in a transparent kamailio proxy?
Best regards,
Bernd
----- Ursprüngliche Mail ----- Von: "Daniel-Constantin Mierla" miconda@gmail.com An: "Bernd Krueger-Knauber" bkk@ednt.de, "Kamailio (SER) - Users Mailing List" sr-users@lists.kamailio.org Gesendet: Freitag, 17. Februar 2023 13:15:50 Betreff: Re: [SR-Users] Re: sendig 4 byte udp nat pings
Well, if you don't know the ip:port of the pbx and the pbx does not register ... but you should know something about the PBX, how do you send traffic to it and how do you trust the traffic from it?
On 17.02.23 12:39, Bernd Krueger-Knauber wrote:
Hi,
I don't think that your ideas are possible. I need to send the keepalive to the PBX on the same ip:port connection which is in use.
If I add something static, this will not work.
Am 17.02.2023 um 12:19 schrieb Daniel-Constantin Mierla:
On 17.02.23 11:44, Bernd Krueger-Knauber wrote:
Ok, one step further.
I need to use save() to add the phone as 'contact' when I get a REGISTER I get now keepalive packets to the phone, but ... I need them also to the PBX.
I can not add the PBX as contact, because it does not register. I think there is no possibilty to add a manual entry in the usrloc memory.
How can I also send the keepalive packets to the PBX?
Interconnect with a SIP system that does not register is usually done with dispatcher module, which can send keepalives as well. Or if you want to do with static rule in kamailio.cfg, look at keepalive module, maybe you can build the solution you need.
Adding a manual entry in the usrloc is possibe via rpc or directly to db table (for db only mode).
Cheers, Daniel
-- EDNT GmbH Werner-von-Siemens-Strasse 7 64625 Bensheim www.ednt.de
Registergericht: Darmstadt Registernummer: 24972
Geschäftsführer: Karlheinz Knapp
Hello,
On 17.02.23 08:32, Bernd Krueger-Knauber wrote:
Hi,
The usrloc keepalive sends only via SIP OPTIONS.. Is this right? So it is not what I want
Do I need some usrloc settings?
Btw. I use kamailio 5.6
usrloc sends only SIP (OPTIONS) keepalives, if you want the 4-bytes UDP keepalive, that can be done with nathelper(+usrloc).
Cheers, Daniel
Thank you for your response!
Yes, I found this already.
But ... since I use kamailio as a transparent proxy I need to send also keepalives in the direction to the PBX. nathelper and usrloc only sends keepalive to 'saved' contacts from REGISTER messages. This works in the direction to the phone. But how can I also send keepalives to the PBX? The PBX never send REGISTER messages and I found no way to add an entry manually.
Any idea for that problem?
Unfortunately I use PJSIP at the phone and I can not send OPTIONS as keepalive.
Am 17.02.2023 um 12:16 schrieb Daniel-Constantin Mierla:
Hello,
On 17.02.23 08:32, Bernd Krueger-Knauber wrote:
Hi,
The usrloc keepalive sends only via SIP OPTIONS.. Is this right? So it is not what I want
Do I need some usrloc settings?
Btw. I use kamailio 5.6
usrloc sends only SIP (OPTIONS) keepalives, if you want the 4-bytes UDP keepalive, that can be done with nathelper(+usrloc).
Cheers, Daniel
Look at:
- https://www.kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.r.ad...
Cheers, Daniel
On 17.02.23 12:21, Bernd Krueger-Knauber wrote:
Thank you for your response!
Yes, I found this already.
But ... since I use kamailio as a transparent proxy I need to send also keepalives in the direction to the PBX. nathelper and usrloc only sends keepalive to 'saved' contacts from REGISTER messages. This works in the direction to the phone. But how can I also send keepalives to the PBX? The PBX never send REGISTER messages and I found no way to add an entry manually.
Any idea for that problem?
Unfortunately I use PJSIP at the phone and I can not send OPTIONS as keepalive.
Am 17.02.2023 um 12:16 schrieb Daniel-Constantin Mierla:
Hello,
On 17.02.23 08:32, Bernd Krueger-Knauber wrote:
Hi,
The usrloc keepalive sends only via SIP OPTIONS.. Is this right? So it is not what I want
Do I need some usrloc settings?
Btw. I use kamailio 5.6
usrloc sends only SIP (OPTIONS) keepalives, if you want the 4-bytes UDP keepalive, that can be done with nathelper(+usrloc).
Cheers, Daniel
-- EDNT GmbH Werner-von-Siemens-Strasse 7 64625 Bensheim www.ednt.de
Registergericht: Darmstadt Registernummer: 24972
Geschäftsführer: Karlheinz Knapp