Re: [SR-Users] kamailio Crashes with rls module

2012-05-17 Thread Gnaneshwar Gatla
I was using Kamailio with integrated presence, xcap, registrar, rls, sip proxy.
I have implemented Kamailio as an standalone SIP presence server with rls and 
xcap_server. This seems to make it work without crashing.
Now I’m unable to recreate the crash.

Regards
Gnani
From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, May 04, 2012 1:30 AM
To: Gnaneshwar Gatla
Cc: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: Re: [SR-Users] kamailio Crashes with rls module

Hello,

somehow the frame 0 is not showing the place of crash.

When you are in gdb, can you do the commands:

frame 1
p slb

and send the output here.

I assume you are using latest 3.2.x, so frame 1 shows that line 1033 in 
subscribe.c from presence module is executed, which is a function from sl 
module API.

Cheers,
Daniel


On 4/27/12 10:26 PM, Gnaneshwar Gatla wrote:
Sure, I didn’t know how to extract the back trace.
ftp://ftp.intouchhealth.com/backtrace.txt

Thank you,
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, April 27, 2012 1:07 PM
To: Gnaneshwar Gatla
Cc: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List; Cody Herzog
Subject: Re: [SR-Users] kamailio Crashes with rls module

Hello,

the core file is useless without binaries, so you have to send the gdb 
backtrace:

gdb /path/to/kamailio /path/to/corefile

Then do 'bt full' and send the output on the mailing list.

Cheers,
Daniel

On 4/27/12 8:30 PM, Gnaneshwar Gatla wrote:
Hey Daniel,

Yes, this can be reproduced. I have uploaded the xml and Kamailio log and core 
files to the following ftp site.
Username:  Kamailio
Password:  99Teaz
URL:  ftp://ftp.intouchhealth.com

Steps for reproducing the crash:
Use the xml(rls.xml) to be inserted in the xcap table using a xcap_server with 
the help of a http client.
The service uri is sip:rls@domainNamesip:rls@%3cdomainName in the file.
Create subscribe using the service uri in the request line method using SIPp or 
some SIP client program. (please refer to rls_crash.pcap file).
Kamailio crashes as soon as the subscribe is being processed.

For the convenience of testing, I had disabled authentication for the Subscribe 
method.

Thank you for looking into this Daniel,
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, April 27, 2012 6:21 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Cc: Gnaneshwar Gatla
Subject: Re: [SR-Users] kamailio Crashes with rls module

Hello,

can you send the backtrace? according to the logs, there is a core file:

Apr 26 21:00:42 SIPDev /usr/local/sbin/kamailio[14369]: ALERT: core 
[main.c:751]: child process 14374 exited by a signal 11

Apr 26 21:00:42 SIPDev /usr/local/sbin/kamailio[14369]: ALERT: core 
[main.c:754]: core was generated
Can it be reproduced? Or just happened randomly.

Btw, sending such large files (the log in this case, over 15MB) as attachment 
is not really recommended. Maybe you can host it on an website for download or 
send parts of the log, the last messages before the core message. Also, 
compressing it in such case is better. Keep memlog and memdbg higher than 
debug, all the memory operations are not relevant unless they are required by a 
developer for troubleshooting.

Cheers,
Daniel

On 4/26/12 11:15 PM, Gnaneshwar Gatla wrote:
Oppsie.. forgot to attach the document.

Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199

From: Gnaneshwar Gatla
Sent: Thursday, April 26, 2012 2:14 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: kamailio Crashes with rls module

Hello,

I’m experimenting the usage of rls module with Kamailio. I have been able to 
successfully update xcap documents on Kamailio XCAP server.
I have tried to use SIPp to get a NOTIFY for subscribing a rls-service list.

Kamailio does get the xml from the xcap table and tries to parse it and 
crashes. I’m not sure if this is because the format of the XML, I derived the 
xml format from the RFC 4662 and 4826.
I have attached the Kamailio log. I need help with this.

Any help is appreciated, thank you very much.
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199







___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users@lists.sip-router.orgmailto: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/#!/micondahttp://twitter.com/#%21/miconda - 

Re: [SR-Users] How does RLS work with kamailio.

2012-05-17 Thread Gnaneshwar Gatla
Hello,
I have partly fixed this, I was using an incorrect xml format and missing usage 
of pua module. It took a little more than debugging to find this out.
Now I have run into this new issue.

I have implemented a presence + rls + xcap server:
When client subscribes for RLS, kamailio Notifies with resourcelist for the 
client. The pua within the server does backend subscribtions.
These backend subscribtions are responded with 202 Accepted replies.
When the resources in the contact list change their presence information the 
pua generates NOTIFIY with subscription state: pending.
Rls module does not reply back.

Kamailio does not return from the following command.

