I have been trying to accomplish a couple tasks with Kamailio over the past
month with no luck. What I need is a bit of one-on-one training with
someone who knows the lay of the land. If you do this kind of consulting
and can use Skype with possibly a shared-screen terminal, please drop me an
email with your rate.
Hi,
I am using kamailio (only one) as routing engine. I have 2 gateways. Both of
them sending calls to kamailio.
When i use the carrierroute module i need to change (and succeed) the user
($rU). But, i need to send the call (the invite) back to the gateway that
sent me the call from the beginning (it can be either one of those 2). So,
my problem is that i don’t want to rewrite the host in carrierroute, just
the user. If i leave the rewrite_host field empty, it is considered to be
"black list" and drops the call. If i rewrite the host, i can send the call
to the second gateway that was not the one that sent the call, and the call
drops as well.
any ideas how to use carrierroute for changing user only and send the invite
back to the gateway that originally sent the call?
Thanks,
Uri
Hello,
Kamailio version: 3.1.5
I have been trying to use presence for Event:Dialog. I have used PUA_Dialoginfo module to accomplish this task.
The PUA_dialoginfo module states that if "override_lifetime" is not used, the value of the expires is taken from dialog module.
I have tried the module without the "override_lifetime" which did not create the dialog in the presentity.
When used debug, I did see the xml being generated but finds the dialog "expires=0" and deletes the xml(please find the log below).
But when "override_lifetime" is set, the dialog in the presentity table is set until. But this has a problem,
modparam("pua_dialoginfo", "override_lifetime", 300)
1. if a call is still going on more than the override_lifetime the presentity is deleted.
2. the presentity information is available until the "override_lifetime" even after the call is hung-up.
How do I get this module working without the "override_lifetime" being used.
The Log:
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:242]: new_body:#012<?xml version="1.0"?>#012<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:user@mydemo.com">#012 <dialog id="112014dff048e71e" call-id="112014dff048e71e" direction="initiator">#012 <state>Trying</state>#012 <remote>#012 <identity>sip:user01@mydemo.com</identity>#012 <target uri="sip:user01@mydemo.com"/>#012 </remote>#012 <local>#012 <identity>sip:user@mydemo.com</identity>#012 <target uri="sip:user@mydemo.com"/>#012 </local>#012 </dialog>#012</dialog-info>#012
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:81]: freeing 1 columns
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:290]: publish uri= sip:user@mydemo.com
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[0] at 0x8314aa4
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: <core> [mem/q_malloc.c:366]: qm_malloc(0x829bee0, 756) called from pua_dialoginfo: dialog_publish.c: dialog_publish(302)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:428]: qm_free(0x829bee0, 0x8314aa4), called from <core>: db_res.c: db_free_columns(86)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: <core> [mem/q_malloc.c:406]: qm_malloc(0x829bee0, 756) returns address 0x82e84bc frag. 0x82e84a4 (size=900) on 1 -th hit
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:450]: qm_free: freeing frag. 0x8314a8c alloc'ed from db_mysql: km_res.c: db_mysql_get_columns(78)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:51]: publ:
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:94]: freeing result names at 0x8318650
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:52]: uri= sip:user@mydemo.com
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:428]: qm_free(0x829bee0, 0x8318650), called from <core>: db_res.c: db_free_columns(95)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:53]: id= DIALOG_PUBLISH.112014dff048e71e
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:450]: qm_free: freeing frag. 0x8318638 alloc'ed from <core>: db_res.c: db_allocate_columns(148)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua_dialoginfo [dialog_publish.c:54]: expires= 0
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:99]: freeing result types at 0x8318684
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [send_publish.c:403]: pres_uri=sip:user@mydemo.com
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:428]: qm_free(0x829bee0, 0x8318684), called from <core>: db_res.c: db_free_columns(100)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [hash.c:121]: core_hash= 504
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:450]: qm_free: freeing frag. 0x831866c alloc'ed from <core>: db_res.c: db_allocate_columns(157)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [hash.c:171]: record not found
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:54]: freeing 1 rows
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [send_publish.c:444]: insert type
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_row.c:97]: freeing row values at 0x8314b14
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [send_publish.c:448]: UPDATE_TYPE and no record found
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:428]: qm_free(0x829bee0, 0x8314b14), called from <core>: db_row.c: db_free_row(98)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: DEBUG: pua [send_publish.c:454]: request for a publish with expires 0 and no record found
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: <core> [mem/q_malloc.c:450]: qm_free: freeing frag. 0x8314afc alloc'ed from <core>: db_row.c: db_allocate_row(114)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3289]: <core> [mem/q_malloc.c:428]: qm_free(0x829bee0, 0x82e84bc), called from pua_dialoginfo: dialog_publish.c: dialog_publish(357)
Oct 21 12:12:46 SIPTest /usr/local/sbin/kamailio[3288]: DEBUG: <core> [db_res.c:62]: freeing rows at 0x8314adc
Regards
Gnaneshwar
Hello,
I used Kamailio+rtpproxy to record a session and rtpproxy outputs the
following files
long_file_name.a.rtp, long_file_name.a.rtcp, long_file_name.o.rtp,
long_file_name.o.rtcp
http://www.rtpproxy.org/wiki/RTPproxy/FAQ
From the Rtpproxy FAQ above, i tried to extract the audio using
rtpbreak and sox.
rtpbreak -W -r long_file_name.a.rtp
rtpbreak -W -r long_file_name.o.rtp
The above commands generate rtp.0.0.raw, rtp.1.0.raw.
Then when i run sox using
sox --combine merge -r 8k -A rtp.0.0.raw -r 8k -A rtp.1.0.raw -t wavpcm
-s out.wav i get the following errors :
sox: invalid option -- -
sox: -c must be given a number
Is there a switch/anything else that i am missing ?
Thanks in advance,
Regards,
Vikram.
This is continuation with limiting number of calls per Kamailio proxy
server.
I modified kamailio.cfg as below.
1. loadmodule "dialog.so"
2. modparam("dialog", "enable_stats", 1)
3. modparam("dialog", "dlg_flag", 4)
Next, as dialog module I can use either active_dialogs() or $DLG_count to
find number of calls present at any given point of time.
However if I use active_dialogs() I get parse error when I run kamailio
proxy.
Next I used $DLG_count , but always I am getting value of $DLG_count as 0.
In *route* section, I added code as below.
if (is_method("INVITE"))
{
if($DLG_count > 1)
{
sl_send_reply("503","RESOURCE UNAVAILABLE");
exit;
}
else
{
xlog("Dialog count = $DLG_count\n");
}
}
Everytime a new call starts , it prints $DLG_count as 0.
Kindly let me know whats going wrong here.
Regards
Austin
Hi All,
Just been doing some testing with Kamailio 3.2 and the dispatcher
module, and have some strange behaviour, can we confirm if it is
expected behaviour or a bug of some sort.
It appears that I can only set the dspatcher state via fifo command
once, and not reset it again, here is an example:
version: kamailio 3.2.0 (i386/linux) 94d3b8
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 94d3b8
compiled on 12:34:43 Oct 20 2011 with gcc 4.1.2
Here we start with the dispatcher list as it was pulled from the
database and currently loaded in memory.
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
Now I try to set one gateway inactive:
# kamctl fifo ds_set_state i 1 sip:1.1.1.1:10001
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=IX priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
All normal so far, now if I try to set the same gateway active again,
the state still stays inactive, i dont seem to be able to change the
state back to active. The same thing happens if I attempt to set this
state to disabled and then try to set it back to active afterwards. The
state does not change from what the first attempt was.
# kamctl fifo ds_set_state a 1 sip:1.1.1.1:10001
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=IX priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
Now I can try to set the state to inactive probing, that works.
# kamctl fifo ds_set_state ip 1 sip:1.1.1.1:10001
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=IP priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
Now if I try to disable the same destination:
# kamctl fifo ds_set_state d 1 sip:1.1.1.1:10001
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=IP priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
State still stays in Inactive/Probing mode.
Now if I try to set the same gateway to active/probing mode, I cant:
# kamctl fifo ds_set_state ap 1 sip:1.1.1.1:10001
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=IP priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
The only way for me to get the state back to active after the above is
to do a reload on the dispatch table:
# kamctl dispatcher reload
# kamctl dispatcher dump
SET_NO:: 2
SET:: 1
URI:: sip:1.1.1.1:10001 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10000 flags=AX priority=0 attrs=
SET:: 2
URI:: sip:1.1.1.1:10003 flags=AX priority=0 attrs=
URI:: sip:1.1.1.1:10002 flags=AX priority=0 attrs=
Is the dispatcher expected to behave as above?
I'm still trying to understand the different states assuming the
following options are set in the configuration file:
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "ds_probing_threshhold", 1)
modparam("dispatcher", "ds_probing_mode", 0)
AX = Active/No Probing
(*) Gateway is used in ds_select_*, ds_next_*
(*) No OPTIONS/INFO messages are sent to destination to check alive
state
This appears to be the normal operating state with no issues detected.
AP = Active/Probing
(*) Gateway is NOT used in ds_select_*, ds_next_*
(*) OPTIONS/INFO messages ARE sent to destination to check alive state
This appears to be the state taken when a gateway times out and
ds_mark_dst("p") is set in failure route, the gateway is "pinged" while
down and set into AX mode once a response is recieved.
IX = Inactive/No Probing
(*) Gateway is NOT used in ds_select_*, ds_next_*
(*) No OPTIONS/INFO messages sent to destination
This appears to be the state taken when a gateway times out and if
ds_mark_dst("i") is set in failure route, this gateway is set inactive
and no "pinging" is performed.
IP = Inactive/Probing
(*) Gateway is NOT used in ds_select_*, ds_next_*
(*) OPTIONS/INFO messages ARE sent to destination
I'm not sure when this state would be reached unless it is set by
fifo command. The ds_mark_dst function only allows "a","i" or "p". So
the probing method would only become active is ds_probing_mode = 1. In
my case it is 0, so I'm not sure if I would ever reach this state unless
I forced it. What would happen here is the gateway came back alive once
in "IP" state, would it go back to "AX" state?
DX = Disabled/No Probing
(*) Gateway is administratively set to down
This is where manual intervention has occured and the destination
has been set to administrativly down, for example, work being carried
out on the destination gateway.
All these states make sense, for the most part, I'm a little unsure of
how IP/IX is meant to work unless you manually set it to "inactive" in
your failure route.
The main concern though is the the fifo commands dont appear to be
working as expected, I can only set the state for a destination manually
once, and not again after that, unless I perform a dispatcher reload.
Has anyone else experienced this behaviour?
Any comments/suggestions explanations are most welcome.
Thanks
i made call sdp_keep_codecs_by_name("PCMU,PCMA,speex"); on an invite
request and it didn't keep speex although it was in the sdp:
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): sems 1 1 IN IP4 192.98.102.10
Session Name (s): sems
Connection Information (c): IN IP4 192.98.102.10
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 40000 RTP/AVP 101 102 8 0 3 2 9 96 97 98 99 100
Media Attribute (a): rtpmap:101 iLBC/8000
Media Attribute (a): rtpmap:102 speex/8000
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:3 GSM/8000
Media Attribute (a): rtpmap:2 G721/8000
Media Attribute (a): rtpmap:9 g722/8000
Media Attribute (a): rtpmap:96 telephone-event/8000
Media Attribute (a): rtpmap:97 G726-32/8000
Media Attribute (a): rtpmap:98 G726-24/8000
Media Attribute (a): rtpmap:99 G726-40/8000
Media Attribute (a): rtpmap:100 G726-16/8000
it is so that sdpops module does not support codecs, whose ids are
dynamic, but only codecs with static ids?
-- juha
Hi,
I am trying to enable the app_python module in Kamailio to run a simple python script externally parallel with Kamailio proxy,
While I try to load the module "app_python.so" in configuration file, the Kamailio server fails to start.. I can't see what is the problem ..
The steps, I am following are that:
- Script written in python saved in home directory.
- Loadmodule "app_python.so" statement in configuration file.
- Modparam("app_python", "script_name", "location of script")
- Python_exec("function", "parameters list") ..
I have also tried to check the Kamailio configuration option, It gives following warning,
0(2942) WARNING: <core> [sr_module.c:584]: /usr/local/lib64/kamailio/modules/app_python.so: exports dlflags interface is deprecated and it will not be supported in newer versions; consider using mod_register() instead
I am wandering if any one can please help in this matter, I shall be very thankful ..
With many thanks ..
Kind Regards,
Nasir
Muhammad Nasir Bhutta
Solutions Architect
Britannic Technologies Ltd
t: +44 1483 544812
f: +44 845 0501001
mbhutta(a)btlnet.co.uk<mailto:mbhutta@btlnet.co.uk>
www.btlnet.co.uk<http://www.btlnet.co.uk>
[cid:image001.jpg@01CC881F.1EA78300]<http://www.linkedin.com/company/britannic-technologies/products>[cid:image002.jpg@01CC881F.1EA78300]<http://www.twitter.com/BritannicTech>[cid:image003.jpg@01CC881F.1EA78300]<http://www.facebook.com/pages/Britannic-Technologies/202957249732198>[cid:image004.jpg@01CC881F.1EA78300]<http://www.youtube.com/user/BritannicTech>
________________________________
[cid:image007.jpg@01CC881F.4A995BF0]<http://www.btlnet.co.uk/>
Watch the Telegraph Business Club video about Britannic at our educational TV site - britannictech.tv<http://britannictech.tv>
Our 8th Annual Convergence Summit is being held at Silverstone on 17th November 2011. Book your place now<http://www.btlnet.co.uk/news--events/2011/convergence-summit-2011/register> and discover the world of Hosting and Cloud Services.
________________________________
This email and any files transmitted with it are confidential and intended for the addressee only. If you are not the intended recipient please notify the sender and delete this email. The views expressed in this email are personal, and do not constitute a commitment by Britannic Technologies Ltd unless specified by a separate, written agreement.
Registered Office: Britannic House, Merrow Business Park, Guildford, Surrey GU4 7WA. Registered in England no. 2090797.
________________________________