Hi All,
I've had an 'interesting' weekend reading RFCs and playing with kamailio.
I'm making progress - however, I would be grateful for a little
clarification.
I have sorted out a very basic stateless redirect proxy (config file
below). I have cut it down to the absolute basic minimum - and it mostly
appears to do what I would expect it to do. It does allow me to call any
registered extension from my SIP softphone.
Problem 1: I have a Grandstream Budgetone 200, which will happily receive
calls, but will not initiate any. Looking at a ngrep, it is ignoring the
redirect, and sends out a flood of UDP INVITEs (also see below for details)
Question: Is this the fault of my configuration, or the Grandstream
behaving incorrectly?
Problem 2: I am having difficulty in working out which module and command I
require to perform a function. Could someone please indicate the INVITE
route in this file for a stateful proxy?
Many thanks,
Phil
---
## WARNING - DO NOT USE THIS IN A PRODUCTION SERVER. FOR TESTING & EDUCTION ONLY
debug=2
fork=no
log_stderror=yes
listen=192.168.1.254:5060
####### Modules Section ########
mpath="/usr/lib/kamailio/modules/"
loadmodule "pv.so"
loadmodule "sl.so"
loadmodule "usrloc"
modparam("usrloc", "db_mode", 0)
loadmodule "xlog.so"
loadmodule "registrar.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
if (!save("location")) {
xlog("L_ERR", "**REGISTER: save failed \n");
sl_reply_error();
} else {
xlog("L_NOTICE", " REGISTER rcvd $si:$sp \n");
};
};
if(method=="INVITE") {
lookup("location");
switch ($retcode) {
case -1:
case -3:
sl_send_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Not Found");
exit;
};
sl_send_reply("302","Redirect");
};
if(method=="PUBLISH" || method=="SUBSCRIBE"){
xlog("L_INFO","REJECTION. We do not process $rm requests. \n");
route(No);
};
}
route[No] {
sl_send_reply(503, "Service Unavailable");
}
---
U 2014/10/05 16:38:04.925388 192.168.123.16:5060 -> 192.168.123.254:5060
INVITE sip:105@192.168.123.10:58833;rinstance=0d82c786ca88f460;transport=UDP
SIP/2.0.
Via: SIP/2.0/UDP 192.168.123.16:5060;branch=z9hG4bKaf202530a743a053.
From: "01782478349" <sip:111@192.168.123.254
;user=phone>;tag=905632682e68e9b5.
To: <sip:105@192.168.123.10:58833;rinstance=0d82c786ca88f460;transport=UDP>.
Contact: <sip:111@192.168.123.16:5060;transport=udp;user=phone>.
Supported: replaces, timer, 100rel, path.
Session-Expires: 180.
Min-SE: 90.
Call-ID: 358a9652404b14ad(a)192.168.123.16.
CSeq: 63317 INVITE.
User-Agent: Grandstream BT200 1.1.6.32.
Max-Forwards: 70.
Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 407.
<...SNIP...>
U 2014/10/05 16:38:04.925895 192.168.123.254:5060 -> 192.168.123.16:5060
SIP/2.0 302 Redirect.
Via: SIP/2.0/UDP 192.168.123.16:5060
;branch=z9hG4bKaf202530a743a053;rport=5060.
From: "01782478349" <sip:111@192.168.123.254
;user=phone>;tag=905632682e68e9b5.
To: <sip:105@192.168.123.10:58833
;rinstance=0d82c786ca88f460;transport=UDP>;tag=71d9875c03b727cbe0217d2db6ac2a49.422e.
Call-ID: 358a9652404b14ad(a)192.168.123.16.
CSeq: 63317 INVITE.
Contact: <sip:105@192.168.123.10:58833
;rinstance=0d82c786ca88f460;transport=UDP>.
Server: My SIP Server.
Content-Length: 0.U 2014/10/05 16:38:04.954405 192.168.123.16:5060 ->
192.168.123.254:5060
ACK sip:105@192.168.123.10:58833;rinstance=0d82c786ca88f460;transport=UDP
SIP/2.0.
Via: SIP/2.0/UDP 192.168.123.16:5060;branch=z9hG4bKaf202530a743a053.
From: "01782478349" <sip:111@192.168.123.254
;user=phone>;tag=905632682e68e9b5.
To: <sip:105@192.168.123.10:58833
;rinstance=0d82c786ca88f460;transport=UDP>;tag=71d9875c03b727cbe0217d2db6ac2a49.422e.
Contact: <sip:111@192.168.123.16:5060;transport=udp;user=phone>.
Supported: path.
Call-ID: 358a9652404b14ad(a)192.168.123.16.
CSeq: 63317 ACK.
User-Agent: Grandstream BT200 1.1.6.32.
Max-Forwards: 70.
Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Length: 0.
.
U 2014/10/05 16:38:04.975398 192.168.123.16:5060 -> 192.168.123.254:5060
INVITE sip:105@192.168.123.10:58833;rinstance=0d82c786ca88f460;transport=UDP
SIP/2.0.
Via: SIP/2.0/UDP 192.168.123.16:5060;branch=z9hG4bKa55f284fa742ad32.
From: "01782478349" <sip:111@192.168.123.254
;user=phone>;tag=9a25392722276c54.
To: <sip:105@192.168.123.10:58833;rinstance=0d82c786ca88f460;transport=UDP>.
Contact: <sip:111@192.168.123.16:5060;transport=udp;user=phone>.
Supported: replaces, timer, 100rel, path.
Session-Expires: 180.
Min-SE: 90.
Call-ID: f2989990cfa8525c(a)192.168.123.16.
CSeq: 1445 INVITE.
User-Agent: Grandstream BT200 1.1.6.32.
Max-Forwards: 70.
Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK.
Content-Type: application/sdp.
Content-Length: 407.
.
.
. etc...
Hi,
I have one question about kamailio.
rtpproxy-ng is installed with kamailio. When client A initiates one call to client B, SDP in invite/200ok are rewritten, where ice candidates for rtpproxy-ng are added. Sometimes rtp packets are relayed through rtpproxy-ng, but in some cases rtp packets pass through route created by ICE algorithm.
How to set kamailio, then rtpproxy-ng is always used?
B.R.
andrew
Hi guys,
my provider is being a dick.
they do not accept doubango's
a=rtpmap:0 PCMU/8000/1
what they wanted was
a=rtpmap:0 PCMU/8000
is there a way of changing this on kamailio?
Kelvin Chua
Hi
I was wondering if any one had any advice or examples for me of how to get
a call to be routed to a subscribed softphone.
We have 2 boxes in our testing deployment, a load balancer / sbc and a call
processing box.
Calls come in to the sbc, and then are passed to the call processing box.
The call is analyzed and the branch uri is rewritten to a destination
address when applicable for the call (this is how we handle routing of
calls to certain numbers -- we do this utilizing custom code and a custom
db).
This works just fine when the destination sip uri is phone number (in which
case we do lcr) or if the destination goes to a remote address.
However when the destination is a subscriber:
sip:[subscriber_name]@[our_domain_name], the call is passed back to the
sbc, which passes it to the callprocessing box, back and forth until a too
many hops error occurs.
The subscriber I am trying to send the call too does show up under "kamctl
ul show".
I feel like there is something basic I must be missing here.
Does any one have any advice for me?
Thank you very much in advance.
All the best.
Will Ferrer
Hello!
I just got some kamailio servers working with websockets using jssip in my
clients and now I want to get the SIP Messages to better understand how it
flows between my servers.
I have enabled the "siptrace" module, and I can now save information on my
database, but the problem is that I can't read the SIP Messages there, as
it saves some strings in my database.
The SIP messages appears like this store in the sip_trace table:
\x41434b207369703a616c69636540656e74657270726973652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203137322e33312e34352e3139393b6272616e63683d7a39684734624b303537322e30363339656237323563616464373463313534633365663639626135643731332e300d0a4d61782d466f7277617264733a2036380d0a546f3a203c7369703a616c69636540656e74657270726973652e636f6d3e3b7461673d6c65673061356e6d62310d0a46726f6d3a203c7369703a626f6240656e74657270726973652e636f6d3e3b7461673d636d6e6b66766e6935680d0a43616c6c2d49443a20396f716e6c7369746e666c7166726765676f63740d0a435365713a20313233302041434b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
I am currently using postgres as my database, and to get this I just have:
- Define "WITH_SIP_TRACE" in the beginning of my configuration file:
#!KAMAILIO
#!define WITH_PGSQL
##!define WITH_DEBUG
#!define WITH_SIP_TRACE
- loadmodule:
#!ifdef WITH_SIP_TRACE
loadmodule "siptrace.so"
#!endif
- Configure SIP_TRACE params:
#!ifdef WITH_SIP_TRACE
# ---- sip_trace params ----
modparam("siptrace", "db_url", "postgres://kamailio:kamailiorw@localhost
/kamailio")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", 22)
#!endif
- Get the messages:
request_route {
sip_trace();
setflag(22);
route(REQINIT);
...
Does anyone knows if is there something wrong in this configuration, or
what can I do to fix this and have the SIP messages stored in my database?
Thanks!
*Bruno Emer*
Mobile: +55 11 96540-0044
email: brunoemer(a)gmail.com
<https://www.facebook.com/bruno.emer.5>
<https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
<https://twitter.com/brunoemer_>
<https://www.flickr.com/photos/122070309@N03/>
<http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
Only with rtpproxy.
On Fri, Oct 3, 2014 at 5:25 AM, Marino Mileti <marino.mileti(a)alice.it>
wrote:
> mohqueue module is also compatible with rtpproxy-ng or only with rtppoxy?
>
> Because during startup i've noticed this error:
> mohqueue : Unable to load rtpproxy_stream2uac
>
>
>
>
> >There was a typo in the parameter name. If you use default values, just
> remove the modparam.
> >Otherwise, I pushed the patches to master and 4.1 branches. So you would
> need to upgrade to latest git version.
> >Cheers,
> >Daniel
> >>On 02/10/14 10:15, Marino Mileti wrote:
> >>I don't need any IVR so I would like to try this module and following doc
> i've setup dbtable name parameters:
> >>modparam ("mohqueue", "db_qtable", "mohqueues")
> >>modparam ("mohqueue", "db_ctable", "mohcalls")
> >>but when start Kamailio says:
> >>ERROR: <core> [modparam.c:156]: set_mod_param_regex():
> set_mod_param_regex: parameter <db_qtable> of type <1> not found in module
> <mohqueue>
> >>What's wrong?
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> ---
> Questa e-mail è priva di virus e malware perché è attiva la protezione
> avast! Antivirus.
> http://www.avast.com
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
Hello,
we have preliminarily booked May 27-29, 2014 for the next Kamailio World
event, hosted again by FhG Fokus Institute in Berlin. It was really hard
to find a time frame during April and May 2015, because of different
dates for Catholic and Orthodox Easters, 1st of May as well as quite
some many public holidays in Germany.
I am writing to see if anyone is aware of any major blocker for that
time frame. Write me directly and we will see if anything can be done,
selected the best options based on constraints.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
I don't need any IVR so I would like to try this module and following doc i've setup dbtable name parameters:
modparam ("mohqueue", "db_qtable", "mohqueues")
modparam ("mohqueue", "db_ctable", "mohcalls")
but when start Kamailio says:
ERROR: <core> [modparam.c:156]: set_mod_param_regex(): set_mod_param_regex: parameter <db_qtable> of type <1> not found in module <mohqueue>
What's wrong?
----Messaggio originale----
Da: miconda(a)gmail.com
Data: 2-ott-2014 9.44
A: "Kamailio (SER) - Users Mailing List"<sr-users(a)lists.sip-router.org>, "Marino Mileti"<marino.mileti(a)alice.it>
Ogg: Re: [SR-Users] Kamailio & queue
Thats true if you need to answer and do some IVR, otherwise you can
hold the INVITE or other request (until it is cancelled or times
out).
Specific on a call queue, may worth checking the module:
- http://kamailio.org/docs/modules/stable/modules/mohqueue.html
Holding the invite in config file is possible with:
- t_suspend() and then the (index, label) identification of
transaction -- see tmx module
- add (index,label) to mqueue
- when the routing of invite has to be resumed, fetch from the queue
and do t_continue()
Cheers,
Daniel
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to try to
learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly firing out
REGISTER requests (I have turned off my asterisk server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I can see
what is going on.
I also have kamailio - giving me absolutely nothing. It's not complicated
config file. In fact it is the simplest I could do. However, it logs
nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}