Hi,
Supposed A call B in a non-NAT environment. How to let Kamailio to always
force A, B to use RTP proxy ?
--
Khoa Pham
HCMC University of Science
Faculty of Information Technology
Hi
I'm trying to integrate a (K) front end cluster with an Asterisk back end cluster and Asterisk RT (legacy system)
I've followed the recipe at http://kb.asipto.com/asterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb
(with one minor exception …)
if (from_uri!=myself && uri!=myself)
became
if (uri!=myself)
as with the original line in place we were able to spoof traffic from 3rd party sites and route out onto the PSTN (which I thought was bad) …
anyway …
The problem I'm seeing currently is that when a call is passed down a SIP trunk to an end user on the (K) platform we're losing the DNID
Asterisk delivers the call to SIP/account/DNID
(K) however just tries to deliver the call to DNID@domain which comes back as not found.
I've had limited success hand coding aliases into the alias_db however we're still missing the DNID info and having to scrape it from the SIP To field (with a) limited success and b) fears of a support nightmare if we try and move existing customers onto the new platform). If we were to do this for real I'd either have to modify usrloc or try some perl_exec magic I'm guessing … (although it might be possible with a view on the existing sql database … but I'd rather not have to do that if there is a simpler way)
I confess I'm struggling to get my head around the config and docs and hoped someone could point me in the right direction?
For legacy reasons Asterisk needs to be in the critical path on this particular build … what I'm looking for is a simple recipe and some helpful pointers on how to implement it that will allow enable me to swing (K) into the path between our end user SIP devices and the existing asterisk back ends without losing the ability to deliver hundreds of numbers down a single SIP trunk to a subscriber, and that doesn't require them to make any changes on their end as they will still see the equivalent of SIP:${DNID}@example.com arriving on their PBX
This should be simple, but I'm obviously missing something :)
Help and pointers gratefully received
--
Jon Morby
FidoNet - the internet made simple!
10 - 16 Tiller Road, London, E14 8PX
tel: 0845 004 3050 / fax: 0845 004 3051
Hi All,
So following a guide I have successfully setup Kamailio and FreeSwitch
together working as an SBC. SIP registration with Kamailio and using
FreeSwitch as the media server which in turn authenticates with users in
Kamailio. I have managed to pass calls between users etc.
So the next challenge is bolting 2 Asterisks servers behind this SBC and
load balancing the media. As the SBC will be public facing I also have to
consider NAT which I believe will be configured in FreeSwitch.
I have had some fantastic advice in the past so just interested to get
peoples views again.
Thanks.
--
Keith
Hi Govoiper
Free Memory on my server 2309 MB
total used free shared buffers
cached
Mem: 2795 486 2309 0 70
180
-/+ buffers/cache: 234 2561
Swap: 2927 0 2927
*Kamailio error:*
*
*
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start
failed
*tail -f /var/log/messages:*
Feb 12 23:41:28 localhost /usr/local/sbin/kamailio[4280]: INFO: <core>
[udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: db_mysql
[km_my_con.c:109]: driver error: Can't connect to MySQL server on
'192.168.1.170' (4)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: <core>
[db.c:320]: could not add connection to the pool
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: usrloc
[ul_mod.c:407]: child(1): failed to connect to database
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4281]: ERROR: <core>
[sr_module.c:896]: init_mod_child(): Error while initializing module usrloc
(/usr/local/lib64/kamailio/modules_k/usrloc.so)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: db_mysql
[km_my_con.c:109]: driver error: Can't connect to MySQL server on
'192.168.1.170' (4)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core>
[db.c:320]: could not add connection to the pool
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: auth_db
[authdb_mod.c:174]: unable to connect to the database
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core>
[sr_module.c:896]: init_mod_child(): Error while initializing module
auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: ERROR: <core>
[pt.c:350]: ERROR: fork_process(): init_child failed for process 3, pid
4283, "udp receiver child=2 sock=127.0.0.1:5060"
Feb 12 23:41:30 localhost /usr/local/sbin/kamailio[4283]: : <core>
[main.c:1625]: main_loop: Cannot fork
With Regards
N.Prakash
---------- Forwarded message ----------
> From: SamyGo <govoiper(a)gmail.com>
> Date: Tue, Feb 12, 2013 at 5:49 PM
> Subject: Re: [SR-Users] [sr-dev] openser db on an external mysql server
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
> Mailing List" <sr-users(a)lists.sip-router.org>
> Cc: Muhammad Shahzad <shaheryarkh(a)gmail.com>, sr-dev(a)lists.sip-router.org,
> Prabhakaran B <prabhakaran(a)tevatel.com>, Indu Priya <indu(a)tevatel.com>
>
>
> Hi Prakash,
>
> Please paste All ERROR appearing and Warnings when you start your
> kamailio. What is the free memory situation on your server ?
>
> Regards,
> Sammy
>
>
>
>
> On Tue, Feb 12, 2013 at 5:12 PM, Prakash N <prakash.n(a)tevatel.com> wrote:
>
>> Hi Muhammad,
>>
>> Yes, I have define Mysql on top in Kamailio.cfg
>>
>> DBURL "mysql://openser:openserrw@192.168.1.170/openser"
>>
>>
>> I have attached Kamailio.cfg ,please advice
>>
>> With Regards
>>
>> N.Prakash
>>
>>
>> On Tue, Feb 12, 2013 at 5:37 PM, Muhammad Shahzad <shaheryarkh(a)gmail.com>wrote:
>>
>>> What is your connection string in kamailio i.e. DBURL? Also make sure
>>> you have defined WITH_MYSQL on the top of kamailio.cfg to load necessary
>>> drivers.
>>>
>>> #!define WITH_MYSQL
>>>
>>> Thank you.
>>>
>>>
>>> On Tue, Feb 12, 2013 at 12:56 PM, Prakash N <prakash.n(a)tevatel.com>wrote:
>>>
>>>> Hi Shahzad ,
>>>>
>>>> It is not ,We can able to connect remote mysql ( please find
>>>> the detail below),moreover we can able create openser db from Kamailio
>>>> server to remote mysql server
>>>>
>>>> *Mysql server : 192.168.1.170*
>>>> *Kamailio server : 192.168.1.101*
>>>>
>>>>
>>>> *Mysql output :*
>>>> *
>>>> *
>>>> *mysql -u openser -h 192.168.1.170 -p*
>>>> Enter password:
>>>> Welcome to the MySQL monitor. Commands end with ; or \g.
>>>> Your MySQL connection id is 68
>>>> Server version: 5.1.67 Source distribution
>>>>
>>>> Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights
>>>> reserved.
>>>>
>>>> Oracle is a registered trademark of Oracle Corporation and/or its
>>>> affiliates. Other names may be trademarks of their respective
>>>> owners.
>>>>
>>>> Type 'help;' or '\h' for help. Type '\c' to clear the current input
>>>> statement.
>>>>
>>>> mysql>
>>>>
>>>> With Regards
>>>>
>>>> N.Prakash
>>>>
>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: Muhammad Shahzad <shaheryarkh(a)gmail.com>
>>>>> Date: Tue, Feb 12, 2013 at 5:16 PM
>>>>> Subject: Re: [sr-dev] [SR-Users] openser db on an external mysql server
>>>>> To: Development mailing list of the sip-router project <
>>>>> sr-dev(a)lists.sip-router.org>
>>>>> Cc: Daniel-Constantin Mierla <miconda(a)gmail.com>,
>>>>> sr-users(a)lists.sip-router.org, Indu Priya <indu(a)tevatel.com>,
>>>>> Prabhakaran B <prabhakaran(a)tevatel.com>
>>>>>
>>>>>
>>>>> Its not a Kamailio error, it is problem with connecting to mysql
>>>>> server. Error 4 means No MySQL Server Running On Specified Host.
>>>>>
>>>>> May be MySQL server is down or there is some firewall running or MySQL
>>>>> not listening on IP you specified.
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>> On Tue, Feb 12, 2013 at 12:11 PM, Prakash N <prakash.n(a)tevatel.com>wrote:
>>>>>
>>>>>> Dear Daniel,
>>>>>>
>>>>>> Thanks for your quick response
>>>>>>
>>>>>> We can able to create operseb db on remote mysql server ,but
>>>>>> Kamailio not getting start
>>>>>>
>>>>>> Error detail:
>>>>>>
>>>>>> ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to
>>>>>> MySQL server on '192.168.1.170' (4)
>>>>>> ERROR: <core> [db.c:32 0]: could not add connection to the pool
>>>>>> ERROR: auth_db [authdb _mod.c:174]: unable to connect to the database
>>>>>> ERROR: <core> [sr_modu le.c:896]: init_mod_child(): Error while
>>>>>> initializing module auth_db (/usr/local/lib64/kamailio/modules_k/auth_db.so)
>>>>>>
>>>>>>
>>>>>> I have attached my kamailo.cfg ( we followed Kamailio and
>>>>>> Asterisk real time installation) ,please advice
>>>>>>
>>>>>> With Regards
>>>>>>
>>>>>> N.Prakash
>>>>>>
>>>>>>>
>>>>>>> ---------- Forwarded message ----------
>>>>>>> From: Daniel-Constantin Mierla <miconda(a)gmail.com>
>>>>>>> Date: Tue, Feb 12, 2013 at 2:41 PM
>>>>>>> Subject: Re: [SR-Users] openser db on an external mysql server
>>>>>>> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
>>>>>>> Users Mailing List" <sr-users(a)lists.sip-router.org>,
>>>>>>> sr-dev(a)lists.sip-router.org, miconda(a)gmail.com
>>>>>>> Cc: Prabhakaran B <prabhakaran(a)tevatel.com>
>>>>>>>
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> kamailio database is created with:
>>>>>>>
>>>>>>> kamdbctl create
>>>>>>>
>>>>>>> the host of mysql server has to be specified in kamctlrc file via
>>>>>>> DBHOST variable - kamctlrc is located in same directory as kamailio.cfg.
>>>>>>>
>>>>>>> In kamailio.cfg, update the db_url value (or DBURL define) to
>>>>>>> reflect the mysql server host.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Daniel
>>>>>>>
>>>>>>>
>>>>>>> On 2/12/13 4:16 AM, Prakash N wrote:
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I am new this Kamailo ,ther is any step by step document to set
>>>>>>> up openser db on an external mysql server ?
>>>>>>>
>>>>>>> With Regards
>>>>>>>
>>>>>>> N.Prakash
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>>>>> Kamailio World Conference, April 16-17, 2013, Berlin
>>>>>>> - http://conference.kamailio.com -
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> sr-dev mailing list
>>>>>> sr-dev(a)lists.sip-router.org
>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Muhammad Shahzad
>>>>> -----------------------------------
>>>>> CISCO Rich Media Communication Specialist (CRMCS)
>>>>> CISCO Certified Network Associate (CCNA)
>>>>> Cell: +49 176 99 83 10 85
>>>>> MSN: shari_786pk(a)hotmail.com
>>>>> Email: shaheryarkh(a)googlemail.com
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Muhammad Shahzad
>>> -----------------------------------
>>> CISCO Rich Media Communication Specialist (CRMCS)
>>> CISCO Certified Network Associate (CCNA)
>>> Cell: +49 176 99 83 10 85
>>> MSN: shari_786pk(a)hotmail.com
>>> Email: shaheryarkh(a)googlemail.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,
the GIT master branch is again open for new development. Common testing
period of releasing v4.0.0 has ended, if you have pending commits or
personal branches to merge, you can go ahead. v4.0.0 will be released
out of newly created branch 4.0.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
- http://conference.kamailio.com -
Hi,
if I use append_hf() for adding my custom header to initial request, how I
can remove this header later ?
What I'm doing:
1) initial request: remove RPID header with remove_hf
2) initial request: add custom RPID header append_hf
3) after rerouting: in failure_route remove RPID header remove_hf
4) after rerouting: in failure_route add custom RPID header with append_hf
The result of this, are 2 RPID headers, because remove_hf did not catch
RPID header added in step 2, but I think the original one that was removed
already in step 1.
Thanks,
Mino
Hello,
the GIT branch 4.0 has been created to host the release series for
v4.0.x. It must take only bug fixes and documentation improvements
related to the features existing at this moment in the branch.
To get the branch locally, use:
git clone --depth 1 git://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 4.0 origin/4.0
To push the local commits on remote repository:
git push origin 4.0:4.0
Any fixes that have to get in the branch 4.0 should be committed first
in master branch and then cherry-picked in this branch, in order to be
able to track forgotten backports easier.
Testing for 4.0 went very good so far, in few days we will probably
sketch the path to the release day.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
- http://conference.kamailio.com -
Hi!
IMO the siremis CDR generation procedure is buggy:
CREATE PROCEDURE `kamailio_cdrs`()
DECLARE inv_cursor CURSOR FOR SELECT src_user, src_domain, dst_user,
dst_domain, dst_ouser, time, callid,from_tag, to_tag, src_ip
FROM acc
where method='INVITE' and cdr_id='0';
...
REPEAT
FETCH inv_cursor INTO v_src_user,
v_src_domain, v_dst_user, v_dst_domain,
v_dst_ouser, v_inv_time, v_callid, v_from_tag,
v_to_tag, v_src_ip;
IF NOT done THEN
SET bye_record = 0;
SELECT 1, time INTO bye_record, v_bye_time FROM acc WHERE
method='BYE' AND callid=v_callid AND
((from_tag=v_from_tag AND to_tag=v_to_tag)
OR (from_tag=v_to_tag AND to_tag=v_from_tag))
ORDER BY time ASC LIMIT 1;
IF bye_record = 1 THEN
INSERT INTO cdrs (src_username,src_domain,dst_username,
dst_domain,dst_ousername,call_start_time,
duration,sip_call_id,
sip_from_tag,sip_to_tag,src_ip,created) VALUES
(v_src_user, v_src_domain,v_dst_user,
v_dst_domain,v_dst_ouser,v_inv_time,
UNIX_TIMESTAMP(v_bye_time)-UNIX_TIMESTAMP(v_inv_time),
v_callid,v_from_tag,v_to_tag,v_src_ip,NOW());
UPDATE acc SET cdr_id=last_insert_id() WHERE callid=v_callid
AND from_tag=v_from_tag AND to_tag=v_to_tag;
END IF;
SET done = 0;
END IF;
UNTIL done END REPEAT;
...
1. The UPDATE query will not UPDATE BYE records which were sent from
CALLEE to CALLER. This can be easily fixed with:
UPDATE acc SET cdr_id=last_insert_id() WHERE callid=v_callid
AND ( (from_tag=v_from_tag AND to_tag=v_to_tag) OR
(to_tag=v_from_tag AND from_tag=v_to_tag) );
2. (minor) It does not consider reINVITEs. I know the default Kamailio
config does not account reINVITEs, but I think when reINVITEs are
accounted too, this can mess up the CDR generation.
regards
Klaus
hello,
we want to implement call transfer with opneser. but the fact is we have
not implemented any database and implemented own module for contact
storage. i tried using avpops module. but couldn't do
please suggest
Hi list,
I've been trying to get Kamailio using the geoip module to deny
traffic from countries not matching certain sources, but I'm unsure of how
to achieve this I've tried the below which failed. I'm trying to drop
requests outside say 2 countries "AA" or "BB"
geoip_match("$si", "src");
if($gip(src=>cc)!="AA" || $gip(src=>cc)!="BB") {
xlog("L_INFO","SIP message from prohibited source
$gip(src=>cc) (ip: $si)\n");
send_reply("403", "Forbidden");
exit;
} else {
xlog("L_INFO","SIP message from unprohibited source
$gip(src=>cc) (ip: $si)\n");
}
Can you tell me where I am wrong or how I can achieve this
Thanks in advance
Ian