Re: [SR-Users] Subscribe to a common resource list

2013-08-23 Thread Yufei Tao
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 
To: 
Subject: [SR-Users] Subscribe to a common resource list
Message-ID: <5215ed93.7050...@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:





http://mydomain.com:5060/xcap-root/resource-lists/users/group1/generallist.xml/~~/resource-lists/list%5b@name=%22group-auto%22%5d
  

presence


... ...


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

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Admin Book

2013-08-23 Thread Adnan
Hi Daniel,

Here is some feedback based on my 5 min TOC overview:

1. Although the book refers to a particular version of kamailio but as we
know from 4.0.3, sercmd has been replaced by kamcmd and this could
potentially become a cause for confusion for some readers since the chapter
titled Kamailio tools has the following section which constantly refers to
sercmd.


2. If I was the author of the book, I would definitely add a bit about
webrtc and websockets. At least I would like to see these two words in the
TOC and perhaps one or two page description of what kamailio 's websockets
module could do and if you have any future work planned.

3. ser/kamailio has a distinct role to play in the IMS test beds that I
have seen in labs. of various telecom vendors but the book TOC apparently
makes no reference to Kamailio's IMS capabilities. I think now there are a
lot more IMS modules as compared to few years back when there was only ser
based openimscore. It would be a bit unfair to miss this key contribution.

Cheers,
Adnan



On Thu, Aug 22, 2013 at 10:12 PM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

>  Polishing and finishing the acc chapter took more than expected, combined
> with some travelings in my side. Hopefully next week we can provide more
> exact details about availability.
>
> Cheers,
> Daniel
>
>
> On 8/22/13 8:28 PM, Isaac McDonald wrote:
>
> I look forward to buying the pre-release. I'll keep an eye on the list.
>
> Thanks!
>
> On 8/7/2013 11:34 AM, Daniel-Constantin Mierla wrote:
>
> 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
>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@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
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] hanging active dialog...

2013-08-23 Thread Gertjan Wolzak
 

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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Steve Davies
On 23 August 2013 08:13, Steve Davies  wrote:

> Here's all that is said about return codes from t_relay in the 4.0.x
> module documentation  (
> http://kamailio.org/docs/modules/4.0.x/modules/tm.html#t_relay).  Looks
> like there are docs that I didn't find?
>
>   "Returns a negative value on failure -- you may still want to send a
>> negative reply upstream statelessly not to leave upstream UAC in lurch."
>
>
>
> All the examples about re-routing calls are all about doing append_route
> out of the to_on_failure route.  Which works beautifully for "soft"
> failures etc.  Seems a shame this exception must be done differently?
>
>
Hi Olle,

Here's what I put in RELAY route block:

$var(rr) = t_relay();

xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr)\n");

if (!$var(rr)) {

sl_reply_error();

}



In 4.0.3, t_relay gives a -1 in the case that there is a physical network
issue (in my test I have a "-j DROP" iptables rule)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:569]: _dns_hash_find(): dns_hash_find(_sip._
udp.vc2.connection-telecom.com(36), 33), h=940

Aug 23 10:41:02 ubuntu voipmonitor[1935]: packetbuffer interface: datalink
number [0] is not supported

Aug 23 10:41:02  voipmonitor[1935]: last message repeated 17 times

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[resolve.c:757]: get_record(): get_record: lookup(_sip._
udp.vc2.connection-telecom.com, 33) failed

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(_sip._
udp.vc2.connection-telecom.com, 3

3, 60, 1)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding _sip._
udp.vc2.connection-telecom.com(36) 33 (flag

s=1) at 940

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:569]: _dns_hash_find(): dns_hash_find(
vc2.connection-telecom.com(26), 1), h=1021

Aug 23 10:41:02 ubuntu voipmonitor[1935]: packetbuffer interface: datalink
number [0] is not supported