if(is_method(NOTIFY))
{
xlog(handle notify);
  rls_handle_notify();
xlog(notify was handled);
  exit;
};

Thank you for looking into this.
Regards
Gnani
From: Gnaneshwar Gatla
Sent: Thursday, April 19, 2012 4:53 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Cc: Cody Herzog
Subject: How does RLS work with kamailio.

Hello,

I'm trying to implement RLS with integrated XCAP server. I have successfully 
run the Kamailio instance with the following snippet.
Since I had no RLS clients available, I have tried to test this with SIPp. The 
attached pcap trace is the result.

Test:

1.   Send an XCAP signal over http to Kamailio.

2.   Register and subscribe Kamailio.

The test does store the xml received over http in the xcap table in the 
database. But rls module does not store the data neither in rls_presentity or 
rls_watcher.
When I sent the Subscribe with sipp, the server throws error that subscription 
was not found in the database.

I would like to know if I'm doing something wrong to implement this service. Is 
there any brief tutorial on how to implement this?


Kamailio.cfg snippet:

##Presence
modparam(presence, server_address, PRESENCE_IP)
modparam(presence, clean_period, 65)
modparam(presence, db_update_period, 60)
modparam(presence, max_expires, 75)
modparam(presence, fallback2db, 1)

modparam(presence_xml, db_url, DBURL)
modparam(presence_xml, force_active, 0)
modparam(presence_xml, integrated_xcap_server, 1)


##rls modparams
modparam(rls, db_url, DBURL)
modparam(rls, waitn_time, 10)
modparam(rls, integrated_xcap_server, 1)
modparam(rls, max_notify_body_length, 32000)
modparam(rls, to_presence_code, 10)
modparam(rls, server_address, RLS_URI)
modparam(rls, outbound_proxy, PUA_OUTBOUND_PROXY)
modparam(rls, xcap_root, XCAP_ROOT)


##XCAP modparams
modparam(xcap_server, db_url, DBURL)
modparam(xcap_client, db_url, DBURL)
modparam(xcap_client, query_period, 50)


route[PRESENCE]
{
if(!is_method(PUBLISH|SUBSCRIBE))
return;

#!ifdef WITH_PRESENCE
if (!t_newtran())
{
sl_reply_error();
exit;
};

if(is_method(PUBLISH))
{
handle_publish();
t_release();
}
else
if( is_method(SUBSCRIBE))
{
$var(ret_code)= rls_handle_subscribe();
xlog(Subscribe: $var(ret_code));
if($var(ret_code)== 10)
   handle_subscribe();
t_release();
}
exit;
#!endif

# if presence enabled, this part will not be executed
if (is_method(PUBLISH) || $rU==$null)
{
sl_send_reply(404, Not here);
exit;
}
return;
}

In the [xhttp:request]:
switch($rm) {
case PUT:
xcaps_put($var(uri), $hu, $rb);
if($xcapuri(u=auid)=~pres-rules)
{
xlog(= xhttp put: refreshing 
watchers for $var(uri)\n);
pres_update_watchers($var(uri), 
presence);
pres_refresh_watchers($var(uri), 
presence, 1);
}
else if ($xcapuri(u=auid)=~resource-lists
   || $xcapuri(u=auid)=~rls-services)
{
xlog( xhttp put: refreshing rls 
watchers $var(uri)\n);
rls_update_subs($var(uri), 
presence);
}

exit;
break;



Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199
___
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] How to use Async module of Kamailio

2012-05-17 Thread 罗俊明
hello Daniel,  I am using ASYNC module of kamailio 3.2.2 for delay sip "INVITE", I want to know if ASYNC Modules can be used for delay a sip method now? if can, I shoud how to use it? My case is : when sip server receives a sip invite, suspends the transaction about 30 seconds, and process something, then continues the tranaction, forward the INVITE message,etc.please give some advice, thanks a lotsKamailio.cfg as follows:..async_route("RESUME", "20");.route[RESUME]{   if (is_method("INVITE")){ xlog("===INVITE\n"); } if(!t_relay()){ t_reply("500","or"); } exit;}RegardsJIM LUO


___
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] Rtpproxy and UPDATEs

2012-05-17 Thread Daniel-Constantin Mierla

Hello,

indeed, rtpproxy_manage() didn't handle UPDATE requests. I just pushed a 
patch in git master branch:


http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24ff0d9aa060d183fbe40b1fcb5910d60940585b

If you can test the patch and report the results, I will backport to 3.2 
if all is fine.


rtpproxy_manage() is a wrapper around rtpproxy_offer() and 
rtpproxy_answer(), you can use these two functions for UPDATE request 
and reply as an alternative to rtpproxy_manage().


Cheers,
Daniel

On 5/16/12 7:56 PM, Spencer Thomason wrote:

Hi Daniel,
I have updated my script to ensure these UPDATEs call route(NATMANAGE) but it 
seems the problem is that rtpproxy_manage() does not handle UPDATEs.  Since the 
call is already passing through rtpproxy is there any way I can force these 
UPDATEs to keep it there?

Thanks,
Spencer

On May 16, 2012, at 12:17 AM, Daniel-Constantin Mierla wrote:


Hello,

be sure you call route(NATMANAGE) for UPDATE request and set an onreply_route 
where the reply will be handled and you have to call there route(NATMANAGE) as 
well.

Cheers,
Daniel

On 5/16/12 12:45 AM, Spencer Thomason wrote:

Hello,
I'm working on a residential type application where we are using Kamailio for 
NAT traversal and Freeswitch as a voicemail and media server.  When a UA that 
is behind NAT sends an INVITE to check voicemail everything works correctly 
until the user listens to the message.  The sdp in the initial INVITE is 
rewritten and rtp proxy is working but Freeswitch (on a public IP) then sends 
an UPDATE to display the caller name of the person who left the message.  The 
problem is that the UAC (in this case a Polycom phone) then responds with its 
private IP in the SDP.  Is there a was to handle these UPDATEs?  I'm using 
Kamailio 3.2.3 with a fairly stock config.  This is an excerpt of the config 
file with the NAT handling route:

# RTPProxy control
route[NATMANAGE] {
 if (is_request()) {
 if(has_totag()) {
 if(check_route_param(nat=yes)) {
 setbflag(FLB_NATB);
 }
 }
 }
 if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
 return;

 rtpproxy_manage();

 if (is_request()) {
 if (!has_totag()) {
 add_rr_param(;nat=yes);
 }
 }

 if (is_reply()) {
 if(isbflagset(FLB_NATB)) {
 fix_nated_contact();
 }
 }
 return;
}


Thanks,
Spencer



___
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





--
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] un-suscribe

2012-05-17 Thread Davis Doe
Please i would not like to receive mail from the kamailio group
thanks

davis
___
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 debug send messages

2012-05-17 Thread Konstantin M.
Hi Anca,

I fixed this problem with your help. A modified patch is attached.

Thanks!

2012/5/16 Konstantin M. evilz...@gmail.com

 Hi Anca,


 Yes, I will explain.

 Let's assume we have a kamailio config, attached as main.cfg (it's a very
 simplified, I have excluded a lot of customization here).

 Debug log attached as log1.txt is a clean log of running that config
 without your patch.
 With your patch was nothing changed.
 After investigation of code I see that a logic is not going to the place
 you've added in the patch.
 When I changed your patch this way (see attached forward.c.diff), I see
 that a logic is going to 'skip'.
 See a file attached as log2.txt with my modified patch.

 And finally, you can see what we're missing here, a difference
 between/after a 'skip' extending (attached as log.diff).

 Thanks!



 2012/5/16 Anca Vamanu anca.vam...@1and1.ro

 Hi Konstantin,


 Can you tell me exactly what you are calling in onsend_route and how you
 observe it is not working?

 Regards,
 Anca



 On 05/15/2012 04:55 PM, Konstantin M. wrote:

 Hi Anca,

 I've tested your patch and I don't think it's working.
 At least I was noticed that a logic is going to 'skip' label on 183 sdp:
/* check modules response_f functions */
for (r=0; rmod_response_cbk_no; r++)
if (mod_response_cbks[r](msg)==0) goto skip;



 __**_
 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-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





kamailio-3.2.3--forward.c.diff
Description: Binary data
___
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] FW: (Devel) Segmentation fault using pua_dialoginfo

2012-05-17 Thread Daniel-Constantin Mierla

Hello,

the content of ps-param is pretty much all invalid. So looks like a 
callback on a freed/invalid parameter, could be a double-callback execution.


Set debug=3 and send all the messages for such case -- it might be quite 
a lot of them, so send them to my email address, the mailing list has a 
limit of message size.


Cheers,
Daniel

On 5/17/12 2:13 PM, Charles Chance wrote:


Hi,

Requested output as follows:

(gdb) frame 1

#1  publ_cback_func (t=0xb3dc8e38, type=1024, ps=0xbfcdd5d8)

at send_publish.c:246

246 hash_code= core_hash(hentity-pres_uri, NULL, HASH_SIZE);

(gdb) p *ps

$2 = {req = 0x0, rpl = 0xb7c30340, param = 0xb3dc3ff4, code = 412, 
flags = 0,


  branch = 0, t_rbuf = 0x0, dst = 0x0, send_buf = {s = 0x0, len = 0}}

(gdb) p *(ua_pres_t*)(*ps-param)

$3 = {id = {s = 0x20455942 Address 0x20455942 out of bounds,

len = 98044}, pres_uri = 0x40323531, event = 875444279,

  expires = 875703856, desired_expires = 858861105, flag = 808794676,

  db_flag = 1394618421, cb_param = 0x322f5049, next = 0xa0d302e,

  ua_flag = 979462486, etag = {

s = 0x50495320 Address 0x50495320 out of bounds, len = 808333871},

  tuple_id = {s = 0x5044552f Address 0x5044552f out of bounds,

len = 775436064}, body = 0x322e3034, content_type = {

s = 0x312e3134 Address 0x312e3134 out of bounds, len = 1648047155},

  watcher_uri = 0x636e6172, call_id = {

s = 0x397a3d68 Address 0x397a3d68 out of bounds, len = 1647593320},

  to_tag = {s = 0x3435634b Address 0x3435634b out of bounds,

len = 842149473}, from_tag = {

s = 0x63306461 Address 0x63306461 out of bounds, len = 808334648},

  cseq = 1767246349, version = 1394621025, outbound_proxy = 0x322f5049,

  extra_headers = 0x552f302e, record_route = {

s = 0x31205044 Address 0x31205044 out of bounds, len = 825111097},

  remote_contact = {s = 0x312e3836 Address 0x312e3836 out of bounds,

len = 976498224}, contact = {

s = 0x36373135 Address 0x36373135 out of bounds, len = 1701985073}}

Yes, it is a test server so very happy to arrange for remote access if 
required. In the meantime, I will do a little more digging to try to 
find out why entity is null.


Cheers,

Charles



--
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] sdpops command not working

2012-05-17 Thread Grégoire Vandendeurpel
Hello again,

I have a new question for you:

In my final project, I have to simulate the public and private network ,
that's why I use 2 different subnet !

On my servers machine I have kamailio 3.2.3 in realtime with Asterisk !

The subnet of asterisk and kamailio is 192.168.1.9 255.255.255.0 , and I
created an other virtual interface eth0:1 in 172.16.0.10 .

My puprose is that kamailio use nat and rtpproxy which will be on
172.16.0.10!! My issue is that when I create a new virtual interface,
directly Kmaailio listen automatically in UDP TLS TCP on this new address.
I don't want this!!

I want Kamailio still listening on 192.168.1.9 in tls udp tcp and has his
socket on 127.0.0.1:2 and not listening on 172.16.0.10!! It has to be
rtpproxy that has to listens on 172.16.0.10!!

So how to stop kamailio listening on 172.16.0.10 and using rtpproxy whith
the right socket ?? I already now how to use rtpproxy but I need to stop
kamailio listening on 172.16.0.10 cause of this, rtpproxy does not mean
anything in this case...

thanks in advance
Best regards



2012/5/15 Grégoire Vandendeurpel g.vandendeur...@gmail.com

 Thanks for all your explanations



 2012/5/15 Reda Aouad reda.ao...@gmail.com

 You can't.

 Siremis is a management and reporting interface.
 You can't implement script routing logic using Siremis.

 Reda



 On Tue, May 15, 2012 at 4:34 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, Working perfectly, thank you.

 I have a last question which is important to for my final project:

 How is it possible to use these commands from sdpops module in SIREMIS?
 like: in the acl menu of ser in siremis, add a new form in which we can
 manage like I said codecs or media .. from a domain or..

 I understood perfectly in kamailio.cfg, now I need to add it in Siremis..

 Any idea , how I can add it in?

 Thanks

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 You can check on domain or IP which you can find in the following
 pseudo variables

 $rd: RURI domain
 $fd: FROM domain
 $td: TO domain
 $ad: AUTH domain
 $si: source IP @ of message

 example :

 if ($si == 1.2.3.4) {
 sdp_remove_codec ( ... );
 }

 You can find the complete list of pseudo variables here. Use what you
 want to suit your needs.
 http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables


 Reda



 On Tue, May 15, 2012 at 4:02 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, I should test the dev version , yeah, but I have an other
 question before that, about sdpops:

 Is it possible to remove codecs ( yeah working well on 3.2 ) but
 specifically from an domain or IP ..  ?

 And how?

 Thanks in advance

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Can't help anymore on this.

 But if you're short on time and need a dirty solution, try the
 following functions from textops module:
 replace_body_allORsubst_body

 Match the line m=type... using a grep expression and replace it
 with and empty string.

 I do that to remove lines from SDP body. I ran into some problems to
 do it neatly, so if you have some text messed up while doing it, try to
 include \r\n characters in your grep expression.

 And finally, why don't you install the dev version?

 Reda



 On Tue, May 15, 2012 at 2:22 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, I already compiled sdpops in 3.2. I tried an other command
 like sdp_remove_codecs_by_id and this one is working well on the 3.2
 version of kamailio!

 I think, the problem is specifically from the remove media command.

 Any suggestion?

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Hi,

 You can MAY BE copy take the sdpops module from dev version and
 compile it with 3.2. Not sure it would work though.
 However, it should be easy to install the entire dev version, just
 as you did with 3.2.3.

 Reda



 On Tue, May 15, 2012 at 1:15 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello,

 Thanks for your answer, is there an other way to use it with the
 3.2.3 version of Kamailio? Cause I'm doing my final project of my 
 bachloor,
 and I really need to use it for.

 Is it possible to change something in the code or.. to make it
 working well with my version?

 Best regards


 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Hi,

 This function is available in Kamailio 3.3 (currently in dev
 stage) and not 3.2.

 Reda



 On Tue, May 15, 2012 at 11:49 AM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello,

 I use Kamailio 3.2.3 and I used the command from the sdpops
 module sdp_remove_media(video);

 But when i restarted kamailio, this error appeared:

 0(2623) ERROR: core [cfg.y:3393]: cfg. parser: failed to find
 command sdp_remove_media
 0(2623) : core [cfg.y:3532]: parse error in config file
 /etc/kamailio/kamailio.cfg, line 721, column 27: unknown command, 
 missing
 loadmodule?

 Do You know why ?

 Cause I loeded the sdpops module.

 Thanks in advance for 

