Hello All,
Is it possible to call functions in custom modules
say modules/my_module/my_file.c
if my_file.c has a function and want to access/call it from kamailio core
file
ie., which is under /root/kamailio-3.3.2/receive.c ??
If not possible,what is the way to access functions in custom modules.
Please do reply.
Thanks & Regards,
Manjusha A.
Integra Micro Software Services (P) Ltd.
Good evening.
Kamailio 3.2.2 and mediaproxy 2.5.2
We find a problem when using engage_media_proxy and dlg_manage on the same
kamailio.cfg (we loose one way audio)
is ther any issue with regard to this?
may be anything we're doing wrong?
any other easy way to control concurrent calls?
If
1.- we avoid dlg_manage with engage_media_proxy
or
2.- we use dlg_manage with "use_media_proxy/end_media_session"
every thing works fine.
Any idea will be helpful.
Thanks and best regards.
-----------------------------------------------------------------------------------------------------------------------------------
Eduardo Lejarreta
Good evening again.
Kamailio 3.2.2 and mediaproxy 2.5.2
An long-time issue for us:
kamctl restart stops mediaproxy audio.
is there anyway to avoid this?
Any idea will be helpful.
Thanks and best regards.
-----------------------------------------------------------------------------------------------------------------------------------
Eduardo Lejarreta
While not strictly Kamailio related this issue could certainly affect
some of you:
http://blog.krisk.org/2013/02/packets-of-death.html
I'm hearing initial reports that this issue is fairly widespread.
--
Kristian Kielhofner
On Tue, January 22, 2013 1:58 pm, 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. Modify IP address in SDP (Austin Einter)
> 2. Re: Modify IP address in SDP (Olle E. Johansson)
> 3. Problem with 4.0 nightlies and IMS - sem_post undefined
> (Barry Flanagan)
> 4. Patch to resolve segfault in json module (Richard Brady)
> 5. Re: Modify IP address in SDP (Austin Einter)
> 6. Re: Patch to resolve segfault in json module
> (Daniel-Constantin Mierla)
> 7. Re: [sr-dev] FOSDEM (Daniel Pocock)
>
>
>
> ----------------------------------------------------------------------
>
>
> Message: 1
> Date: Tue, 22 Jan 2013 18:37:13 +0530
> From: Austin Einter <austin.einter(a)gmail.com>
> Subject: [SR-Users] Modify IP address in SDP
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List" <sr-users(a)lists.sip-router.org>
> Message-ID:
> <CANXt1k--VtC6aYHGTBZ5GqF8n=66g5PVwG4YhOC_uefxpVYy=g(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Dear All
> When 200 OK to INVITE passes through Kamailio proxy , I want to change the
> IP address in SDP to a specific IP address.
>
>
> Can this be done by just modifying configuration files or do I need to
> modify in source code.
>
> In case I need to modify source code, which files I need to look at.
>
>
> Kindly provide pointers for said problem.
>
>
> Thanks
> Austin
Hello Austin,
1...I was doing similar one for my task.
Files : /root/kamailio-3.3.2/parser/sdp/sdp.h
sdp.h file has struct that holds ip address and port numbers of audio and
video.
Stucture: sdp_session_cell struct has member named str ip_addr will give
you ip address in sdp.
2...Yes you can edit existing code or else you can create your own 200ok
packet.I created my own 200OK and invite packets with sdp.
3...You can grab below ip address when kamailio proxy is about to forward
200OK to end client.File where you can find 200OK is
(though not sure but you can try this file edit existing 200OK):
/root/kamailio-3.3.2/modules/tm/t_reply.c
has below function
static int _reply( struct cell *trans, struct sip_msg* p_msg,
unsigned int code, char * text, int lock )
{
}
4...I did the following way to get ipaddr...and below piece of code you
can use it in the above function's body to edit 200OK's ip address::
char my_src_rtp_addr[8];
int my_src_rtp_addr_len=0;
struct sdp_session_cell *sdp_session;
if(0 != parse_sdp(p_msg))
{
LOG(L_INFO,"Unable to parse sdp\n");
}
sdp_session=get_sdp_session(p_msg,0);
if(sdp_session!=0){
my_src_rtp_addr_len=strlen(my_src_rtp_addr);
my_src_rtp_addr[my_src_rtp_addr_len]='\0';
my_src_rtp_addr[my_src_rtp_addr_len+1]='\0';
my_src_rtp_addr[my_src_rtp_addr_len+2]='\0';
my_src_rtp_addr[my_src_rtp_addr_len+3]='\0';
strncpy(my_src_rtp_addr,sdp_session->ip_addr.s,sdp_session->ip_addr.len);
}
If any questions,please let me know.
Thanks & Regards,
Manjusha A.
Integra Micro Software Services (P) Ltd.
Hi,
I use Kamailio for basic call setup with one exception where it has to route call to another server by seeing the domain name in the Request URI.
If the Request uri in the received INVITE message looks like "sip12345@video-conf", then it should route the INVITE request to the video-conf server by resolving the domain name. I changed the config file kamailio.cfg as given below.
route[SIPOUT] {
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
# AKS: call routing
if (uri=~".*@video-conf")
{
rewritehost("video-conf");
}
# AKS
route(RELAY);
}
}
It resolves the domain name and routes the INVITE message to the resolved IP address. However it uses the domain name in the Request line and To header and I need to replace domain with the resolved IP address in the Request URI and To header.
Now Request URI and To header look like "INVITE sip:12345@video-conf" and "To: <sip:12345:video-conf>" respectively and I need them as "INVITE sip:12345@video-conf" and "To: <sip:12345:video-conf>".
I don't have any knowledge in tweaking kamailio. I tried some tricks like the following by going through documents and pervious emails in the forum. But it didn't work. Some of them have spoken about avp and pseudo variables. But I am getting confused as I have just begun using Kamailio and it is vast.
# $ru = "sip:" + $rU + "@" + to_ip;
I will appreciate if you could help me or guide me in right direction.
Thanks,
Ajay
Hello i have two problems with module MSILO and text messages from SIP
client BRIA.
1. I can't send messages with m_dump.
I have installed Kamailio 3.3 in default configuration. I'm added
"m_dump("$fu")" to my config in route[REGISTRAR]. If i use client
CSipSimple for sending messages to offline user "333". i'm
receive notification message "*** User 333 offline!". Next i connect to
Kamailio with user "333" and i see in kamailio log what "m_dumt" trying to
send messages but can't because "request authorisation". How to disable
authorisation request, without leak security.
route[REGISTRAR] {
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
## setbflag(FLB_NATSIPPING);
}
if (!save("location"))
sl_reply_error();
if (m_dump("$fu"))
{
log("MSILO: offline messages dumped - if they were\n");
}
else
{
log("MSILO: no offline messages dumped\n");
}
exit;
}
}
When I used, last versions from git, I got error and crash of kamailo
using m_dump.
I got latest version from git, and I made one patch:
diff --git a/modules/msilo/msilo.c b/modules/msilo/msilo.c
index 209b309..4bda8fa 100644
--- a/modules/msilo/msilo.c
+++ b/modules/msilo/msilo.c
@@ -1125,8 +1125,16 @@ static int m_dump(struct sip_msg* msg, str* owner_s)
memcpy(tmp_extra_hdrs.s, extra_hdrs_str.s,
extra_hdrs_str.len);
memcpy(tmp_extra_hdrs.s+extra_hdrs_str.len,
str_vals[4].s, str_vals[4].len);
} else {
- tmp_extra_hdrs.len = 0;
- tmp_extra_hdrs.s = "";
+ tmp_extra_hdrs.len = 1;
+ if ((tmp_extra_hdrs.s = pkg_malloc(1)) == NULL)
+ {
+ LM_ERR("Out of pkg memory");
+ if (msilo_dbf.free_result(db_con, db_res) < 0)
+ LM_ERR("failed to free the
query result\n");
+ msg_list_set_flag(ml, mid, MS_MSG_ERRO);
+ goto error;
+ }
+ tmp_extra_hdrs.s[0]='\x0';
}
hdr_str.len = 1024;
if(m_build_headers(&hdr_str, str_vals[3] /*ctype*/,
The problem is:
tmp_extra_hdrs.s = "";
and consequent
pkg_free(tmp_extra_hdrs.s);
As I see, there are couple of ways to solve problem, one of them is
setting tmp_extra_hdrs.s = 0; but then we have warnings, or setting
tmp_extra_hdrs.s = 0;
and check before pkg_free, but pkg_free is used on couple of places.
I am not sure what is the best way to report bugs and offer patches.
Hi
we have developed the custom module which stores the registered users
in a file.now we are trying to remove the expired contacts using the
rtimer module.while saving the registered users to the file we also
store the expires values in static array.but when we try to
decrement the these values in a function called with the help of
rtimer module. the values used by this periodic function are not
modified ones but the initial which are zero. is it that we cant pass
the modified values of the global variables to the timed functions.
to get around this problem, we also registered the timer in our module
but got same results !!!!!!!
Please Help.
Thanks and regards .