Aug 23 10:41:02  voipmonitor[1935]: last message repeated 3 times

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[resolve.c:954]: get_record(): get_record: skipping 0 NS (p=0x82b143c,
end=0x82b143c)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[resolve.c:970]: get_record(): get_record: parsing 0 ARs (p=0x82b143c,
end=0x82b143c)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:1779]: dns_get_related(): dns_get_related(0xb2f5cd68 (
vc2.connection-telecom.com, 1), 1, *(nil

)) (0)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[dns_cache.c:872]: dns_cache_add_unsafe(): dns_cache_add: adding
vc2.connection-telecom.com(26) 1 (flags=0)

 at 1021

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[forward.c:213]: get_out_socket(): DEBUG: get_out_socket: socket
determined: 0xb716bae8

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: 
[msg_translator.c:206]: check_via_address():
check_via_address(172.16.230.1, 172.16.230.1, 0)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: ERROR: 
[udp_server.c:611]: udp_send(): ERROR: udp_send:
sendto(sock,0xb2f5cdd8,1099,0,41.221.230.60:5060,16): Oper

ation not permitted(1)

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: ERROR: tm
[../../forward.h:196]: msg_send(): msg_send: ERROR: udp_send failed

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: tm
[t_fwd.c:1369]: t_send_branch(): t_send_branch: send to
41.221.230.60:5060(1) failed

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: ERROR: tm
[t_fwd.c:1387]: t_send_branch(): ERROR: t_send_branch: sending request on
branch 0 failed

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: tm
[t_funcs.c:357]: t_relay_to(): ERROR:tm:t_relay_to:  t_forward_nonack
returned error

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: DEBUG: tm
[t_funcs.c:365]: t_relay_to(): -477 error reply generation delayed

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: ERROR: *** cfgtrace:
c=[/usr/local/etc/kamailio/kamailio.cfg] l=560 a=26 n=xlog

Aug 23 10:41:02 ubuntu /usr/local/sbin/kamailio[7136]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Steve Davies
On 23 August 2013 11:18, Steve Davies  wrote:

> Here's what I put in RELAY route block:
>
> $var(rr) = t_relay();
>
> xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr)\n");
>
> if (!$var(rr)) {
>
> sl_reply_error();
>
> }
>
>
>
> In 4.0.3, t_relay gives a -1 in the case that there is a physical network
> issue (in my test I have a "-j DROP" iptables rule)
>
>
Trying to find a way to detect the case where t_relay fails but doesn't
call the failure block.  I dumped some hopeful looking pseudo variables,
and tried to use an avp to communicate from the failure branch back to the
relay point.

I tried this:

$avp(senttoast) = 0;
$var(rr) = t_relay();
xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr) err.rcode
is $err.rcode t_r_c is $T_reply_code sent = $avp(senttoast)\n");
if ($var(rr) < 0) {
sl_reply_error();
}

and in my failure block I set $avp(senttoast) to 1.


I get:

Aug 23 12:07:02 ubuntu /usr/local/sbin/kamailio[7819]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla

Hello,

it seems that the flag not to generate the internal reply was lost when 
adopting the new ser tm module.


Can you try the attached patch on 4.0.x?

Once applied and kamailio reinstalled, before t_relay() use:

t_disable_internal_reply();

An the return code should be -4 in this case.

Let me know if works and I will push the fixes in the git repo, with 
updates to docs.


Cheers,
Daniel

On 8/23/13 12:13 PM, Steve Davies wrote:




On 23 August 2013 11:18, Steve Davies > wrote:


Here's what I put in RELAY route block:

$var(rr) = t_relay();

  xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr)\n");

  if (!$var(rr)) {

  sl_reply_error();

  }



In 4.0.3, t_relay gives a -1 in the case that there is a physical
network issue (in my test I have a "-j DROP" iptables rule)


Trying to find a way to detect the case where t_relay fails but 
doesn't call the failure block.  I dumped some hopeful looking pseudo 
variables, and tried to use an avp to communicate from the failure 
branch back to the relay point.


I tried this:

$avp(senttoast) = 0;
$var(rr) = t_relay();
xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr) 
err.rcode is $err.rcode t_r_c is $T_reply_code sent = $avp(senttoast)\n");

if ($var(rr) < 0) {
sl_reply_error();
}

and in my failure block I set $avp(senttoast) to 1.


I get:

Aug 23 12:07:02 ubuntu /usr/local/sbin/kamailio[7819]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla


On 8/23/13 12:20 PM, Daniel-Constantin Mierla wrote:

Hello,

it seems that the flag not to generate the internal reply was lost 
when adopting the new ser tm module.


Can you try the attached patch on 4.0.x?

Once applied and kamailio reinstalled, before t_relay() use:

t_disable_internal_reply();


correction for the above line, the function name is:

t_set_disable_internal_reply();

Daniel



An the return code should be -4 in this case.

Let me know if works and I will push the fixes in the git repo, with 
updates to docs.


Cheers,
Daniel

On 8/23/13 12:13 PM, Steve Davies wrote:




On 23 August 2013 11:18, Steve Davies > wrote:


Here's what I put in RELAY route block:

$var(rr) = t_relay();

  xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr)\n");

  if (!$var(rr)) {

  sl_reply_error();

  }



In 4.0.3, t_relay gives a -1 in the case that there is a physical
network issue (in my test I have a "-j DROP" iptables rule)


Trying to find a way to detect the case where t_relay fails but 
doesn't call the failure block.  I dumped some hopeful looking pseudo 
variables, and tried to use an avp to communicate from the failure 
branch back to the relay point.


I tried this:

$avp(senttoast) = 0;
$var(rr) = t_relay();
xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr) 
err.rcode is $err.rcode t_r_c is $T_reply_code sent = 
$avp(senttoast)\n");

if ($var(rr) < 0) {
sl_reply_error();
}

and in my failure block I set $avp(senttoast) to 1.


I get:

Aug 23 12:07:02 ubuntu /usr/local/sbin/kamailio[7819]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Steve Davies
On 23 August 2013 12:22, Daniel-Constantin Mierla  wrote:

> correction for the above line, the function name is:
>
> t_set_disable_internal_reply();
>

I can't get the parser to agree its valid:

 0(29626) DEBUG:  [sr_module.c:680]: find_mod_export_record():
find_export_record:  not found
 0(29626) DEBUG:  [sr_module.c:680]: find_mod_export_record():
find_export_record:  not found
 0(29626) ERROR:  [cfg.y:3431]: yyparse(): cfg. parser: failed to
find command t_set_disable_internal_reply
 0(29626) :  [cfg.y:3570]: yyerror_at(): parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 560, column 31: unknown command,
missing loadmodule?

It is there in the tm.so binary:

# strings /usr/local/lib/kamailio/modules/tm.so | grep
t_set_disable_internal_reply
t_set_disable_internal_reply

I applied the patch, did make clean, make all, make install, restarted
Kamailio.

Then tried "make group_include="standard standard-dep stable experimental"
all" and make install.

I looked at the code and I can't see how its different from other functions
that do work.

Feel stupid ...

Steve
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] mediaproxy-ng one-way audio (but not all the time)

2013-08-23 Thread Richard Fuchs

(Posting the follow-up of our off-list discussion for completeness)

On 08/22/13 10:36, Peter Dunkley wrote:


I think (but I need to do more testing) the one way audio was related to
early media and some issues with the media gateway I am using (which was
generating the early media).  Removing the body from 18[03] responses
(and converting 183 responses to 180) seems to have made the problem
much better.

However, I am still getting lots of "Error generating SRTP session keys"
and occasional "Error generating SRTCP session keys" errors for every call.


The early media would indeed be responsible for the error messages you
see... SRTP uses asymmetric encryption keys, and the keys present in an
SDP body are to be used for the sending direction. IOW, with an offer
coming from an SRTP client which gets translated to a non-SRTP SDP,
mediaproxy can receive early media on those streams, but won't have an
SRTP encryption key for forwarding the media to the offerer, as the key
would only be sent in the answer SDP. Thus, SRTP (at least when used
through SDES) makes early media impossible.

However, that issue should resolve itself once the answer SDP goes
through, after which mediaproxy will have SRTP encryption keys for both
directions and the error should go away. Maybe there's a different issue
around? A full pcap including the RTP might be helpful.

cheers

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] add "port" field in the "via" header

2013-08-23 Thread Robert R
Hi,

I was wondering how to force Kamailio to add "port" field in the "via"
header.

Thanks,
Rob,
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla
Oh, I forgot that the group of t_set_* functions have one parameter, to 
allow set/unset the flag. Use:


t_set_disable_internal_reply(1);

Daniel

On 8/23/13 1:34 PM, Steve Davies wrote:




On 23 August 2013 12:22, Daniel-Constantin Mierla > wrote:


correction for the above line, the function name is:

t_set_disable_internal_reply();


I can't get the parser to agree its valid:

 0(29626) DEBUG:  [sr_module.c:680]: find_mod_export_record(): 
find_export_record:  not found
 0(29626) DEBUG:  [sr_module.c:680]: find_mod_export_record(): 
find_export_record:  not found
 0(29626) ERROR:  [cfg.y:3431]: yyparse(): cfg. parser: failed 
to find command t_set_disable_internal_reply
 0(29626) :  [cfg.y:3570]: yyerror_at(): parse error in config 
file /usr/local/etc/kamailio/kamailio.cfg, line 560, column 31: 
unknown command, missing loadmodule?


It is there in the tm.so binary:

# strings /usr/local/lib/kamailio/modules/tm.so | grep 
t_set_disable_internal_reply

t_set_disable_internal_reply

I applied the patch, did make clean, make all, make install, restarted 
Kamailio.


Then tried "make group_include="standard standard-dep stable 
experimental" all" and make install.


I looked at the code and I can't see how its different from other 
functions that do work.


Feel stupid ...

Steve



--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hanging active dialog...

2013-08-23 Thread Carlos Ruiz Díaz
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  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@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Carlos
http://caruizdiaz.com
+595981146623
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hanging active dialog...

2013-08-23 Thread Gertjan Wolzak
Hello Carlos,

 

I have been looking at your module, can’t wait to work with it, especially
the prepaid part.

 

But as this system is in production, can’t just start experimenting, want
to…. But cant.

 

So just have to wait for some tips on the cli….

 

But thanks.

 

Rgds,

 

Gertjan 

 

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Carlos Ruiz Díaz
Sent: vrijdag 23 augustus 2013 14:37
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] hanging active dialog...

 

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  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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





 

-- 
Carlos

http://caruizdiaz.com

+595981146623

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla
I'll check the logs and most probably have to do some test myself, but 
it's going to take a bit.


Daniel

On 8/23/13 2:50 PM, Steve Davies wrote:




On 23 August 2013 14:24, Daniel-Constantin Mierla > wrote:


Oh, I forgot that the group of t_set_* functions have one
parameter, to allow set/unset the flag. Use:

t_set_disable_internal_reply(1);


Hi Daniel,

Doesn't seem to work...


Kamailio sends back 500, 477, 477, 477

Return code from t_relay was still -1:

t_set_disable_internal_reply(1);
$avp(senttoast) = 0;
$var(rr) = t_relay();
xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr) 
err.rcode is $err.rcode t_r_c is $T_reply_code sent = $avp(senttoast)\n");

if ($var(rr) < 0) {
sl_reply_error();
}


>>  Aug 23 14:34:11 ubuntu /usr/local/sbin/kamailio[22785]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Steve Davies
On 23 August 2013 14:56, Daniel-Constantin Mierla  wrote:

>  I'll check the logs and most probably have to do some test myself, but
> it's going to take a bit.
>

No prob, I'll come back to it later.

Steve
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hanging active dialog...

2013-08-23 Thread Daniel-Constantin Mierla
Have you listed the profile via kamctl or kamcmd? The commands are in 
the readme:


http://kamailio.org/docs/modules/stable/modules/dialog.html#idp3737432

Is the afferent profile listing any dialog?

Cheers,
Daniel

On 8/23/13 2:50 PM, Gertjan Wolzak wrote:


Hello Carlos,

I have been looking at your module, can't wait to work with it, 
especially the prepaid part.


But as this system is in production, can't just start experimenting, 
want to But cant.


So just have to wait for some tips on the cli

But thanks.

Rgds,

Gertjan

*From:*sr-users-boun...@lists.sip-router.org 
[mailto:sr-users-boun...@lists.sip-router.org] *On Behalf Of *Carlos 
Ruiz Díaz

*Sent:* vrijdag 23 augustus 2013 14:37
*To:* Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] hanging active dialog...

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 > 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@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Carlos

http://caruizdiaz.com

+595981146623



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Kethzer Docteur
CC (gcc) [M websocket.so] ws_frame.o
In file included from ws_frame.c:25:
/usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
‘_UNUSED_PARAMETER_’
/usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
‘_UNUSED_PARAMETER_’
make[1]: *** [ws_frame.o] Error 1
make: *** [modules] Error 1

-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Kethzer Docteur
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"


On Fri, Aug 23, 2013 at 9:29 AM, Kethzer Docteur wrote:

>
> CC (gcc) [M websocket.so] ws_frame.o
> In file included from ws_frame.c:25:
> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> make[1]: *** [ws_frame.o] Error 1
> make: *** [modules] Error 1
>
> --
> Kethzer Docteur
>



-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Kethzer Docteur
I got this error message while installing kamailio with websocket
CC (gcc) [M websocket.so] ws_frame.o
In file included from ws_frame.c:25:
/usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
‘_UNUSED_PARAMETER_’
/usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
‘_UNUSED_PARAMETER_’
make[1]: *** [ws_frame.o] Error 1
make: *** [modules] Error 1

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"

Any Help please


On Fri, Aug 23, 2013 at 9:31 AM, Kethzer Docteur wrote:

> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=10.04
> DISTRIB_CODENAME=lucid
> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>
>
> On Fri, Aug 23, 2013 at 9:29 AM, Kethzer Docteur wrote:
>
>>
>> CC (gcc) [M websocket.so] ws_frame.o
>> In file included from ws_frame.c:25:
>> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
>> ‘_UNUSED_PARAMETER_’
>> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
>> ‘_UNUSED_PARAMETER_’
>> make[1]: *** [ws_frame.o] Error 1
>> make: *** [modules] Error 1
>>
>> --
>> Kethzer Docteur
>>
>
>
>
> --
> Kethzer Docteur
>



-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hanging active dialog...

2013-08-23 Thread Gertjan Wolzak
I have tried with kamctl...

 

But because I found the documentation not very clear, I think I am doing it
wrong.

 

Let’s take the 8.6:

 

:profile_list_dlgs:_reply_fifo_file_

   inbound_calls

   _empty_line_

 

Where the parameters are profile and value, whereby the value is optional.

 

I tried : kamctl fifo :profile_list_dlgs: _reply_fifo_file_inbound_calls
callers

 

Im pretty sure that is not correct.

 

Been looking for the correct why on google, but can find a clear
explanation.

 

Gertjan.

 

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: vrijdag 23 augustus 2013 15:06
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] hanging active dialog...

 

Have you listed the profile via kamctl or kamcmd? The commands are in the
readme:

http://kamailio.org/docs/modules/stable/modules/dialog.html#idp3737432

Is the afferent profile listing any dialog?

Cheers,
Daniel

On 8/23/13 2:50 PM, Gertjan Wolzak wrote:

Hello Carlos,

 

I have been looking at your module, can’t wait to work with it, especially
the prepaid part.

 

But as this system is in production, can’t just start experimenting, want
to…. But cant.

 

So just have to wait for some tips on the cli….

 

But thanks.

 

Rgds,

 

Gertjan 

 

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Carlos Ruiz Díaz
Sent: vrijdag 23 augustus 2013 14:37
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] hanging active dialog...

 

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 custome
 r");
 
 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  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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





 

-- 
Carlos