Re: [SR-Users] Rtpproxy and UPDATEs

2012-05-17 Thread Spencer Thomason
Hi Daniel,
I just tested the patch and it works perfectly.  

Thanks!
Spencer

On May 16, 2012, at 11:37 PM, Daniel-Constantin Mierla wrote:

 Hello,
 
 indeed, rtpproxy_manage() didn't handle UPDATE requests. I just pushed a 
 patch in git master branch:
 
 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24ff0d9aa060d183fbe40b1fcb5910d60940585b
 
 If you can test the patch and report the results, I will backport to 3.2 if 
 all is fine.
 
 rtpproxy_manage() is a wrapper around rtpproxy_offer() and rtpproxy_answer(), 
 you can use these two functions for UPDATE request and reply as an 
 alternative to rtpproxy_manage().
 
 Cheers,
 Daniel
 
 On 5/16/12 7:56 PM, Spencer Thomason wrote:
 Hi Daniel,
 I have updated my script to ensure these UPDATEs call route(NATMANAGE) but 
 it seems the problem is that rtpproxy_manage() does not handle UPDATEs.  
 Since the call is already passing through rtpproxy is there any way I can 
 force these UPDATEs to keep it there?
 
 Thanks,
 Spencer
 
 On May 16, 2012, at 12:17 AM, Daniel-Constantin Mierla wrote:
 
 Hello,
 
 be sure you call route(NATMANAGE) for UPDATE request and set an 
 onreply_route where the reply will be handled and you have to call there 
 route(NATMANAGE) as well.
 
 Cheers,
 Daniel
 
 On 5/16/12 12:45 AM, Spencer Thomason wrote:
 Hello,
 I'm working on a residential type application where we are using Kamailio 
 for NAT traversal and Freeswitch as a voicemail and media server.  When a 
 UA that is behind NAT sends an INVITE to check voicemail everything works 
 correctly until the user listens to the message.  The sdp in the initial 
 INVITE is rewritten and rtp proxy is working but Freeswitch (on a public 
 IP) then sends an UPDATE to display the caller name of the person who left 
 the message.  The problem is that the UAC (in this case a Polycom phone) 
 then responds with its private IP in the SDP.  Is there a was to handle 
 these UPDATEs?  I'm using Kamailio 3.2.3 with a fairly stock config.  This 
 is an excerpt of the config file with the NAT handling route:
 
 # RTPProxy control
 route[NATMANAGE] {
 if (is_request()) {
 if(has_totag()) {
 if(check_route_param(nat=yes)) {
 setbflag(FLB_NATB);
 }
 }
 }
 if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
 return;
 
 rtpproxy_manage();
 
 if (is_request()) {
 if (!has_totag()) {
 add_rr_param(;nat=yes);
 }
 }
 
 if (is_reply()) {
 if(isbflagset(FLB_NATB)) {
 fix_nated_contact();
 }
 }
 return;
 }
 
 
 Thanks,
 Spencer
 
 
 
 ___
 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
 
 
 
 
 -- 
 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] SQLite datatypes

