Hi I am trying to build the kamailio deb packages on ubuntu 12.04.
when I run make deb I get
dpkg-checkbuilddeps: Unmet build dependencies: libmono-dev
but libmono-dev is not available on 12.04 how do I
1. Fix the dependancy
2. Ignore it as I am not using app_mono (although I have an idea that may
in the future)
Thanks
Gareth
Hello,
I have a problem with my configuration file. When I receive a in-dialog
request (REINVITE) with topmost route being my kamailio server, it
enters in loop and then the call is dropped.
What is the easiest way to prevent this to happen?
Best Regards,
--
*Renan Capaverde*
/Estagiário Nível Superior/
/DDT - STE - Soluções em Tecnologia e Embarcados/
*DÍGITRO TECNOLOGIA*
*E-mail:* renan.capaverde(a)digitro.com.br
<mailto:renan.capaverde@digitro.com.br>
*Fone:* +55 48 3281-7000*Ramal:* 8132
*Fax:* +55 48 3281-7299
*Site:* www.digitro.com <http://www.digitro.com>
/"Antes de imprimir, pense na sua responsabilidade e no seu compromisso
com o meio ambiente"/
Esta mensagem, incluindo seus anexos, é reservada somente à Dígitro e ao
destinatário da mensagem. Caso você tenha recebido esta mensagem por
engano, queira por favor, retorná-la ao remetente e apagá-la de seus
arquivos.
Hello,
I have:
# Kamailio (OpenSER) SIP Server v3.3
# Kamailio (OpenSER) SIP Server v3.0
Defining pv in this format works well:
$fs = $(keepalive.socket($du));
Thanks a lot !!
Vito
Hi all, excuse the basic nature of my question, I'm just starting out.
I've read in a tutorial that it is possible to connect from asterisk to Kamailio and for asterisk to use the Kamailio db for authentication. However, I also read that it is possible to connect to astereisk from Kamailio for retrieving auth data.
My question is this... If Kamailio uses the db on a remote asterisk server to retrieve usernames and password info how do you set Kamailio to use multiple databases as you may ultimately have multiple asterisk servers? As far as I could see there is only 1 db typically in the config file.
Also, which is the most common configuration and why would one choose one over the other?
Thanks in advance.
On 24 January 2013 08:16, <sr-users-request(a)lists.sip-router.org> wrote:
> Send sr-users mailing list submissions to
> sr-users(a)lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-request(a)lists.sip-router.org
>
> You can reach the person managing the list at
> sr-users-owner(a)lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Asterisk and dispatcher (SamyGo)
> 2. Re: Asterisk and dispatcher (SamyGo)
> 3. Kamailio Multi tenant as registrar server ony (andrea mucci)
> 4. help me about siremis. (???)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 Jan 2013 22:26:26 -0800
> From: SamyGo <govoiper(a)gmail.com>
> Subject: Re: [SR-Users] Asterisk and dispatcher
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List" <sr-users(a)lists.sip-router.org>
> Message-ID:
> <
> CAJUJwtjjg+iGH6+QuDtRkEH+mn+dkiObUFcPyNMKTv-0xHnYMQ(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> You've metioned this already in your code:
>
> if(ds_is_from_list("1"))
>
> Is this not working for you?
>
> Regards,
> Sammy
>
>
>
> On Wed, Jan 23, 2013 at 10:44 AM, Ian French <fretec(a)gmail.com> wrote:
>
> > Hi,
> >> I've been working my way through this tutorial (
> >>
> http://kb.asipto.com/asterisk:realtime:kamailio-3.0.x-asterisk-1.6.2-astdb
> )
> >> and all it working well thanks. In the other benifits section you
> mention
> >> that this configuration can be used with multiple instances of Asterisk.
> >> I've configured my [TOASTERISK] route
> >
> >
> > route[TOASTERISK] {
> > ds_select_dst("1","4");
> > $sht(forw=>$ft)=$du;
> > sl_send_reply("100","Trying");
> > xlog("L_INFO","INVITE: INVITE [$tU] Passed to [$du] Asterisk
> > Cluster [$rm:$au].\n");
> > route(RELAY);
> > exit;
> >
> > How can i achieve the same for my [FROMASTERISK] route as now with
> >
> > asterisk.bindip = "x.x.x.x" desc "Asterisk IP Address"
> > asterisk.bindport = "5060" desc "Asterisk Port"
> >
> > and
> >
> > route[FROMASTERISK] {
> > if($si==$sel(cfg_get.asterisk.bindip)
> > && $sp==$sel(cfg_get.asterisk.bindport))
> > xlog("L_INFO","INVITE: INVITE Passed From [$fu] Asterisk
> > Cluster To [$rm:$au].\n");
> > return 1;
> > return -1;
> > }
> >
> > This allows calls only from cfg_get.asterisk.bindip (single gateway)
> where
> > I would like gateways in the dispatcher list to be selected and marked
> as a
> > positive match
> >
> > if(ds_is_from_list("1"))
> > $sht(forw=>$ft)=$si;
> > xlog("L_INFO","INVITE: INVITE Passed From [$fu] Asterisk
> > Cluster To [$rm:$au].\n");
> > return 1;
> > return -1;
> > }
> >
> > Can you help?
> >
> > Thanks in advance
> > Ian
> > _______________________________________________
> > 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
> >
> >
>
On Tuesday 29 January 2013 16:58:08 Paul Belanger wrote:
> > [kamailio]
> > host=192.168.1.1
> > context=incoming
> > type=friend
> > allow=all
> > qualify=yes
> > insecure=port,invite
> > nat=no
> > canreinvite=yes
> >
> > Nothing more to it.
>
> Thanks for pointing me in the right direction. Will provide feedback
> shortly.
One more thing I might have forgotten.
Asterisk needs to responde with a 200 OK to the OPTIONS requests in order for
Kamailio to think the dispatcher route is up and runnnig. So add an s exten in
the asterisk context:
[incoming]
exten => s,1,NoOp()
--
POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/ - http://www.sipo.nl/
K.v.K. Eindhoven 17097024
Hello, i'm trying to set BLF on my snom 320 phone to get notification on
function key for certain extension as well registered against kamailio.
Any other info i can provide except the following one and as well i want to
exuse me, as i'm pretty noob to all this, and my question might be silly,
but after hours in front of google i found no solution :)
I always get that:
after pua_set_publish() **
3(7825) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=791 a=16 n=if
3(7825) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=780 a=41 n=isflagset
3(7825) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=799 a=16 n=if
3(7825) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=791 a=25 n=save
3(7825) ERROR: pua [send_publish.c:578]: New PUBLISH and no body found-
invalid request
3(7825) ERROR: pua_usrloc [ul_publish.c:326]: while sending publish
3(7825) ERROR: pua_usrloc [ul_publish.c:327]: TEST: type &
UL_CONTACT_UPDATE is 2, and error is -1
(^^^ This line was added by me into module as i saw related thread and the
patch solution, though it never meets condition and fails to insert from
there as well.)
3(7825) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg]
l=799 a=2 n=exit
my configs are :
in BLF i set
<sip:666@SERV_IP;user=phone>
in cfg i have
alias="SERV_IP"
listen=udp:SERV_IP
port=5060
loadmodule "db_mysql.so"
loadmodule "mi_fifo.so"
loadmodule "kex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "mi_rpc.so"
loadmodule "acc.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "alias_db.so"
loadmodule "speeddial.so"
...
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "use_domain", MULTIDOMAIN)
...
modparam("presence", "db_url", DBURL)
modparam("presence", "subs_db_mode" , 3 )
#modparam("presence", "publ_cache", 0)
modparam("presence", "expires_offset", 300)
modparam("presence", "max_expires", 3600)
#modparam("presence", "force_active", 1)
modparam("presence", "db_update_period", 10)
modparam("presence", "server_address", "sip:SERV_IP:5060")
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("pua", "db_url" ,DBURL )
modparam("pua", "db_mode", 2)
modparam("pua", "db_table", "pua")
#modparam("pua", "outbound_proxy", "sip:SERV_IP")
modparam("pua", "min_expires", 10)
modparam("pua", "default_expires", 3600)
modparam("pua", "update_period", 60)
modparam("pua_usrloc", "default_domain", "SERV_IP")
request_route {
if(method=="NOTIFY")
{
xlog(" pua_update_contact $rm from $fu (IP:$si:$sp) \n");
if(!pua_update_contact())
xlog("pua update failed \n");
}
# per request initial checks
route(REQINIT);
# NAT detection
route(NATDETECT);
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
# handle requests within SIP dialogs
route(WITHINDLG);
### only initial requests (no To tag)
t_check_trans();
# authentication
route(AUTH);
route(SPEEDDIAL);
# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
record_route();
# account only INVITEs
if (is_method("INVITE"))
{
setflag(FLT_ACC); # do accounting
}
# dispatch requests to foreign domains
route(SIPOUT);
### requests for my local domains
# handle presence related requests
route(PRESENCE);
# handle registrations
route(REGISTRAR);
if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# dispatch destinations to PSTN
route(PSTN);
route(DISPATCH);
# user location service
route(LOCATION);
route(RELAY);
}
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|SUBSCRIBE")) {
t_on_branch("MANAGE_BRANCH");
t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
t_on_failure("MANAGE_FAILURE");
}
if (!t_relay()) {
sl_reply_error();
}
exit;
}
# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{
if($sht(ipban=>$si)!=$null)
{
# ip is already blocked
xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
exit;
}
if (!pike_check_req())
{
xlog("L_ALERT","ALERT: pike blocking $rm from $fu
(IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
exit;
}
}
#!endif
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if(!sanity_check("1511", "7"))
{
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}
# Handle requests within SIP dialogs
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
route(DLGURI);
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
else if ( is_method("ACK") ) {
# ACK is forwarded statelessy
route(NATMANAGE);
}
else if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and
discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}
# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER"))
{
xlog("pua_set_publish()\n");
if(!pua_set_publish())
xlog("set publish failed \n");
xlog(" after pua_set_publish()\n");
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
## setbflag(FLB_NATSIPPING);
}
#pua_set_publish();
if (!save("location"))
{
sl_reply_error();
xlog("save location failed \n");
}
exit;
}
}
# USER location service
route[LOCATION] {
#!ifdef WITH_SPEEDIAL
if(uri=~"sip:[0-9]{2}@.*")
xlog("speeddials\n");
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$")
if(sd_lookup("speed_dial"))
route(SIPOUT);
#!endif
#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases"))
route(SIPOUT);
#!endif
$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}
}
# Presence server route
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE"))
return;
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$")
sd_lookup("speed_dial");
route(SPEEDDIAL);
xlog("PUBLISH|SUBSCRIBE");
sl_send_reply("100","trying");
if (!t_newtran())
{
sl_reply_error();
exit;
};
append_to_reply("Contact: <sip:82.80.18.100:5060>\r\n");
if(is_method("PUBLISH"))
{
xlog("handle publish here\n");
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle subscribe here \n");
handle_subscribe();
t_release();
}
exit;
}
# Authentication route
route[AUTH] {
#!ifdef WITH_AUTH
#!ifdef WITH_IPAUTH
if((!is_method("REGISTER")) && allow_source_address())
{
# source IP allowed
return;
}
#!endif
if (is_method("REGISTER") || from_uri==myself)
{
# authenticate requests
if (!auth_check("$fd", "subscriber", "1")) {
auth_challenge("$fd", "0");
exit;
}
# user authenticated - remove auth header
if(!is_method("REGISTER|PUBLISH"))
consume_credentials();
}
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself)
{
sl_send_reply("403","Not relaying");
exit;
}
#!endif
return;
}
# Caller NAT detection route
route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
add_contact_alias();
}
setflag(FLT_NATS);
}
#!endif
return;
}
# RTPProxy control
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
rtpproxy_manage();
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
add_contact_alias();
}
}
#!endif
return;
}
# URI update for dialog requests
route[DLGURI] {
#!ifdef WITH_NAT
if(!isdsturiset()) {
handle_ruri_alias();
}
#!endif
return;
}
# Routing to foreign domains
route[SIPOUT] {
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
route(RELAY);
}
}
# PSTN GW routing
route[PSTN] {
.......
return;
}
# XMLRPC routing
route[XMLRPC] {
....
}
#!endif
# route to voicemail server
route[TOVOICEMAIL] {
......
return;
}
# manage outgoing branches
branch_route[MANAGE_BRANCH] {
xdbg("new branch [$T_branch_idx] to $ru\n");
route(NATMANAGE);
}
# manage incoming replies
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}
# manage failure routing cases
failure_route[MANAGE_FAILURE] {
route(NATMANAGE);
if (t_is_canceled()) {
exit;
}
#!ifdef WITH_BLOCK3XX
# block call redirect based on 3xx replies.
if (t_check_status("3[0-9][0-9]")) {
t_reply("404","Not found");
exit;
}
#!endif
}
route[SPEEDDIAL] {
.....
return;
}
....
Greetings gurus!
I'm playing with an idea to create a web based softphone (html5 + no
installations for the end user) and use Kamailio's websocket module
for backend. I'd love to hear about your comments, challenges and
successes using such configuration. Is it a feasible way to construct
a softphone even today when even IE9 does not support websockets, as
such? I'm sure IE9 will end up in specs as a must-support platform.
A collegue tried using sipml5 with webrtc against a SnomONE pbx (I
know... ;)), and said there's no way it can work, but I'm not
convinced the idea itself wouldn't work.
It would help me lots if I could make a simple example using Kamailio
with SIP over websockets, can you comment on how much effort do I need
on Kamailio side to make this work? Do I need off-default config
scripting, or is it enough to just set up the module and set the
parameters? And even with the risk of stepping a little off topic, if
anyone has worked on web based softphones, I'd love to hear if you can
recommend on how to approach this.
Cheers,
Pirjo
--
Greetings List,
First post of many. I've managed to get up a running a very simple
VoIP network with Kamailio as the core, and asterisk on the edge.
Most of this has been accomplished using the default kamailio.cfg file
shipped in 3.3.
For my next adventure, I'd like to start using the dispatch module to
route calls from Kamailio to asterisk, however having some trouble
getting my syntax correct. I was hoping somebody could point me to an
existing post / URL describing what I was asking, if it is based on
the default configuration file, the better.
I should note, if I have Asterisk register to kamailio, I can route
calls fine however, I believe the dispatcher is the better way to do
this.
--
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger(a)polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger