I don't know what exactly happened in your case but if you don't have time
to investigate you can try cnxcc module [1] channel control to achieve the
same goal.
Take a look at the sample configuration file located in [2]
xlog("L_INFO", "Setting up channel based credit control");
$var(max_chan) = 2;
$var(retcode) = cnxcc_set_max_channels("$var(client)", "$var(max_chan)");
if ($var(retcode) == -1) {
xlog("Error setting up credit control");
return;
}
$var(count) = -1;
if (!cnxcc_get_channel_count("$var(client)", "$var(count)")) {
xlog("Error getting customer's channel count");
}
xlog("L_INFO", "CNXCC ROUTE: $var(client) has $var(count) call(s)");
if ($var(retcode) < -1) {
xlog("Too many channels for customer");
sl_send_reply(403, "Forbidden");
if (!cnxcc_terminate_all("$var(client)")) {
xlog("Error terminating customer's calls");
}
exit;
}
[1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html
[2] https://github.com/caruizdiaz/cnxcc/blob/master/example/kamailio-cnxcc.cfg
Regards,
Carlos
On Fri, Aug 23, 2013 at 5:16 AM, Gertjan Wolzak <g.wolzak(a)foize.com> wrote:
> ** **
>
> Goodmorning All,****
>
> ** **
>
> I use the following route to check for concurrent calls by the same user,
> if a concurrent call is tried it is not allowed.****
>
> ** **
>
> route[CONCURRENT]****
>
> {****
>
> xlog("SCRIPT: Conccurrent call check");****
>
> ** **
>
> if(!get_profile_size("caller","$fu","$avp(nrcalls)"))****
>
> {****
>
> sl_send_reply("403", "Call not matching profile");****
>
> exit;****
>
> }****
>
> xlog("SCRIPT: caller value for $fu is $avp(nrcalls)");****
>
> if($avp(nrcalls)>= 1)****
>
> {****
>
> sl_send_reply("403", "Active calls limit exceeded");****
>
> exit;****
>
> }****
>
> dlg_manage();****
>
> if(!set_dlg_profile("caller","$fu"))****
>
> {****
>
> sl_send_reply("500", "No new channels in this profile");**
> **
>
> exit;****
>
> }****
>
> ** **
>
> xlog("SCRIPT: caller value for $fu is now $avp(nrcalls)");****
>
> ** **
>
> }****
>
> ** **
>
> Now I had a situation where a user could not call because the
> get_profile_size for this user gave the value 1. So another call was not
> allowed.****
>
> But the user did not have a call active. As no dialogs were active,
> checked that.****
>
> ** **
>
> I assume there can be a lot of reasons why this happens, also I want to
> use the “I don’t want to know the cause” method to solve this.****
>
> ** **
>
> So I looked at the dialog module documentation, to see if I can just clear
> the profile size for this specific user.****
>
> ** **
>
> I wanted to use the profile_list_dlgs(8.6) to get the dialog details, then
> the dlg_terminate_dlg(8.4) to, you guessed it, terminate that dialog.****
>
> ** **
>
> But it’s not clear to me how I can give those commands….****
>
> ** **
>
> Is there a way to give those commands on the cli, if so can someone please
> write down some examples…****
>
> ** **
>
> Would be really appreciated.****
>
> ** **
>
> Rgds,****
>
> ** **
>
> Gertjan****
>
> ** **
>
> ** **
>
> _______________________________________________
> 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
>
>
--
Carlos
http://caruizdiaz.com
+595981146623
Hello,
I am testing mediaproxy-ng (running on CentOS 6 on Amazon EC2) for WebRTC
to non-WebRTC calls and I am getting one-way audio most (but not all) of
the time.
I always get audio in the WebRTC to non-WebRTC direction.
Has anybody had any experience of anything this?
I have checked the obvious (all the ports open in iptables and the Amazon
security groups). I know that the right (advertised) address is going into
the SDP.
I am getting an error message out of mediaproxy-ng a lot. But it is there
whether the audio works or not. The error I am seeing is: "Error
generating SRTP session keys".
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
Goodmorning All,
I use the following route to check for concurrent calls by the same user, if
a concurrent call is tried it is not allowed.
route[CONCURRENT]
{
xlog("SCRIPT: Conccurrent call check");
if(!get_profile_size("caller","$fu","$avp(nrcalls)"))
{
sl_send_reply("403", "Call not matching profile");
exit;
}
xlog("SCRIPT: caller value for $fu is $avp(nrcalls)");
if($avp(nrcalls)>= 1)
{
sl_send_reply("403", "Active calls limit exceeded");
exit;
}
dlg_manage();
if(!set_dlg_profile("caller","$fu"))
{
sl_send_reply("500", "No new channels in this profile");
exit;
}
xlog("SCRIPT: caller value for $fu is now $avp(nrcalls)");
}
Now I had a situation where a user could not call because the
get_profile_size for this user gave the value 1. So another call was not
allowed.
But the user did not have a call active. As no dialogs were active, checked
that.
I assume there can be a lot of reasons why this happens, also I want to use
the "I don't want to know the cause" method to solve this.
So I looked at the dialog module documentation, to see if I can just clear
the profile size for this specific user.
I wanted to use the profile_list_dlgs(8.6) to get the dialog details, then
the dlg_terminate_dlg(8.4) to, you guessed it, terminate that dialog.
But it's not clear to me how I can give those commands..
Is there a way to give those commands on the cli, if so can someone please
write down some examples.
Would be really appreciated.
Rgds,
Gertjan
Hello,
being asked for quite a while about this topic, I can give now more
details about if there is or is going to be any time soon Kamailio book.
We are just about to complete the 22nd chapter (over 280 A4 pages of
content), with 3-5 still planned to get in this edition. More details
about the content and structure can be found at:
* http://asipto.com/u/kab
For 'early adopters', the book might be available as soon as mid of
August, with the content at that time. They will get of course updated
versions until the book is completely finished. We hope to use a group
of such people for reviewing and feedback. I will follow up soon with
more information regarding pre-release selling.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Now I've got round this by calling rls_handle_subscribe($tu), if $tu is detected as a group uri. So $tu will be used as watcher_username to compare with the RL's user. Seems to work but not sure if this is the right way, i.e. is there a way of putting the group's RL under a special URL so that every other user can get its RL document?
Cheers,
Yufei
Message: 3
Date: Thu, 22 Aug 2013 11:53:07 +0100
From: Yufei Tao <yufei.tao(a)redembedded.com>
To: <sr-users(a)lists.sip-router.org>
Subject: [SR-Users] Subscribe to a common resource list
Message-ID: <5215ED93.7050704(a)redembedded.com>
Content-Type: text/plain; charset="ISO-8859-1"
Hi
I'm trying to work with RLS. Is there a way of allowing user1 and user2
to both subscribe to a common group of contacts, group.common? Seems
that each user can only subscribe to its own resource list and won't be
able to subscribe to other user's resource list.
For example, both user1 and user2's RLS services documents contain
resource-list pointing to group1's resource list, like this:
<?xml version='1.0' encoding='UTF-8'?>
<rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
xmlns="urn:ietf:params:xml:ns:rls-services">
<service uri='sip:group1@mydomain.com'>
<resource-list>http://mydomain.com:5060/xcap-root/resource-lists/users/group1/generallist.…
</resource-list>
<packages>
<package>presence</package>
</packages>
</service>
... ...
</rls-services>
The problem is the watcher_user in this case would be user1 or user2,
which is not 'group1' so the resource list document fails to be
retrieved. How can I allow user1 and user2 to retrieve group1's RL document?
Thank you!
Yufei
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
I am using avp_db_load to read certain values from usr_preferences table.
Since sqlops is more efficient / preferred over avp_db_query, I was wondering if this would also apply to avp_db_load ?
-dan
Hi All,
I'm having difficulties with the above module and can't see what I'm doing
wrong.
Config as follows:
modparam("db_cluster", "connection", "db01=>mysql://
> readwrite:password@db01.domain.com/kamailio")
> modparam("db_cluster", "connection", "db02=>mysql://
> readonly:password@db02.domain.com/kamailio")
> modparam("db_cluster", "cluster", "cls1=>db01=0s9s;db02=9s0s")
As you can see, there are two database servers - a master and a slave. I am
trying to force all read operations to the slave (db02) and all write
operations to the master (db01).
Unless I am missing the point, the above priorities should achieve the
desired effect. However, it seems to be going wrong somewhere as write
operations are being sent to the slave:
ERROR: db_mysql [km_dbase.c:122]: driver error on query: DELETE command
> denied to user 'readonly'@'x.x.x.x' for table 'location'
>
ERROR: db_mysql [km_dbase.c:122]: driver error on query: UPDATE command
> denied to user 'readonly'@'x.x.x.x' for table 'location'
> ERROR: db_mysql [km_dbase.c:122]: driver error on query: INSERT command
> denied to user 'readonly'@'x.x.x.x' for table 'location'
It is the same for all modules, by the way, not just usrloc. For each
module, I have db_url set to "cluster://cls1".
If I change the cluster definition to "cls1=>db01=9s9s;db02=0s0s", all
operations (read and write) are sent to db01 as expected.
Am I missing something here? Can anyone see what I may be doing wrong?
Many thanks,
Charles
--
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham
B7 4EJ.
Hello,
I'm using the UAC module to perform remote registrations. When an
incoming call comes in from one of the remote registrations I'm using
the following to route the call to the correct user:
if(uac_reg_lookup("$rU", "$ru")) {
lookup("location");
route(RELAY);
}
This works fine for routing the call to the local user but the "from
domain" still contains the IP address of the remote registrar. This
results in the caller ID being displayed along with the registrars IP
address.
I've been reading the documentation on the UAC module and it looks like
I should be using "uac_restore_from()" somewhere in the config to
restore the original "from domain". My thought was to do something like
this but it's not replacing the from domain:
if(uac_reg_lookup("$rU", "$ru")) {
uac_restore_from();
lookup("location");
route(RELAY);
}
I've got the following modparams set for UAC and RR:
modparam("rr", "append_fromtag", 1)
modparam("uac","restore_mode","auto")
I'm not sure if using uac_restore_from() is the way to accomplish this
or if I should be going about this differently.
Any help would be greatly appreciated.
Thanks,
Isaac
Hi Kamailians,
Can anyone on the list point me at a list of call flow scenarios I should
consider and test to be confident my proxy setup works properly.
I'm not looking at the moment for some sort of SIPit torture test, just a
sensible set of scenarios.
This is for my client side "outbound sip/rtp proxy"
I so far have thought about:
Ordinary outbound and inbound calls
Holding / unholding
"Blind" transfers
"Attended" transfers
mid-call reINVITEs (session timers?)
T.38
Subscriptions
In all cases with calls initially outbound or inbound, and doing the
hold/transfer at both ends.
Thanks,
Steve