2012-05-17 Thread Timo Teras
On Wed, 16 May 2012 18:06:08 -0300 Sebastian Ferguson
sebastian.fergu...@gmail.com wrote:

 I think this is related to data types.
 In the logs I can see that kamailio is defaulting datatypes to INT
 (I've tested varchar, int, and bigint in sqlite3), but I don't know
 how large could an integer be in Kamailio. According to sqlite3
 documentation the number 8003330303 is not long enough and in fact
 the number is in the database.

Yes. Sounds definitely like it's treated as INT instead of string or
BIGINT. Since it's address part, it should be string (as there can be
letters too).

SQLite is a little bit unusual on how the typing system works. It does
not really care about how you define your tables, it just stores the
data there as given. That is, even if your table is specified as INT,
it can still have STRING in it. 

I wrote the SQLite driver to consult the table declaration to see what
there should be. So the driver tries to do the right thing, but
apparently can go wrong in certain circumstances.

However, I think either your table declaration is wrong. If the column
is VARCHAR or TEXT it should work. Also, some of the tests are
case-sensitive (strstr function used). Could you try if using uppercase
VARCHAR or TEXT fixes it? If it does, I need to fix
decltype_to_dbtype() to be case-insensitive.

If possible, can I see the related table schema?

- Timo

___
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] dlz-ldap-enum - expose LDAP data to Kamailio via ENUM

2012-05-17 Thread Daniel Pocock


I've recently released a dlz ENUM module for the bind9 nameserver:

   http://www.opentelecoms.org/dlz-ldap-enum

Basically, it handles ENUM queries from Kamailio, Asterisk, FreeSWITCH,
repro, Lumicall, searches for the phone number in LDAP, and if found,
returns the email address as both a SIP address and Jabber address

This should make it even easier than ever before to get federated VoIP
up and running using email addresses interchangeably with phone numbers.
 If the data already exists in LDAP as an address book, then just
install bind9, install the module and you're up and running.

Regards,

Daniel

___
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] FW: (Devel) Segmentation fault using pua_dialoginfo

2012-05-17 Thread Charles Chance
Hi Daniel,

 

I have sent the messages over to you.

 

I look forward to hear what you can find.

 

Best,

 

Charles

 

  _  

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: 17 May 2012 15:06
To: Charles Chance
Cc: 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users
Mailing List'
Subject: Re: FW: (Devel) Segmentation fault using pua_dialoginfo

 

Hello,

the content of ps-param is pretty much all invalid. So looks like a
callback on a freed/invalid parameter, could be a double-callback execution.

Set debug=3 and send all the messages for such case -- it might be quite a
lot of them, so send them to my email address, the mailing list has a limit
of message size.

Cheers,
Daniel

On 5/17/12 2:13 PM, Charles Chance wrote:

Hi,

 

Requested output as follows:

 

(gdb) frame 1

#1  publ_cback_func (t=0xb3dc8e38, type=1024, ps=0xbfcdd5d8)

at send_publish.c:246

246 hash_code= core_hash(hentity-pres_uri, NULL, HASH_SIZE);

(gdb) p *ps

$2 = {req = 0x0, rpl = 0xb7c30340, param = 0xb3dc3ff4, code = 412, flags =
0,

  branch = 0, t_rbuf = 0x0, dst = 0x0, send_buf = {s = 0x0, len = 0}}

(gdb) p *(ua_pres_t*)(*ps-param)

$3 = {id = {s = 0x20455942 Address 0x20455942 out of bounds,

len = 98044}, pres_uri = 0x40323531, event = 875444279,

  expires = 875703856, desired_expires = 858861105, flag = 808794676,

  db_flag = 1394618421, cb_param = 0x322f5049, next = 0xa0d302e,

  ua_flag = 979462486, etag = {

s = 0x50495320 Address 0x50495320 out of bounds, len = 808333871},

  tuple_id = {s = 0x5044552f Address 0x5044552f out of bounds,

len = 775436064}, body = 0x322e3034, content_type = {

s = 0x312e3134 Address 0x312e3134 out of bounds, len = 1648047155},

  watcher_uri = 0x636e6172, call_id = {

s = 0x397a3d68 Address 0x397a3d68 out of bounds, len = 1647593320},

  to_tag = {s = 0x3435634b Address 0x3435634b out of bounds,

len = 842149473}, from_tag = {

s = 0x63306461 Address 0x63306461 out of bounds, len = 808334648},

  cseq = 1767246349, version = 1394621025, outbound_proxy = 0x322f5049,

  extra_headers = 0x552f302e, record_route = {

s = 0x31205044 Address 0x31205044 out of bounds, len = 825111097},

  remote_contact = {s = 0x312e3836 Address 0x312e3836 out of bounds,

len = 976498224}, contact = {

s = 0x36373135 Address 0x36373135 out of bounds, len = 1701985073}}

 

 

Yes, it is a test server so very happy to arrange for remote access if
required. In the meantime, I will do a little more digging to try to find
out why entity is null.

 

Cheers,

 

Charles

 





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

 

  _  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2176 / Virus Database: 2425/5004 - Release Date: 05/16/12

___
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] SQLite datatypes

2012-05-17 Thread Sebastian Ferguson
Hi Timo:

I've tryied with varchar(20) (lowercase) before I sent the original e-mail
and it doesn't work. And I have tryied storing data as a number and as a
stirng (I know that sqlite has not stict type definitios).

After your e-mail I've built the database again like this (all uppercase as
you recommend (and as it should be ;-)):

sqlite CREATE TABLE traducciones('zona' VARCHAR(25), 'e100' VARCHAR(20),
'e101' VARCHAR(20), 'e102' VARCHAR(20));
sqlite INSERT INTO traducciones
VALUES(caballito,1557311721,1557311721,08103330303);
sqlite INSERT INTO traducciones
VALUES(flores,63793266,08103330303,1557311721);
sqlite select * from traducciones;
caballito|1557311721|1557311721|08103330303
flores|63793266|08103330303|1557311721

AND NOW IT's WORKING!

The production table will have all emergency numbers in Argentina (10x,
13x, 911).

Best regards and thank you very much!!!
Sebastián Ferguson


On Thu, May 17, 2012 at 1:45 PM, Timo Teras timo.te...@iki.fi wrote:

 On Wed, 16 May 2012 18:06:08 -0300 Sebastian Ferguson
 sebastian.fergu...@gmail.com wrote:

  I think this is related to data types.
  In the logs I can see that kamailio is defaulting datatypes to INT
  (I've tested varchar, int, and bigint in sqlite3), but I don't know
  how large could an integer be in Kamailio. According to sqlite3
  documentation the number 8003330303 is not long enough and in fact
  the number is in the database.

 Yes. Sounds definitely like it's treated as INT instead of string or
 BIGINT. Since it's address part, it should be string (as there can be
 letters too).

 SQLite is a little bit unusual on how the typing system works. It does
 not really care about how you define your tables, it just stores the
 data there as given. That is, even if your table is specified as INT,
 it can still have STRING in it.

 I wrote the SQLite driver to consult the table declaration to see what
 there should be. So the driver tries to do the right thing, but
 apparently can go wrong in certain circumstances.

 However, I think either your table declaration is wrong. If the column
 is VARCHAR or TEXT it should work. Also, some of the tests are
 case-sensitive (strstr function used). Could you try if using uppercase
 VARCHAR or TEXT fixes it? If it does, I need to fix
 decltype_to_dbtype() to be case-insensitive.

 If possible, can I see the related table schema?

 - Timo

___
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] SQLite datatypes

2012-05-17 Thread Timo Teras
On Thu, 17 May 2012 15:02:30 -0300 Sebastian Ferguson
sebastian.fergu...@gmail.com wrote:

 I've tryied with varchar(20) (lowercase) before I sent the original
 e-mail and it doesn't work. And I have tryied storing data as a
 number and as a stirng (I know that sqlite has not stict type
 definitios).
 
 After your e-mail I've built the database again like this (all
 uppercase as you recommend (and as it should be ;-)):
 
 sqlite CREATE TABLE traducciones('zona' VARCHAR(25), 'e100'
 sqlite VARCHAR(20),
 'e101' VARCHAR(20), 'e102' VARCHAR(20));
 sqlite INSERT INTO traducciones
 VALUES(caballito,1557311721,1557311721,08103330303);
 sqlite INSERT INTO traducciones
 VALUES(flores,63793266,08103330303,1557311721);
 sqlite select * from traducciones;
 caballito|1557311721|1557311721|08103330303
 flores|63793266|08103330303|1557311721
 
 AND NOW IT's WORKING!

Ok. Thanks for the confirmation. I'll fix this sometime this or next
week to work case-insensitively.

 The production table will have all emergency numbers in Argentina
 (10x, 13x, 911).

Very nice :)

-Timo

___
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] Question about LCR ping option

2012-05-17 Thread Fabian Borot



Hello
I am using kamailio 1.5.2. Our kamailio server has multiple IPs, and 1 of them 
happens to be a private IP for management purposes.

 When enabling the ping feature of the LCR module the machine sends the 
OPTIONS messages from the private IP. I need it to use at 

least any of the public IPs and if I can specify it it would be even better.


I tried using the directive ping from with one of the public IPs but it only 
uses it to populate the From header, not to send the message from.
 
One option could be to configure the configuration file with the listen 
directive including only the public IPs. However, there are more than 50 IPs,  
is there a limit to the number of IPs?

I tried with a subnet and it is not allowed.


Is there any other work around?

txs a lot

 
fborot



  
___
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] sdpops command not working