Re: [SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Peter Dunkley
Hello,

What version of libunistring does Ubuntu 10.04 come with?

How far away is that from the latest version of libunistring (or even just
the versions that are available on other platforms like CentOS, Fedora, or
Ubuntu 13.04)?

It could just be that you need a later version of libunistring than is
available in that three year old version of Ubuntu.

Regards,

Peter


On 23 August 2013 14:32, Kethzer Docteur  wrote:

> I got this error message while installing kamailio with websocket
> CC (gcc) [M websocket.so] ws_frame.o
> In file included from ws_frame.c:25:
> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> make[1]: *** [ws_frame.o] Error 1
> make: *** [modules] Error 1
>
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=10.04
> DISTRIB_CODENAME=lucid
> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>
> Any Help please
>
>
> On Fri, Aug 23, 2013 at 9:31 AM, Kethzer Docteur wrote:
>
>> DISTRIB_ID=Ubuntu
>> DISTRIB_RELEASE=10.04
>> DISTRIB_CODENAME=lucid
>> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>>
>>
>> On Fri, Aug 23, 2013 at 9:29 AM, Kethzer Docteur wrote:
>>
>>>
>>> CC (gcc) [M websocket.so] ws_frame.o
>>> In file included from ws_frame.c:25:
>>> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
>>> ‘_UNUSED_PARAMETER_’
>>> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
>>> ‘_UNUSED_PARAMETER_’
>>> make[1]: *** [ws_frame.o] Error 1
>>> make: *** [modules] Error 1
>>>
>>> --
>>> Kethzer Docteur
>>>
>>
>>
>>
>> --
>> Kethzer Docteur
>>
>
>
>
> --
> Kethzer Docteur
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Olle E. Johansson

23 aug 2013 kl. 12:13 skrev Steve Davies :

> 
> 
> 
> On 23 August 2013 11:18, Steve Davies  wrote:
> Here's what I put in RELAY route block:
> 
> $var(rr) = t_relay();
> xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr)\n");
> if (!$var(rr)) {
> sl_reply_error();
> }
> 
> 
> In 4.0.3, t_relay gives a -1 in the case that there is a physical network 
> issue (in my test I have a "-j DROP" iptables rule)
> 
> 
> Trying to find a way to detect the case where t_relay fails but doesn't call 
> the failure block.  I dumped some hopeful looking pseudo variables, and tried 
> to use an avp to communicate from the failure branch back to the relay point.
> 
> I tried this:
> 
> $avp(senttoast) = 0;
> $var(rr) = t_relay();
> xlog("L_NOTICE","SLD: in RELAY, t_relay returned $var(rr) err.rcode 
> is $err.rcode t_r_c is $T_reply_code sent = $avp(senttoast)\n");
> if ($var(rr) < 0) {
> sl_reply_error();
> }
> 
> and in my failure block I set $avp(senttoast) to 1.
> 
> 
> I get:
> 
> Aug 23 12:07:02 ubuntu /usr/local/sbin/kamailio[7819]: NOTICE: 

Re: [SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Kethzer Docteur
I will check for a early version


On Fri, Aug 23, 2013 at 10:56 AM, Kethzer Docteur wrote:

> I have install this version in Ubuntu 10.04 libunistring-dev
>  0.9.1-1 libunistring0 0.9.1-1
>
>
> On Fri, Aug 23, 2013 at 9:50 AM, Peter Dunkley <
> peter.dunk...@crocodilertc.net> wrote:
>
>> Hello,
>>
>> What version of libunistring does Ubuntu 10.04 come with?
>>
>> How far away is that from the latest version of libunistring (or even
>> just the versions that are available on other platforms like CentOS,
>> Fedora, or Ubuntu 13.04)?
>>
>> It could just be that you need a later version of libunistring than is
>> available in that three year old version of Ubuntu.
>>
>> Regards,
>>
>> Peter
>>
>>
>> On 23 August 2013 14:32, Kethzer Docteur  wrote:
>>
>>> I got this error message while installing kamailio with websocket
>>> CC (gcc) [M websocket.so] ws_frame.o
>>> In file included from ws_frame.c:25:
>>> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
>>> ‘_UNUSED_PARAMETER_’
>>> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
>>> ‘_UNUSED_PARAMETER_’
>>> make[1]: *** [ws_frame.o] Error 1
>>> make: *** [modules] Error 1
>>>
>>>  DISTRIB_ID=Ubuntu
>>> DISTRIB_RELEASE=10.04
>>> DISTRIB_CODENAME=lucid
>>> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>>>
>>> Any Help please
>>>
>>>
>>> On Fri, Aug 23, 2013 at 9:31 AM, Kethzer Docteur 
>>> wrote:
>>>
 DISTRIB_ID=Ubuntu
 DISTRIB_RELEASE=10.04
 DISTRIB_CODENAME=lucid
 DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"


 On Fri, Aug 23, 2013 at 9:29 AM, Kethzer Docteur 
 wrote:

>
> CC (gcc) [M websocket.so] ws_frame.o
> In file included from ws_frame.c:25:
> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
> ‘_UNUSED_PARAMETER_’
> make[1]: *** [ws_frame.o] Error 1
> make: *** [modules] Error 1
>
> --
> Kethzer Docteur
>



 --
 Kethzer Docteur

>>>
>>>
>>>
>>> --
>>> Kethzer Docteur
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Peter Dunkley
>> Technical Director
>>  Crocodile RCS Ltd
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Kethzer Docteur
>



-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Error message installing kamailio websocket

2013-08-23 Thread Kethzer Docteur
I have install this version in Ubuntu 10.04 libunistring-dev
 0.9.1-1 libunistring0 0.9.1-1


On Fri, Aug 23, 2013 at 9:50 AM, Peter Dunkley <
peter.dunk...@crocodilertc.net> wrote:

> Hello,
>
> What version of libunistring does Ubuntu 10.04 come with?
>
> How far away is that from the latest version of libunistring (or even just
> the versions that are available on other platforms like CentOS, Fedora, or
> Ubuntu 13.04)?
>
> It could just be that you need a later version of libunistring than is
> available in that three year old version of Ubuntu.
>
> Regards,
>
> Peter
>
>
> On 23 August 2013 14:32, Kethzer Docteur  wrote:
>
>> I got this error message while installing kamailio with websocket
>> CC (gcc) [M websocket.so] ws_frame.o
>> In file included from ws_frame.c:25:
>> /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
>> ‘_UNUSED_PARAMETER_’
>> /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
>> ‘_UNUSED_PARAMETER_’
>> make[1]: *** [ws_frame.o] Error 1
>> make: *** [modules] Error 1
>>
>>  DISTRIB_ID=Ubuntu
>> DISTRIB_RELEASE=10.04
>> DISTRIB_CODENAME=lucid
>> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>>
>> Any Help please
>>
>>
>> On Fri, Aug 23, 2013 at 9:31 AM, Kethzer Docteur wrote:
>>
>>> DISTRIB_ID=Ubuntu
>>> DISTRIB_RELEASE=10.04
>>> DISTRIB_CODENAME=lucid
>>> DISTRIB_DESCRIPTION="Ubuntu 10.04.2 LTS"
>>>
>>>
>>> On Fri, Aug 23, 2013 at 9:29 AM, Kethzer Docteur 
>>> wrote:
>>>

 CC (gcc) [M websocket.so] ws_frame.o
 In file included from ws_frame.c:25:
 /usr/include/unistr.h:189: error: expected ‘;’, ‘,’ or ‘)’ before
 ‘_UNUSED_PARAMETER_’
 /usr/include/unistr.h:259: error: expected ‘;’, ‘,’ or ‘)’ before
 ‘_UNUSED_PARAMETER_’
 make[1]: *** [ws_frame.o] Error 1
 make: *** [modules] Error 1

 --
 Kethzer Docteur

