Hi,
I am looking to get a complete kamailio.cfg file that I can use to set up a
voice termination system.
This system will only connect with peers making multiple
simultaneous calls, registering strictly via ip, accounting calls to sql
db, capable of multiple rate tables for the different peers, call control,
CDR tool and billing capable and call routing to multiple media servers.
I am willing to try to build this myself but at this time I do not even
understand why I need to use "record_route" or "t_precheck_trans" -- :)). I
am a lover of information and cannot find a simple enough text to help in
my kamailio journey -- unlike asterisk.
If you are interested please respond to me directly at edo.ekunwe(a)gmail.com
and I am willing to pay for this information or guidance(if you have the
patience and time to mentor me).
Thanks
--
-----
Nogie Ekunwe
Hello,
I'm facing to some challenge in my learning process and using Kamalio as MS Teams SBC,
the request I receive from MS Teams seems to be correct but I need to overwrite the Original Domain, which is the FQDN of Kamailio itself, to another domain name:
INVITE sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone;transport=tls SIP/2.0Record-Route: <sip:155.138.140.233;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541>Record-Route: <sip:155.138.140.233:5061;transport=tls;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541>FROM: Victor Velo<sip:+14507001777@sip.pstnhub.microsoft.com:5061;user=phone>;tag=3e2ca0c5d0da4335b121f205a6f20541TO: <sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone>
rewrite to:
INVITE sip:+15142144069@dev-sbc.openfabrik.com:5061;user=phone;transport=tls SIP/2.0Record-Route: <sip:155.138.140.233;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541>Record-Route: <sip:155.138.140.233:5061;transport=tls;r2=on;lr=on;ftag=3e2ca0c5d0da4335b121f205a6f20541>FROM: Victor Velo<sip:+14507001777@sip.pstnhub.microsoft.com:5061;user=phone>;tag=3e2ca0c5d0da4335b121f205a6f20541TO: <sip:+15142144069@dev.myinternaldomain.openfabrik.com:5061;user=phone>
What would the best why to achieve this rewriting?
Thanks,
Victor
Hello,
I saw there are some topics on this already and carefully walked through
all of them, but can't solve following issue.
For a reason I do need that in Record-Route header sent to endpoint
would present FQDN. If it matters, it's UDP/WSS conversion done on Kamailio.
So, scheme is quite simple
Enpoint A ->UDP-> Kamailio ->WSS-> Endpoint B (NAT)
Main issue here, that if in Record-Route headers it's FQDN, but not IP
addresses, on a new transactions with a dialog (ACK on 200, PRACK, BYE),
Kamailio*loose_route()* function resolves address of destination not
current dialog, but actual R-URI (or itself, if R-URI is something from
WebRTC world) that is not correct due to NAT.
If in RR headers IP addresses are present - all is working as expected.
As an example (RR with FQDN)
B answers 200
SIP/2.0 200 OK
Record-Route:
<sip:KAMAILIO_FQDN:8089;transport=ws;r2=on;lr=on;ftag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d;nat=wss>
Record-Route:
<sip:KAMAILIO_FQDN;r2=on;lr=on;ftag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d;nat=wss>
Via: SIP/2.0/UDP <A_IP_ADDRESS>:5060;received=A IP
ADDRESS;rport=5060;branch=z9hG4bKPj67fb6d86-97d7-4231-995b-e54b0f62881e
To: <sip:88290@<KAMAILIO_FQDN>>;tag=hvra7mj3q0
From:
<sip:+XXXX7688881@<KAMAILIO_FQDN>>;tag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d
Call-ID: 46f44741-d155-4dd5-8fd8-78e540fc1acb
CSeq: 18326 INVITE
Contact: <sip:88290@toleivu2gdbh.invalid;transport=wss>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
Content-Type: application/sdp
Content-Length: 817
ACK looks like
ACK sip:88290@toleivu2gdbh.invalid;transport=wss SIP/2.0
Via: SIP/2.0/UDP
A_IP_ADDRESS:5060;rport;branch=z9hG4bKPj8d05548a-91ef-4332-8617-32f8eeebf8f2
From: <sip:88881@A_IP_ADDRESS>;tag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d
To: <sip:88290@KAMAILIO_FQDN>;tag=hvra7mj3q0
Call-ID: 46f44741-d155-4dd5-8fd8-78e540fc1acb
CSeq: 18326 ACK
Route: <sip:FQDN;lr;r2=on;ftag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d;nat=wss>
Route:
<sip:FQDN:8089;transport=ws;lr;r2=on;ftag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d;nat=wss>
Max-Forwards: 70
User-Agent: Asterisk PBX 13.33.0
Content-Length: 0
And Kamailio on *loose_route()* loops ACK to itself. (with result of
function == 1)
In a case if in Record-Route/Route headers just IP address of Kamailio
present, all works as expected, but it's not really behavior I want to
achieve.
I've tried to play with *record_route_preset("...")* specifying only WSS
part (as suggested in https://skalatan.de/de/blog/kamailio-sbc-teams)
with FQDN, but no luck.
Also wanted to try approach using record_route_preset() function in
branch route, but it was working only with first branch, not affecting
others (but I assume having different RR headers across branches is not
a good idea)
--
Regards,
Igor
Hi all,
I'm currently adding a feature to our Kamailio configuration to fork calls
based on user agent.
To do so I'm getting the registered endpoints with reg_fetch_contacts()
iterating through and matching on them, then using seturi() /
append_branch() and setting the dst-uri and flags as required.
However, calls are intermittently going to the wrong TCP connection,
despite the logs showing the correct destination IP and port in the ONSEND
route.
Looking in the location table I can see each registration has a
connection_id, and the debug log indicates it's finding the connection by
ID:
DEBUG: <core> [core/tcp_main.c:1651]: _tcpconn_find(): found connection by
id: 3
Is there a way to set the conid per branch? Is it necessary?
We're using kamailio 5.3.3 on Debian 10.
Thanks
Matthew
Greetings,
I would like to know if it is possible to get the value of $DLG_lifetime
before the BYE hits loose_route().
opensips provides a similar function which lets you get dialog life.
https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_load_dialog_c…
But i could not get the same from kamailio or maybe kamailio has a better
way for this?
Thanks for any pointer.
Ryan
Hello all
using kamailio version 5.4.4, we are seeing some errors like
CRITICAL: dialog [dlg_hash.c:1205]: next_state_dlg(): bogus event 3 in
state 5 (with BYE) for dlg 0x7f6ca2304b48 [15135:39671] with clid
'00463385_20210512_002_HPRA_1.1.4.40.sp3_7532_0_54533900281' and tags
'Out-55089-0000000CB27947F9' '170cB11c48vmj'
which seem to be generated when we receive a BYE from the remote UA but we
were expecting an ACK also,
For example
INVITE ---------->
<---------------183
<---------------200
BYE ------------->
(no ACK)
<--------------200
<--------------200
....
so the b2bua (freeswitch) keeps retransmitting the 200ok, and on each 200ok
retransmission we are getting this type of message.
These seem to be like race conditions since 200/BYE flow almost at the same
time, and as I understand, the UA should send the ACK.
But my doubt is if these errors can be harmful for the kamailio or they can
be ignored and address the issue to the remote UA on each case
thanks a lot and regards
david
--
<http://www.sonoc.io/>
David Escartín
NOC engineer
*www.sonoc.io* <http://www.sonoc.io/>
[image: LinkedIn] <https://www.linkedin.com/company/sonoc>
[image: Twitter] <https://twitter.com/sonoc_>
[image: Facebook] <https://www.facebook.com/SONOCio/>
This e-mail is for the exclusive use of its recipients and may contain
business secrets or other confidential or privileged information. Any
unauthorised use, copying, publication or distribution of this e-mail is
strictly prohibited. If you are not the intended recipient, please inform
us immediately by replying to this e-mail and delete it, including any
attachments or copies on your system.
In accordance with the GDPR (EU) 2016/679 and the LOPDGDD 3/2018, we inform
you that this e-mail address and/or any other personal data you have
provided us with will be treated by SONOC with absolute confidentiality and
with the only purpose of providing you with the requested services, due to
your condition as a client, supplier or because you have requested
information from us at any time. These data will only be kept for as long
as required to comply with legal obligations. You can exercise your rights
at any time by sending an e-mail to: *dataprotection(a)sonoc.io*
<dataprotection(a)sonoc.io>*.* <dataprotection(a)sonoc.io>
Hello!
I am trying to config one kamailio as reverse proxy for a bunch of internal
(no internet address) separate asterisk sip instances (per domain). The
kamailio server would be the only with the valid IP address, so would use
rtpengine to force to be in the media path.
Like this scenario:
https://opensips.org/pipermail/users/2020-August/043610.html
I have used as starting point this very basic config:
https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-reques…
Basically just added rtpproxy support, and voilà, inter-SIP is
working, media always passing into the proxy.
The problem: I would have WebRTC phones connecting too. I tried setting WSS
up in kamailio, and asterisk (pjsip) wouldn't know how to send the message
to the proxy: on register it has trasnport=wss in the contact: header,
looks like it is confusing the asterisk.
So, I resort for the wisdom of the list :) What would be the good-best-path
to take here, hack the header, or put the webphones registering directly on
the asterisks (with a nginx reverse proxy maybe)?
Someone must have already made a blog with such setup, but I could not
google-unearth it at least until now.
Regards,
--
Eliphas