2012-05-17 Thread Grégoire Vandendeurpel
Hi, I resolved my issue. Bye

2012/5/17 Grégoire Vandendeurpel g.vandendeur...@gmail.com

 Hello again,

 I have a new question for you:

 In my final project, I have to simulate the public and private network ,
 that's why I use 2 different subnet !

 On my servers machine I have kamailio 3.2.3 in realtime with Asterisk !

 The subnet of asterisk and kamailio is 192.168.1.9 255.255.255.0 , and I
 created an other virtual interface eth0:1 in 172.16.0.10 .

 My puprose is that kamailio use nat and rtpproxy which will be on
 172.16.0.10!! My issue is that when I create a new virtual interface,
 directly Kmaailio listen automatically in UDP TLS TCP on this new address.
 I don't want this!!

 I want Kamailio still listening on 192.168.1.9 in tls udp tcp and has his
 socket on 127.0.0.1:2 and not listening on 172.16.0.10!! It has to be
 rtpproxy that has to listens on 172.16.0.10!!

 So how to stop kamailio listening on 172.16.0.10 and using rtpproxy whith
 the right socket ?? I already now how to use rtpproxy but I need to stop
 kamailio listening on 172.16.0.10 cause of this, rtpproxy does not mean
 anything in this case...

 thanks in advance
 Best regards



 2012/5/15 Grégoire Vandendeurpel g.vandendeur...@gmail.com

 Thanks for all your explanations



 2012/5/15 Reda Aouad reda.ao...@gmail.com

 You can't.

 Siremis is a management and reporting interface.
 You can't implement script routing logic using Siremis.

 Reda



 On Tue, May 15, 2012 at 4:34 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, Working perfectly, thank you.

 I have a last question which is important to for my final project:

 How is it possible to use these commands from sdpops module in SIREMIS?
 like: in the acl menu of ser in siremis, add a new form in which we can
 manage like I said codecs or media .. from a domain or..

 I understood perfectly in kamailio.cfg, now I need to add it in
 Siremis..

 Any idea , how I can add it in?

 Thanks

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 You can check on domain or IP which you can find in the following
 pseudo variables

 $rd: RURI domain
 $fd: FROM domain
 $td: TO domain
 $ad: AUTH domain
 $si: source IP @ of message

 example :

 if ($si == 1.2.3.4) {
 sdp_remove_codec ( ... );
 }

 You can find the complete list of pseudo variables here. Use what you
 want to suit your needs.
 http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables


 Reda



 On Tue, May 15, 2012 at 4:02 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, I should test the dev version , yeah, but I have an other
 question before that, about sdpops:

 Is it possible to remove codecs ( yeah working well on 3.2 ) but
 specifically from an domain or IP ..  ?

 And how?

 Thanks in advance

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Can't help anymore on this.

 But if you're short on time and need a dirty solution, try the
 following functions from textops module:
 replace_body_allORsubst_body

 Match the line m=type... using a grep expression and replace it
 with and empty string.

 I do that to remove lines from SDP body. I ran into some problems to
 do it neatly, so if you have some text messed up while doing it, try to
 include \r\n characters in your grep expression.

 And finally, why don't you install the dev version?

 Reda



 On Tue, May 15, 2012 at 2:22 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello, I already compiled sdpops in 3.2. I tried an other command
 like sdp_remove_codecs_by_id and this one is working well on the 3.2
 version of kamailio!

 I think, the problem is specifically from the remove media command.

 Any suggestion?

 Best regards

 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Hi,

 You can MAY BE copy take the sdpops module from dev version and
 compile it with 3.2. Not sure it would work though.
 However, it should be easy to install the entire dev version, just
 as you did with 3.2.3.

 Reda



 On Tue, May 15, 2012 at 1:15 PM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello,

 Thanks for your answer, is there an other way to use it with the
 3.2.3 version of Kamailio? Cause I'm doing my final project of my 
 bachloor,
 and I really need to use it for.

 Is it possible to change something in the code or.. to make it
 working well with my version?

 Best regards


 2012/5/15 Reda Aouad reda.ao...@gmail.com

 Hi,

 This function is available in Kamailio 3.3 (currently in dev
 stage) and not 3.2.

 Reda



 On Tue, May 15, 2012 at 11:49 AM, Grégoire Vandendeurpel 
 g.vandendeur...@gmail.com wrote:

 Hello,

 I use Kamailio 3.2.3 and I used the command from the sdpops
 module sdp_remove_media(video);

 But when i restarted kamailio, this error appeared:

 0(2623) ERROR: core [cfg.y:3393]: cfg. parser: failed to
 find command sdp_remove_media
 0(2623) : core [cfg.y:3532]: parse error in config file
 /etc/kamailio/kamailio.cfg, line 721, column 27: unknown