>>>
>>>
>>>
>>> --
>>> Kethzer Docteur
>>>
>>
>>
>>
>> --
>> Kethzer Docteur
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Juha Heinanen
Steve Davies writes:

> Trying to find a way to detect the case where t_relay fails but doesn't
> call the failure block.

daniel did some work on this recently when i brought the issue up
regarding dead tcp destinations.

it is now possible to set

t_on_branch_failure("something");

and if t_relay() fails to tcp destination, route block

event_route [tm:branch-failure:something]

gets executed after a timeout.

is your problem something else?

-- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio Presence module

2013-08-23 Thread Kethzer Docteur
I'm using kamailio 4.1 Im having problem to see witch user is online, I
have the module presence.so and presence_xml.so load into the config file
of Kamailio.cfg.

#!ifdef WITH_PRESENCE
# - presence params -
modparam("presence", "db_url", DBURL)
modparam("presence", "presentity_table", "presentity")
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "watchers_table", "watchers")
modparam("presence", "db_update_period", 20)
modparam("presence", "clean_period", 50)

# - presence_xml params -
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#!endif

# handle presence related requests
route(PRESENCE);
Any help please?


-- 
Kethzer Docteur
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla

Can you try the new patch attached?

I overlooked that the code where to skip sending the reply was in 
between some #ifdef ... #else ... #endif and I did it only for the #else 
branch, but actually the #ifdef was enabled by compile.


You have to apply the patch on clean sources.

Daniel

On 8/23/13 3:01 PM, Steve Davies wrote:




On 23 August 2013 14:56, Daniel-Constantin Mierla > wrote:


I'll check the logs and most probably have to do some test myself,
but it's going to take a bit.


No prob, I'll come back to it later.

Steve


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h
index f30bd45..d13cd9b 100644
--- a/modules/tm/h_table.h
+++ b/modules/tm/h_table.h
@@ -299,6 +299,8 @@ struct totag_elem {
 #  define pass_provisional(_t_)((_t_)->flags&T_PASS_PROVISIONAL_FLAG)
 #endif
 
+#define T_DISABLE_INTERNAL_REPLY (1<<12) /* don't send internal negative reply 
*/
+
 /* unsigned short should be enough for a retr. timer: max. 65535 ms =>
  * max retr. = 65 s which should be enough and saves us 2*2 bytes */
 typedef unsigned short retr_timeout_t;
diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index e9d9598..729b537 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -358,6 +358,15 @@ handle_ret:
/* we don't want to pass upstream any reply regarding 
replicating
 * a request; replicated branch must stop at us*/
if (likely(!replicate)) {
+   if(t->flags&T_DISABLE_INTERNAL_REPLY) {
+   /* flag set to don't generate the internal 
negative reply
+* - let the transaction live further, 
processing should
+*   continue in config */
+   DBG("not generating immediate reply for error 
%d\n", ser_error);
+   tm_error=ser_error;
+   ret = -4;
+   goto done;
+   }
 #ifdef TM_DELAYED_REPLY
/* current error in tm_error */
tm_error=ser_error;
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index a1ca634..6b03081 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -289,6 +289,7 @@ static int t_set_disable_failover(struct sip_msg* msg, 
char* on_off, char* f);
 static int t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,

char* f);
 #endif /* CANCEL_REASON_SUPPORT */
+static int t_set_disable_internal_reply(struct sip_msg* msg, char* on_off, 
char* f);
 static int t_branch_timeout(struct sip_msg* msg, char*, char*);
 static int t_branch_replied(struct sip_msg* msg, char*, char*);
 static int t_any_timeout(struct sip_msg* msg, char*, char*);
@@ -448,6 +449,8 @@ static cmd_export_t cmds[]={
fixup_var_int_1,

REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 #endif /* CANCEL_REASON_SUPPORT */
+   {"t_set_disable_internal_reply", t_set_disable_internal_reply, 1, 
fixup_var_int_1,
+   
REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
{"t_branch_timeout",  t_branch_timeout, 0, 0,  FAILURE_ROUTE},
{"t_branch_replied",  t_branch_replied, 0, 0,  FAILURE_ROUTE},
{"t_any_timeout", t_any_timeout,0, 0, 
@@ -1827,6 +1830,10 @@ T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, 
T_NO_E2E_CANCEL_REASON)
 #endif /* CANCEL_REASON_SUPPORT */
 
 
+/* disable internal negative reply for the current transaction */
+T_SET_FLAG_GEN_FUNC(t_set_disable_internal_reply, T_DISABLE_INTERNAL_REPLY)
+
+
 /* script function, FAILURE_ROUTE only, returns true if the 
  * choosed "failure" branch failed because of a timeout, 
  * -1 otherwise */
@@ -2220,13 +2227,11 @@ inline static int w_t_relay_to(struct sip_msg *msg, 
char *proxy, char *flags)
param.v.i = 0;
t_set_auto_inv_100(msg, (char*)(¶m), 0);
}
-   /* no auto negative reply - not implemented */
-   /*
+   /* no auto negative reply */
if(fl&2) {
param.v.i = 1;
-   t_set_disable_internal_reply(msg, (char*)param, 0);
+   t_set_disable_internal_reply(msg, (char*)(¶m), 0);
}
-   */
/* no dns failover */
if(fl&4) {
param.v.i = 1;
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Steve Davies
On 23 August 2013 19:42, Daniel-Constantin Mierla  wrote:

>  Can you try the new patch attached?
>
> I overlooked that the code where to skip sending the reply was in between
> some #ifdef ... #else ... #endif and I did it only for the #else branch,
> but actually the #ifdef was enabled by compile.
>
> You have to apply the patch on clean sources.
>
>
Hi,

I now get the -4, thanks!

 > Aug 23 20:25:22 ubuntu /usr/local/sbin/kamailio[5645]: NOTICE: 

Re: [SR-Users] 477 Unfortunately error on sending to next hop occurred

2013-08-23 Thread Daniel-Constantin Mierla

Hello,

On 8/23/13 8:33 PM, Steve Davies wrote:


On 23 August 2013 19:42, Daniel-Constantin Mierla > wrote:


Can you try the new patch attached?

I overlooked that the code where to skip sending the reply was in
between some #ifdef ... #else ... #endif and I did it only for the
#else branch, but actually the #ifdef was enabled by compile.

You have to apply the patch on clean sources.


Hi,

I now get the -4, thanks!

 > Aug 23 20:25:22 ubuntu /usr/local/sbin/kamailio[5645]: NOTICE: