Re: [OpenSIPS-Users] [OpenSIPS-Devel] [RFC] OpenSIPS 2.0 - changes on the SIP messages

2010-04-29 Thread Dan Pascu
IMO lumps should go. They're a hackish solution that caused enough  
problems already.
As I see it, we must have the original message and the current message  
(original plus all changes applied in realtime) so one can get at any  
moment the original message and the modified message without any  
complication (modified message should be per branch of course). Re- 
parsing can be kept to a minimum or even avoided completely in certain  
circumstances if the modified message is kept as a dictionary of SIP  
header name/value pairs, plus some extra info about the first line in  
the message and the content.
In other words while the original message is kept both parsed and  
unparsed, the current modified messages are only kept parsed and are  
reconstructed in a text buffer only when sent out.

On 28 Apr 2010, at 13:40, Bogdan-Andrei Iancu wrote:

 Hi,

 sorry for crossposting, but I thing this topic is interesting both for
 users (as experience) and for developers (as solution).

 So, right now the code for 2.0 got to a stage were we need to apply
 changes on the received messages (like adding VIA headers, changing
 headers, etc). And before starting the work on this area, I would like
 to get some opinions on the available options:

1) keep the current mechanism for changing the SIP messages by  
 using
 lumps that are applied only when the message is sent out :
   Advantages: code is there and works; the mechanism is very  
 fast ;
 no need to re-parse the message after the parsing
   Disadvantages : from script or code, you are not able to see the
 previous changes you did on the message, like:
 if you remove a hdr, it will be marked to be removed,
 but you will still see it there after the removed
 if you add a new hdr, you will not be able to see it
 (it will be actually added only when the message will be sent out)
 if you replace the contact hdr (like after
 fix_nated_contact() ) will not see the new contact, but the old one
 trying to apply 2 changes in the same area (like
 changing twice the contact) will result in bogus result.

2) find a new approach that will allow to push in realtime the
 changes on messages
   Advantages: the change will take affect instantly, so all the
 disadvantages from 1) (as user experience in operating opensips) will
 disappear .
   Disadvantages : the code will probably be slower (the changes
 part), but will speed up other parts of the code (where you need to
 manually identify the prev changes);
 changed parts of the SIP message will require re-parsing
 (so the code will have to check the state of a header (if parsed or  
 not)
 before each usage)
 you will not be able to undo changes on the SIP messages  
 in
 an easy way (for example during the parallel and serial forking on
 per-branch changes)

 So this is the dilemma: if the current mechanism (with applying  
 changes
 at the end) such a bad user experience (scripting) in order to try for
 2.0 a different approach ?

 I would like to hear some opinions from both people writing scripts  
 and
 people writing code.

 Thanks and regards,
 Bogdan

 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro


 ___
 Devel mailing list
 de...@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



--
Dan







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 1.6.2 w/ Control Panel 4.0 - Problem w/ CDRViews and Dialog

2010-04-29 Thread Erick Chinchilla Berrocal
Alex this is my current setup 

-  /var/www/opensips-cp/config/db.inc.php

//database driver mysql or pgsql

$config-db_driver = mysql;  

 

 //database host

 $config-db_host = localhost;

 

 //database port - leave empty for default

 $config-db_port = ;

 

 //database connection user

$config-db_user = root;

 

 //database connection password

 $config-db_pass = passwd root;

 

//database name

$config-db_name = opensips;

 

 if (!empty($config-db_port) ) $config-db_host = $config-db_host . : .
$config-db_port;

 

?

 

-  /var/www/opensips-cp/config/boxes.global.inc.php

/* DEFINITION OF BOXES (servers)
*/

// each server is a box

 

$box_id=0;

 

// mi host:port pair || fifo_file

$boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo;

 

// monit host:port

$boxes[$box_id]['monit']['conn']=127.0.0.1:2812;

$boxes[$box_id]['monit']['user']=admin;

$boxes[$box_id]['monit']['pass']=monit;

$boxes[$box_id]['monit']['has_ssl']=0;

 

 

// description (appears in mi , monit )

$boxes[$box_id]['desc']=Primary SIP server;

 

 

$boxes[$box_id]['assoc_id']=1;

 

// enable local smonitor charts on this box : 0=disabled 1=enabled

// (cron)

$boxes[$box_id]['smonitor']['charts']=1;

 

-  Opensips.cfg

-  # - mi_fifo params -

-  modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)

-  modparam(mi_fifo, fifo_mode, 0666)

 

Thanks

Erick Ch.

 

From: users-boun...@lists.opensips.org
[mailto:users-boun...@lists.opensips.org] On Behalf Of Alex Ionescu
Sent: Wednesday, April 28, 2010 3:07 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Opensips 1.6.2 w/ Control Panel 4.0 - Problem
w/ CDRViews and Dialog

 

Hi Erick,

The global db.inc.php (the one you have in /var/www/opensips-cp/config/) is
used by all the modules as long as they don't find something more specific
defined into their config files (like, for example, if you want a different
db setup for module domains you can edit
/var/www/opensips-cp/config/tools/system/domains/db.inc.php - and this will
override the global db setup ).

Dialog takes the call information using a MI command. So you must have
OpenSIPS Control Panel and OpenSIPS configured properly (you must choose
between xmlrpc and fifo) - see the OpenSIPS config file (to enable mi_xmlrpc
module or the mi_fifo) and also check the config/boxes.global.inc.php to
have the correct MI connection parameters set up.

Regards,
Alex
On 4/27/2010 18:24, Erick Chinchilla Berrocal wrote: 

FYI

According the manual

http://opensips-cp.sourceforge.net/ Dialog Module (dialog)

one option is change the setup in the file

/opensips-cp/config/tools/system/dialog/db.inc.php

in the configuration I don't have this file only those following. Please
confirm if need the file db.inc.php

/etc/opensips# ls -al /var/www/opensips-cp/config/tools/system/dialog/

total 16

drwxr-xr-x  2 www-data www-data 4096 2010-04-26 13:46 .

drwxr-xr-x 16 www-data www-data 4096 2010-04-26 11:49 ..

-rw-r--r--  1 www-data www-data 1243 2010-03-08 12:54 local.inc.php

-rw-r--r--  1 www-data www-data 1094 2010-03-08 12:54 menu.inc.php

 

Look this file in the other modules and get. In the modules./tools/.  are in
default setup

/etc/opensips# find / -name db.inc.php

/var/www/opensips-cp/config/tools/admin/add_admin/db.inc.php

/var/www/opensips-cp/config/tools/admin/list_admins/db.inc.php

/var/www/opensips-cp/config/tools/users/user_management/db.inc.php

/var/www/opensips-cp/config/tools/users/alias_management/db.inc.php

/var/www/opensips-cp/config/tools/system/smonitor/db.inc.php

/var/www/opensips-cp/config/tools/system/cdrviewer/db.inc.php

/var/www/opensips-cp/config/tools/system/permissions/db.inc.php

/var/www/opensips-cp/config/tools/system/domains/db.inc.php

/var/www/opensips-cp/config/tools/system/loadbalancer/db.inc.php

/var/www/opensips-cp/config/tools/system/drouting/db.inc.php

/var/www/opensips-cp/config/tools/system/siptrace/db.inc.php

/var/www/opensips-cp/config/tools/system/pdt/db.inc.php

/var/www/opensips-cp/config/tools/system/nathelper/db.inc.php

/var/www/opensips-cp/config/tools/system/dialplan/db.inc.php

/var/www/opensips-cp/config/tools/system/dispatcher/db.inc.php

/var/www/opensips-cp/config/db.inc.php

 

Now, I understand that if only changed this file is ok for all modules, can
you confirm if is correct

/var/www/opensips-cp/config/db.inc.php

//database driver mysql or pgsql

 $config-db_driver = mysql;

 

 //database host

 $config-db_host = localhost;

 

 //database port - leave empty for default

 $config-db_port = ;

 

 //database connection user

 $config-db_user = root;

 

 //database connection password

 $config-db_pass = password for root;

 

 //database name

 $config-db_name = opensips;

 

 if (!empty($config-db_port) ) $config-db_host = $config-db_host . : .
$config-db_port;

 

 

I want to test the 

[OpenSIPS-Users] MediaProxy 1.x - Plz Help

2010-04-29 Thread w0jtas - Wojciech Wrona
Hi,
I'm looking for MediaProxy version 1.8.x. I can't use 2.x becouse of 
existing old version of openser at the installation site which i can't 
change. Where can i find archive versions of media proxy ?

Best regards,
-- 
Wojciech Wrona


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] uac_replace_from

2010-04-29 Thread David Adade
Thanks
help much apreciated
 
modparam(rr, append_fromtag, 1)
modparam(uac,restore_mode,auto) 
 
xlog($fu \n);
uac_replace_from(2101573...@10.10.1.100 mailto:2101573...@10.10.1.100
);
 xlog($fu \n);
 
 
Output
 
sip:02086847...@10.10.1.50
sip:02086847...@10.10.1.50
 
I cant seem to get it to change the value. am i missing something
 
 




From: users-boun...@lists.opensips.org
[mailto:users-boun...@lists.opensips.org] On Behalf Of Antonio Anderson
Souza
Sent: 29 April 2010 00:26
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] uac_replace_from



The best way is to use the uac module.

Calling the function uac_replace_from before the relay, follow a script
snippet bellow:

uac_replace_from(sip:2...@10.10.1.100
mailto:sip%3a2...@10.10.1.100 )

Best regards,


Antonio Anderson M. Souza
Voice Technology
http://www.antonioams.com

Em 28/04/2010 20:19, dcomms i...@dcomms.netescreveu:


HI,


Whats the best way to do this? i have asterisk configured with
fromuser=22

 xlog($fu \n)  shows sip:222...@10.10.1.100
mailto:sip%3a222...@10.10.1.100 


I want to change to sip:111...@10.10.1.100
mailto:sip%3a111...@10.10.1.100  before relay

Even better can someone show me how to change $fu for any ip
address
10.10.1.100

thanks

--
View this message in context:
http://opensips-open-sip-server.1449251.n2.nabble.com/uac-replace-from-t
p4977451p4977451.html
Sent from the OpenSIPS - Users mailing list archive at
Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] uac_replace_from

2010-04-29 Thread Laszlo
2010/4/29 David Adade david.ad...@dcomms.co.uk

  Thanks
 help much apreciated

 modparam(rr, append_fromtag, 1)
 modparam(uac,restore_mode,auto)

 xlog($fu \n);
 uac_replace_from(2101573...@10.10.1.100);


uac_replace_from(sip:2101573...@10.10.1.100 sip%3a2101573...@10.10.1.100
);


  xlog($fu \n);


 Output

 sip:02086847...@10.10.1.50
 sip:02086847...@10.10.1.50

 I cant seem to get it to change the value. am i missing something



  --
 *From:* users-boun...@lists.opensips.org [mailto:
 users-boun...@lists.opensips.org] *On Behalf Of *Antonio Anderson Souza
 *Sent:* 29 April 2010 00:26
 *To:* OpenSIPS users mailling list
 *Subject:* Re: [OpenSIPS-Users] uac_replace_from

  The best way is to use the uac module.

 Calling the function uac_replace_from before the relay, follow a script
 snippet bellow:

 uac_replace_from(sip:2...@10.10.1.100 sip%3a2...@10.10.1.100)

 Best regards,

 Antonio Anderson M. Souza
 Voice Technology
 http://www.antonioams.com

 Em 28/04/2010 20:19, dcomms i...@dcomms.netescreveu:


 HI,


 Whats the best way to do this? i have asterisk configured with
 fromuser=22

  xlog($fu \n)  shows 
 sip:222...@10.10.1.100sip%3a222...@10.10.1.100


 I want to change to 
 sip:111...@10.10.1.100sip%3a111...@10.10.1.100before relay

 Even better can someone show me how to change $fu for any ip address
 10.10.1.100

 thanks

 --
 View this message in context:
 http://opensips-open-sip-server.1449251.n2.nabble.com/uac-replace-from-tp4977451p4977451.html
 Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] install cdrtools

2010-04-29 Thread kenny good
Dear
   who can give me file of cdrtools installation
   I install opensips with mysql  callcontrol
install callcontrol app
   But I cann't install CDRTools 

   apt-get install cdrtool
   tell me need geoip-database,OK I installed ,and do it again
   tell me need php5-geoip,OK installingbut this step remove the 
geoip-database

   My god? How to do?


Kenny ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Modify Script variable

2010-04-29 Thread Bogdan-Andrei Iancu
Hi,

most of the variables (the once allowing access to the SIP message) are 
read-only, so you cannot change them - better see :
   http://www.opensips.org/Resources/DocsCoreVar16

Regards,
Bogdan

dcomms wrote:
 HI,


 Whats the best way to do this? i have asterisk configured with 
 fromuser=22
  
  xlog($fu \n)  shows sip:222...@10.10.1.100
  

 I want to change to sip:111...@10.10.1.100 before relay

 Even better can someone show me how to change $fu for any ip address
 10.10.1.100

 thanks

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] install cdrtools

2010-04-29 Thread brianpocock

A quick google of CDRTool found the CDRTool website which has a good
installation guide:
http://cdrtool.ag-projects.com/wiki/Install
In the installation guide there is a link to where you can download the tar
of it:
http://download.ag-projects.com/CDRTool/

Hope this helps :)
-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/install-cdrtools-tp4978787p4978878.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Issue with rls module?

2010-04-29 Thread Andres2 Cores2
Thanks Anca

I have another issue with RLS Subscription expiration. I send a Subscribe to
RLS and I expect a final (Subscription Ste=terminated) Notify when the
subscriptione expires. But I receive no such message.
On the other hand, after a few hours it seems indeed the subscription is not
active anymore.

Sorry to bother you on this, maybe it is a configuration issue.

Best regards

Andrés


2010/4/28 Anca Vamanu a...@opensips.org

 Andres2 Cores2 wrote:
  Thank you Anca
 
  In fact I am using the user-agent (picked it up from one config file),
  either my client either opensips.
if($hdr(User-Agent) =~ me)
{
  xlog(L_DBG,RLS subscribe);
  $var(ret_code)= rls_handle_subscribe();
   if($var(ret_code)== 10){
   handle_subscribe();
}
 }
 else
 {
xlog( route 2 subscribe normal --- \n);
 handle_subscribe();
 }
 
  Now, after some fixes of the configuration, it seems the flow is
  correctly managed.
  There is still one point I am not sure. I had some issues with the
  NOTIFY sent by PS to RLS
  that was not correctly managed and I fixed it by adding this condition
  for NOTIFY
 
  if
  ((is_method(SUBSCRIBE)||is_method(NOTIFY))  $rd == 10.62.0.155) {
  # in-dialog subscribe requests
  route(2);
  exit;
  }
 
  Where route(2) invokes rls_handle_notify() for NOTIFY requests.
 
  Do you think it is fine? It is not perfectly clear what is called the
  in-dialog subscribe requests.
 
 Yes, the check is all right. The most common check is if uri ==
 myself, because then it is sure that the Notify is addressed to
 OpenSIPS. The stricter check is uri== what you set in server_address
 prameter for module rls.
 That comment line with in-dialog requests is put there because that if
 you look in the default configuration file - initial and in-dialog
 rquests are processed separately. The type is determined at the
 beginning and there are two different block for the two types of
 messages. So, for Subscribes route(2) is called in two places in the
 script - once for the initial ones and also for the in dialog ones.
 Anyhow that comment is not something you should worry about.

 Regards,

 --
 Anca Vamanu
 www.voice-system.ro


  Thanks for all.
  Andrew
 
 
  2010/4/28 Anca Vamanu a...@opensips.org mailto:a...@opensips.org
 
  Hi Andrew,
 
  Thanks for your appreciation.
  The thing that you need to take care with RLS are the Subscribe
  messages
  sent by the RLS server ( because this is the mechanism - when
  receiving
  a Subscribe for RLS the rls server will send more Subscribe
  messages to
  the presence server, and I see that you have the presence server
  collocated with rls). You need to make sure that these are handled by
  the presence server and that they do not go into rls again. For
  this you
  can check the source of the message and if it is the same machine
 just
  call handle_subscribe.
 
  if(is_method(SUBSCRIBE)  si == _local_ip_)
 handle_subscribe();
 
  If you watch the network trace and log where each subscribe goes for
  processing and still notice this errors, post again an email on
  the list.
 
  Regards,
 
  --
  Anca Vamanu
  www.voice-system.ro http://www.voice-system.ro
 
 
 
 
  Andres2 Cores2 wrote:
   Hi,
  
   First of all we would like to thank the whole opensips team. For
   testing our client, we are mainly interested in the presence and
 rls
   topics and found that a pretty good set of features is available
  right
   now, so thanks for your job.
  
   During our tests we encountered an issue running opensips 1.6 in
   rls-server mode (simple presence works fine). It seems to us it is
   just a configuration issue or a bug in the routing rules, but we
  can't
   find out it.
  
   From the client point of view I cannot succeed in receiving
 presence
   Notify messages body, only rlmi parts are provided.
  
   In fact it seems rls_handle_subscribe has issues when trying to
 send
   Subscribes to Presence on behalf of rls. I have systematically
  errors
   presence:get_stored_info: record not found in hash_table and
   sometimes Duplicate entry
   'sip:alice-l...@promethee.test.com-cbb99ea81711c30ed9c0edf6' for
  key 2
  
   Typically:
   Apr 26 13:45:57 [20047] ERROR:db_mysql:db_mysql_do_prepared_query:
   driver error: Duplicate entry
   'sip:alice-l...@promethee.test.com-cbb99ea81711c30ed9c0edf6' for
  key 2
   Apr 26 13:45:57 [20047] ERROR:presence:update_db_subs: unsuccessful
   sql insert
   Apr 26 13:46:01 [20045] ERROR:presence:get_stored_info: record not
   

Re: [OpenSIPS-Users] uac_replace_from

2010-04-29 Thread Bogdan-Andrei Iancu
Hi David,

David Adade wrote:
 Thanks
 help much apreciated
  
 modparam(rr, append_fromtag, 1)
 modparam(uac,restore_mode,auto) 
  
 xlog($fu \n);
 uac_replace_from(2101573...@10.10.1.100 mailto:2101573...@10.10.1.100);
  xlog($fu \n);
  
  
 Output
  
 sip:02086847...@10.10.1.50
 sip:02086847...@10.10.1.50
  
 I cant seem to get it to change the value. am i missing something
  
It is ok, the $fu prints all the time the original FROM URI (it does not 
reflect the changes) - but check the outgoing SIP message to see if the 
FROM URI was indeed changed.

Regards,
Bogdan
  

 
 *From:* users-boun...@lists.opensips.org 
 [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Antonio 
 Anderson Souza
 *Sent:* 29 April 2010 00:26
 *To:* OpenSIPS users mailling list
 *Subject:* Re: [OpenSIPS-Users] uac_replace_from

 The best way is to use the uac module.

 Calling the function uac_replace_from before the relay, follow a 
 script snippet bellow:

 uac_replace_from(sip:2...@10.10.1.100 
 mailto:sip%3a2...@10.10.1.100)

 Best regards,

 Antonio Anderson M. Souza
 Voice Technology
 http://www.antonioams.com

 Em 28/04/2010 20:19, dcomms i...@dcomms.net 
 mailto:i...@dcomms.netescreveu:


 HI,


 Whats the best way to do this? i have asterisk configured with
 fromuser=22

  xlog($fu \n)  shows sip:222...@10.10.1.100 
 mailto:sip%3a222...@10.10.1.100


 I want to change to sip:111...@10.10.1.100 
 mailto:sip%3a111...@10.10.1.100 before relay

 Even better can someone show me how to change $fu for any ip address
 10.10.1.100

 thanks

 --
 View this message in context: 
 http://opensips-open-sip-server.1449251.n2.nabble.com/uac-replace-from-tp4977451p4977451.html
 Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

 ___
 Users mailing list
 Users@lists.opensips.org mailto:Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Autehntification from DB with AVPOPS module ?

2010-04-29 Thread samoh

Hi everybody,


Can I do the autehntification from DB with AVPOPS and UAC modules ?

I want to do the authentification from DB (no opensips DB)  but I don't know
how to proceed.

I don't know if my start's code is right ? (befor, I'd like to test on
opesips DB):

modparam(avpops,db_url,mysql://opensips:opensip...@localhost/opensips)
modparam(avpops,avp_table,subscriber)

modparam(uac, auth_username_avp, $avp(i:1))
modparam(uac, auth_password_avp, $avp(i:2))
modparam(uac, auth_realm_avp, $avp(i:3)) 

avp_db_query(SELECT username, password, realm FROM subscriber WHERE where
username='$tu', $avp(i:1);$avp(i:2);$avp(i:3));

can anyone help me please ?.

Thanks.

Sam.



-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Autehntification-from-DB-with-AVPOPS-module-tp4979020p4979020.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Question about B2BUA

2010-04-29 Thread Vadim Grinco
Hi Guys,

Do the B2Bua modules in Opensips permit the box to register to a remote sip
proxy?
If yes, can you please point me to an example or documentation how to
implement that?

Thanks,
-- 
Best regards,
Vadim Grinco
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Storage of registered users.

2010-04-29 Thread Saúl Ibarra Corretgé
On 29/4/10 3:45 PM, brianpocock wrote:

 Just out of interest, where are registered users stored when a backend
 database is not used, is it a text file somewhere?

 Thanks

If no persistent storage backend is used then they are stored in memory.

Regards,

-- 
Saúl Ibarra Corretgé
AG Projects

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Storage of registered users.

2010-04-29 Thread brianpocock

Thanks for that, so if you were to stop opensips any user you had created
would be lost?

Thanks

On 29 April 2010 15:19, Saúl Ibarra Corretgé [via OpenSIPS (Open SIP
Server)] 
ml-node+4980220-183174806-480...@n2.nabble.comml-node%2b4980220-183174806-480...@n2.nabble.com
 wrote:

 On 29/4/10 3:45 PM, brianpocock wrote:
 
  Just out of interest, where are registered users stored when a backend
  database is not used, is it a text file somewhere?
 
  Thanks

 If no persistent storage backend is used then they are stored in memory.

 Regards,

 --
 Saúl Ibarra Corretgé
 AG Projects

 ___
 Users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4980220i=0
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 --
  View message @
 http://opensips-open-sip-server.1449251.n2.nabble.com/Storage-of-registered-users-tp4980049p4980220.html
 To unsubscribe from OpenSIPS (Open SIP Server), click 
 herehttp://opensips-open-sip-server.1449251.n2.nabble.com/subscriptions/Unsubscribe.jtp?code=YnJpYW5rZWl0aGphbWVzQGdvb2dsZW1haWwuY29tfDE0NDkyNTF8NTkyNDg5NzI0.




-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Storage-of-registered-users-tp4980049p4980232.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Storage of registered users.

2010-04-29 Thread Saúl Ibarra Corretgé
On 29/4/10 4:20 PM, brianpocock wrote:
 Thanks for that, so if you were to stop opensips any user you had
 created would be lost?

 Thanks


Yes. A database is not really needed, db_text uses a text file as the 
persistent storage backend.


Regards,

-- 
Saúl Ibarra Corretgé
AG Projects

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] NAT Problem using Nat helper

2010-04-29 Thread Ahmed Munir
Hi,

I've configured OpenSIPs with FreeRadius, the version for OpenSIPs I'm using
is 1.6.1 and FreeRadius verison is update 2 date. When I register 2
sofphone, they got authenticated and authorized by radius and got
registered sucessfully. Even I made calls between two softphone
sucessfully(Can hear one another). The UAS configured on different network
means hosted with public IP and my softphones are registered other and NATed
network. I mapped a DID on UAS and mapped it on my one of my softphone. The
problem I'm facing is when call coming from DID and ring my phone the caller
can hear me but I can't hear the caller(one way calling issue). But not
facing the problem on when calling between to sip clients and also calling
from OpenSIPs to Asterisk. The configuration and cases for OpenSIPs is
listed down below;


UAC-- UAS(OpenSIPs) -
UACtwo way voice is establised
 UAC-- UAS(OpenSIPs) - Asterisk
 UACtwo way voice is establised
PSTN-- UAS(OpenSIPs)
- UAC  one way
voice is establised
(hears the dest voice)(can't hear caller
voice)


#loadmodule auth_diameter.so
loadmodule aaa_radius.so
loadmodule auth_aaa.so
loadmodule permissions.so
loadmodule nathelper.so
#Settings For
Radius-
#modparam(auth_diameter, diameter_client_host, localhost)
modparam(aaa_radius,
radius_config,/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(acc, aaa_url,
radius:/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(acc, aaa_flag, 2)
modparam(acc, aaa_missed_flag, 3)
modparam(acc, aaa_extra, User-Name=$Au; \
Calling-Station-Id=$from; \
Called-Station-Id=$to; \
Sip-Translated-Request-URI=$ruri; \
Sip-RPid=$avp(s:rpid); \
Source-IP=$si; \
Source-Port=$sp; \
Canonical-URI=$avp(s:can_uri); \
Billing-Party=$avp(s:billing_party); \
Divert-Reason=$avp(s:divert_reason); \
X-RTP-Stat=$hdr(X-RTP-Stat); \
Contact=$hdr(contact); \
Event=$hdr(event); \
SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
ENUM-TLD=$avp(s:enum_tld))
modparam(auth_aaa,aaa_url,radius:/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(auth, rpid_prefix, sip:)
modparam(auth, rpid_suffix, @11.22.33.44;screen=yes;privacy=off)
modparam(auth, rpid_avp, $avp(s:rpid))
#modparam(uri,service_type,10)
# - setting module-specific parameters ---
modparam(dispatcher, db_url, mysql://opensips:opensip...@localhost
/opensips)
modparam(permissions, db_url, mysql://opensips:opensip...@localhost
/opensips)
#- setting NAT module parameters -
modparam(nathelper,ping_nated_only,1)
modparam(nathelper, natping_interval, 30)
modparam(nathelper,natping_processes,1)
#modparam(nathelper,rtpproxy_sock,udp:127.0.0.1:7890)
modparam(nathelper,rtpproxy_sock, )
modparam(nathelper,received_avp,$avp(i:42))
#modparam(nathelper, sipping_bflag, 7)
modparam(usrloc, nat_bflag, 6)
### Routing Logic 
# main request routing logic
route{
 if (!mf_process_maxfwd_header(10)) {
  sl_send_reply(483,Too Many Hops);
  exit;
 }

 #NAT detection
 log(# Go to Route 3 for NAT
Detection #);
 route(3);
 if (has_totag()) {
  # sequential request withing a dialog should
  # take the path determined by record-routing
  if (loose_route()) {
   if (is_method(BYE)) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
   } else if (is_method(INVITE)) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
   }
   # route it out to whatever destination was set by loose_route()
   # in $du (destination URI).
   route(1);
  } else {
   if ( is_method(ACK) ) {
if ( t_check_trans() ) {
 # non loose-route, but stateful ACK; must be an ACK after
 # a 487 or e.g. 404 from upstream server
 t_relay();
 exit;
} else {
 # ACK without matching transaction -
 # ignore and discard
 exit;
}
   }
   sl_send_reply(404,Not here);
  }
  exit;
 }
 #initial requests
 # CANCEL processing
 if (is_method(CANCEL))
 {
  if (t_check_trans())
   t_relay();
  exit;
 }
 t_check_trans();
 if (loose_route()) {
  xlog(L_ERR,
  Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]);
  if (!is_method(ACK))
   sl_send_reply(403,Preload Route denied);
  exit;
 }
 # record routing
 if (!is_method(REGISTER|MESSAGE))
  record_route();

 #$avp(i:27)=check_source_address(0);
 #xlog(Check Source Address from Address TABLE : $(avp(i:27))\n);
 $avp(s:checksrc) = check_source_address(0);
 
log(###\n);
 xlog(Check 

[OpenSIPS-Users] Opensips logging issue?

2010-04-29 Thread Adelson O. Junior
Hello list,

We were used to disable logs (debug=0) due to problems regarding to old
Openser versions, and this became standard when we were going to migrate
from Test to Production environments.
But in the last one we forget this setting, and the log was enabled in
Production Env, but no one was concerned about this, we though that this
problem didn' t happen in Opensips, but it did.

So, the problem itself is:
The Opensips receive a INVITE packet, and took too long to forward.

Looking in the log, we could see the lines about the processing of INVITE
(instantly forwarded). But the time between the packet arrival (capturing by
ngrep) and your lines in the log its about  2, 3, 4 seconds of difference.

This problem, as I said we already faced it on openser versions, and we only
have disable logs (debug=0) in opensips.cfg, restart the service and it got
back to work normally.

Did someone faced this problem?

-- 
Adelson
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Command opensipsctl dialplan reload randomly hangs

2010-04-29 Thread DanB
Hey Bogdan,

Hereby some more tests (I should mention that I cannot block on demand
the fifo, it simply randomly blocks, so I must be lucky when I am
trying to reproduce it).

Based on ps the cpu and memory consuption do not increase during the
hang (CPU:0.0  Memory:1.0).

Ta,
DanB

Log of the actions:
---

Before reload:

sip1:~# opensipsctl ps|grep FIFO

Process::  ID=13 PID=26368 Type=MI FIFO

sip1:~# ps uww -p 26368

USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND

opensips 26368  0.0  1.0 1147236 10788 ?   S07:30   0:00
/usr/sbin/opensips -P /var/run/opensips/opensips.pid -m 1024 -u opensips -g
opensips

sip1:~#



During hanging reload:

sip1:~# ps uww -p 26368

USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND

opensips 26368  0.0  1.0 1147644 11040 ?   R07:30   0:00
/usr/sbin/opensips -P /var/run/opensips/opensips.pid -m 1024 -u opensips -g
opensips


After reload interrupted with crtl+c and /etc/init.d/opensips restart


sip1:~# ps uww -p 26368

USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND

sip1:~# opensipsctl ps|grep FIFO

Process::  ID=13 PID=26716 Type=MI FIFO

sip1:~# ps uww -p 26716

USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND

opensips 26716  0.0  0.1 1147164 1988 ?S14:59   0:00
/usr/sbin/opensips -P /var/run/opensips/opensips.pid -m 1024 -u opensips -g
opensips

On Mon, Apr 26, 2010 at 12:25 PM, Bogdan-Andrei Iancu
bog...@voice-system.ro wrote:
 Hi Dan,

 Your descriptions point to a blocked fifo process. Blocking maybe
 because of some internal locking (you see 99% cpu usage) or some I/O
 (normal cpu usage).

 So, do the followings:

 1) do opensipsctl fifo ps to see the PID of the fifo process
 2) make fifo to block
 3) check if the fifo process (by pid) is there - if yes, see how much
 cpu it uses and try to attache with gdb to it to get a backtrace.

 Regards,
 Bogdan

 DanB wrote:
 Hey Bogdan,

 Thanks for coming back so fast.

 There was no error reported neither on console nor in the syslog
 (debug 7). I will need to check for dead process since all I could
 spot was no reply back and console hanging, and be able to stop it
 only with Ctrl+C. After Ctrl+C could not get the any other opensipsctl
 commands to work.
 Will need to wait few days more to know about dead process.

 DanB

 On Thu, Apr 22, 2010 at 6:55 PM, Bogdan-Andrei Iancu
 bog...@voice-system.ro wrote:

 Hi Dan,

 Did you notice any error from the fifo process during the reload ? it
 may be something related to locking (during reload) of the table - this
 may affect all the other processes.

 So, any errors? any dead processes (like fifo one) ?

 Regards,
 Bogdan

 DanB wrote:

 Hey Guys,

 I have noticed the opensipsctl dialplan reload command randomly
 hanging, sometimes even the server itself becoming non responsible,
 other times reloading the dialplan into memory but not reporting
 anything on console, the last one becoming unusable until server
 restart. This happened in the past as well but with the traffic
 increase, it becomes more and more annoying. I suspect the same bug
 which was present in the past with fifo hanging.
 I should mention that I got about 2000 records in the dialplan table,
 so I would say not that much loaded.

 The version I am running:
 sip1:/home/employee/dan# opensips -V
 version: opensips 1.6.1-notls (x86_64/linux)
 flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST,
 SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
 ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
 MAX_URI_SIZE 1024, BUF_SIZE 65535
 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
 svnrevision: 2:6509M
 @(#) $Id: main.c 6169 2009-09-22 12:48:37Z bogdan_iancu $
 main.c compiled on 14:43:30 Jan 11 2010 with gcc 4.3.2


 All I could find in the logs was database reconnection in the case of
 hang but no error or something else reported (running debug 7).
 Bellow some of the log:
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 DBG:mi_fifo:mi_fifo_server: entered consume
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 DBG:mi_fifo:mi_fifo_server:  done consume
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]: DBG:dialplan:dp_load_db: 
 init
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 INFO:db_mysql:db_mysql_submit_query: disconect event for 0x77f060
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 INFO:db_mysql:reset_all_statements: reseting all statements on
 connection: (0x77fd18) 0x77f060
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 DBG:db_mysql:db_mysql_connect: opening connection:
 mysql://:x...@192.168.11.253/sipeandb
 Apr 22 14:27:19 sip1 /usr/sbin/opensips[16299]:
 DBG:db_mysql:db_mysql_connect: connection type is 192.168.11.253 via
 TCP/IP

Re: [OpenSIPS-Users] Question about B2BUA

2010-04-29 Thread Anca Vamanu
Hi Vadim,

B2BUA only handles calls. What do you mean by registering to another box?


Regards,

-- 
Anca Vamanu
www.voice-system.ro




Vadim Grinco wrote:
 Hi Guys,

 Do the B2Bua modules in Opensips permit the box to register to a 
 remote sip proxy?
 If yes, can you please point me to an example or documentation how to 
 implement that?

 Thanks,
 -- 
 Best regards,
 Vadim Grinco

 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about B2BUA

2010-04-29 Thread Vadim Grinco
Salut Anca,

Thank you for your answer. That's exactly what I expected it to be, but
someone told me that it is possible to use opensips as UA to register to a
ITSP proxy server, to be able to receive incoming calls from it. I was
always using asterisk between opensips and my ITSP, and am very curious if I
can get rid of the asterisk server. The ITSP requires auth, so I can't use
rewritehostport or other ways of routing the calls to it.

Cheers,

On Thu, Apr 29, 2010 at 5:15 PM, Anca Vamanu a...@opensips.org wrote:

 Hi Vadim,

 B2BUA only handles calls. What do you mean by registering to another box?


 Regards,

 --
 Anca Vamanu
 www.voice-system.ro




 Vadim Grinco wrote:
  Hi Guys,
 
  Do the B2Bua modules in Opensips permit the box to register to a
  remote sip proxy?
  If yes, can you please point me to an example or documentation how to
  implement that?
 
  Thanks,
  --
  Best regards,
  Vadim Grinco
 
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




-- 
Best regards,
Vadim Grinco
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Send a request to multiple gateways

2010-04-29 Thread Ross Beer

Hi All,

 

Is there a way I can send a 'call pickup' request to multiple Asterisk servers 
at the same time, then the first one to answer gets the call?

 

I think this is some sort of fork or branch?

 

If anyone can offer any advice or examples I would be very greatful.

 

Kind regards,

 

Ross
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS defunct processes

2010-04-29 Thread David Cunningham
Hello,

Certainly, here they are from opensips.cfg and I've included the
modparam in case they help:

loadmodule db_mysql.so
loadmodule sl.so
loadmodule tm.so
loadmodule usrloc.so
loadmodule auth.so
loadmodule auth_db.so
loadmodule maxfwd.so
loadmodule mi_fifo.so
loadmodule nathelper.so
loadmodule perl.so
loadmodule registrar.so
loadmodule rr.so
loadmodule textops.so
loadmodule uri.so

modparam( auth, nonce_expire, 30 )
modparam( auth_db|domain|uri_db|usrloc, db_url, mysql://foo )
modparam( auth_db, calculate_ha1, yes )
modparam( auth_db, password_column, secret )
modparam( auth_db, use_domain, 0 )
modparam( auth_db, user_column, name )
modparam( mi_fifo, fifo_name, /tmp/opensips_fifo )
modparam( nathelper, natping_interval, 240 )
modparam( nathelper, ping_nated_only, 1 )
modparam( nathelper, sipping_bflag, 1 )
modparam( nathelper, sipping_from, sip:keepal...@foo )
modparam( nathelper|registrar, received_avp, $avp(i:42) )
modparam( perl, filename, /path/to/OpenSIPS.pm )
modparam( perl, modpath, /path/to/perllib )
modparam( registrar, append_branches, 1 )
modparam( rr, enable_full_lr, 1 )
modparam( usrloc, db_mode, 2 )
modparam( usrloc, desc_time_order, 1 )
modparam( usrloc, nat_bflag, 1 )
modparam( usrloc, timer_interval, 5 )


Thank you!

On Wed, Apr 28, 2010 at 4:53 PM, Bogdan-Andrei Iancu
bog...@voice-system.ro wrote:
 Hi David,

 by chance, using the exec module  ?

 Or, can you list the modules you are using ?

 Regards,
 Bogdan

 David Cunningham wrote:
 Hello,

 Thank you for the reply. I checked the parent of the zombie processes,
 and they seem to be SIP receiver processes as per the following ps
 -ef extract and opensipsctl fifo ps information.
 We're not running the respawn patch.

 Any more advice very welcome, thanks again!


 user  5830     1  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5832  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5833  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5834  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5835  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5836  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5837  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5838  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5839  5830  0 06:38 ?        00:00:16 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5840  5830  0 06:38 ?        00:00:01 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5841  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5842  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5843  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5844  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5845  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5846  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5847  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5848  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5849  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5850  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  5851  5830  0 06:38 ?        00:00:00 /sbin/opensips -m 256 -P
 /var/run/user/opensips.pid
 user  7260  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  7261  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  7262  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  7263  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  7264  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  7265  5833  0 08:30 ?        00:00:00 [opensips] defunct
 user  9770  5835  0 08:37 ?        00:00:00 [opensips] defunct
 user  9771  5835  0 08:37 ?        00:00:00 [opensips] defunct
 user  9772  5835  0 08:37 ?        00:00:00 [opensips] defunct
 user  9838  5834  0 08:38 ?        00:00:00 [opensips] defunct
 user  9839  5834  0 08:38 ?        00:00:00 [opensips] defunct
 user 15519  5833  0 08:57 ?        00:00:00 [opensips] defunct
 user 15520  5833  0 08:57 ?        00:00:00 [opensips] defunct
 user 15521  5833  0 08:57 ?        00:00:00 [opensips] defunct
 user 15522  5833  0 08:57 ?        00:00:00 [opensips] defunct


 [r...@hostname ~]# opensipsctl fifo ps
 Process::  ID=0 PID=5830 Type=attendant
 Process::  ID=1 PID=5832 Type=SIP receiver udp:xxx.xxx.xxx.xxx:5060
 Process::  ID=2 PID=5833 Type=SIP receiver 

Re: [OpenSIPS-Users] Autehntification from DB with AVPOPS module ?

2010-04-29 Thread Bogdan-Andrei Iancu
Hi Sam,

Use the auth module (pv_www_authorize and pv_proxy_authorize ) functions 
to do auth with a password you have form other place (and not from 
subscriber table).

Regards,
Bogdan

samoh wrote:
 Hi everybody,


 Can I do the autehntification from DB with AVPOPS and UAC modules ?

 I want to do the authentification from DB (no opensips DB)  but I don't know
 how to proceed.

 I don't know if my start's code is right ? (befor, I'd like to test on
 opesips DB):

 modparam(avpops,db_url,mysql://opensips:opensip...@localhost/opensips)
 modparam(avpops,avp_table,subscriber)

 modparam(uac, auth_username_avp, $avp(i:1))
 modparam(uac, auth_password_avp, $avp(i:2))
 modparam(uac, auth_realm_avp, $avp(i:3)) 

 avp_db_query(SELECT username, password, realm FROM subscriber WHERE where
 username='$tu', $avp(i:1);$avp(i:2);$avp(i:3));

 can anyone help me please ?.

 Thanks.

 Sam.
   

-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Send a request to multiple gateways

2010-04-29 Thread Bogdan-Andrei Iancu
Hi Ross,

that is parallel forking, and you can do it simple like : RURI will hold 
the first destination, use append_branch() to add the rest of them and 
simply relay it out:

$ru = A1;
append_branch(A2);
t_relay();


Regards,
Bogdan

Ross Beer wrote:
 Hi All,
  
 Is there a way I can send a 'call pickup' request to multiple Asterisk 
 servers at the same time, then the first one to answer gets the call?
  
 I think this is some sort of fork or branch?
  
 If anyone can offer any advice or examples I would be very greatful.
  
 Kind regards,
  
 Ross

 
 Get a free e-mail account with Hotmail. Sign-up now. 
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] tm - module out of memory

2010-04-29 Thread Julien Chavanton
tm module went out of memory, we did face other problems  with a non compliant 
SIP device, so this could well be a side effect of it.

Any recommendation on tm memory usage ?

opensips log
---

Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:new_t: out of mem
Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:t_newtran: new_t 
failed

 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] tm - module out of memory

2010-04-29 Thread Julien Chavanton
 
I have to diagnostic this system further, as before facing a memory shortage, 
there is a huge bunch of
ERROR:tm:t_check: reply cannot be parsed
 
 
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***BRANCH ROUTE**
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20104]: ***REPLY ROUTE - 
td[10.1.16.50]**
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20103]: ERROR:tm:t_check: reply 
cannot be parsed
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***HOST ROUTED ***




From: users-boun...@lists.opensips.org on behalf of Julien Chavanton
Sent: Thu 29/04/2010 8:27 PM
To: Users@lists.opensips.org
Subject: [OpenSIPS-Users] tm - module out of memory



tm module went out of memory, we did face other problems  with a non compliant 
SIP device, so this could well be a side effect of it.

Any recommendation on tm memory usage ?

opensips log
---

Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:new_t: out of mem
Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:t_newtran: new_t 
failed

 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] NAT Problem using Nat helper

2010-04-29 Thread Antonio Anderson Souza
Ahmed,

Could you send an wireshark trace to the list? It will be easier to check
what's going wrong.

Besta regards,

Antonio Anderson M. Souza
Voice Technology
http://www.antonioams.com

Em 29/04/2010 11:47, Ahmed Munir ahmedmunir...@gmail.comescreveu:

Hi,

I've configured OpenSIPs with FreeRadius, the version for OpenSIPs I'm using
is 1.6.1 and FreeRadius verison is update 2 date. When I register 2
sofphone, they got authenticated and authorized by radius and got
registered sucessfully. Even I made calls between two softphone
sucessfully(Can hear one another). The UAS configured on different network
means hosted with public IP and my softphones are registered other and NATed
network. I mapped a DID on UAS and mapped it on my one of my softphone. The
problem I'm facing is when call coming from DID and ring my phone the caller
can hear me but I can't hear the caller(one way calling issue). But not
facing the problem on when calling between to sip clients and also calling
from OpenSIPs to Asterisk. The configuration and cases for OpenSIPs is
listed down below;


UAC-- UAS(OpenSIPs) -
UACtwo way voice is establised
 UAC-- UAS(OpenSIPs) - Asterisk
 UACtwo way voice is establised
PSTN-- UAS(OpenSIPs)
- UAC  one way
voice is establised
(hears the dest voice)(can't hear caller
voice)


#loadmodule auth_diameter.so
loadmodule aaa_radius.so
loadmodule auth_aaa.so
loadmodule permissions.so
loadmodule nathelper.so
#Settings For
Radius-
#modparam(auth_diameter, diameter_client_host, localhost)
modparam(aaa_radius,
radius_config,/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(acc, aaa_url,
radius:/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(acc, aaa_flag, 2)
modparam(acc, aaa_missed_flag, 3)
modparam(acc, aaa_extra, User-Name=$Au; \
Calling-Station-Id=$from; \
Called-Station-Id=$to; \
Sip-Translated-Request-URI=$ruri; \
Sip-RPid=$avp(s:rpid); \
Source-IP=$si; \
Source-Port=$sp; \
Canonical-URI=$avp(s:can_uri); \
Billing-Party=$avp(s:billing_party); \
Divert-Reason=$avp(s:divert_reason); \
X-RTP-Stat=$hdr(X-RTP-Stat); \
Contact=$hdr(contact); \
Event=$hdr(event); \
SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
ENUM-TLD=$avp(s:enum_tld))
modparam(auth_aaa,aaa_url,radius:/usr/etc/radiusclient-ng/radiusclient.conf)
modparam(auth, rpid_prefix, sip:)
modparam(auth, rpid_suffix, @11.22.33.44;screen=yes;privacy=off)
modparam(auth, rpid_avp, $avp(s:rpid))
#modparam(uri,service_type,10)
# - setting module-specific parameters ---
modparam(dispatcher, db_url, mysql://opensips:opensip...@localhost
/opensips)
modparam(permissions, db_url, mysql://opensips:opensip...@localhost
/opensips)
#- setting NAT module parameters -
modparam(nathelper,ping_nated_only,1)
modparam(nathelper, natping_interval, 30)
modparam(nathelper,natping_processes,1)
#modparam(nathelper,rtpproxy_sock,udp:127.0.0.1:7890)
modparam(nathelper,rtpproxy_sock, )
modparam(nathelper,received_avp,$avp(i:42))
#modparam(nathelper, sipping_bflag, 7)
modparam(usrloc, nat_bflag, 6)
### Routing Logic 
# main request routing logic
route{
 if (!mf_process_maxfwd_header(10)) {
  sl_send_reply(483,Too Many Hops);
  exit;
 }

 #NAT detection
 log(# Go to Route 3 for NAT
Detection #);
 route(3);
 if (has_totag()) {
  # sequential request withing a dialog should
  # take the path determined by record-routing
  if (loose_route()) {
   if (is_method(BYE)) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
   } else if (is_method(INVITE)) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
   }
   # route it out to whatever destination was set by loose_route()
   # in $du (destination URI).
   route(1);
  } else {
   if ( is_method(ACK) ) {
if ( t_check_trans() ) {
 # non loose-route, but stateful ACK; must be an ACK after
 # a 487 or e.g. 404 from upstream server
 t_relay();
 exit;
} else {
 # ACK without matching transaction -
 # ignore and discard
 exit;
}
   }
   sl_send_reply(404,Not here);
  }
  exit;
 }
 #initial requests
 # CANCEL processing
 if (is_method(CANCEL))
 {
  if (t_check_trans())
   t_relay();
  exit;
 }
 t_check_trans();
 if (loose_route()) {
  xlog(L_ERR,
  Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]);
  if (!is_method(ACK))
   sl_send_reply(403,Preload Route denied);
  exit;
 }
 # record routing
 if (!is_method(REGISTER|MESSAGE))
  record_route();

 

[OpenSIPS-Users] RADIUS AVP related Error

2010-04-29 Thread vishu gaddi
I have configured Opensips, Radius and CDRTool. But while making a
call i am getting following error and no Data is inserted into
'radacct'  table.

ERROR =
rc_avpair_new: unknown attribute 0
Apr 29 06:19:09 opensips /sbin/opensips[32327]:
ERROR:aaa_radius:rad_avp_add: failure
Apr 29 06:19:09 opensips /sbin/opensips[32327]:
ERROR:acc:acc_aaa_request: failed to add Bcontact, 10


Please help me, where should i look for ?

Thanks,
Vishu

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] tm - module out of memory

2010-04-29 Thread Julien Chavanton
   
I found is a routing loop with another equipement, I was able to find some 
trace, this is not an Opensips related problem anymore.
 



From: users-boun...@lists.opensips.org on behalf of Julien Chavanton
Sent: Thu 29/04/2010 11:22 PM
To: OpenSIPS users mailling list; Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] tm - module out of memory


 
I have to diagnostic this system further, as before facing a memory shortage, 
there is a huge bunch of
ERROR:tm:t_check: reply cannot be parsed
 
 
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***BRANCH ROUTE**
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20104]: ***REPLY ROUTE - 
td[10.1.16.50]**
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20103]: ERROR:tm:t_check: reply 
cannot be parsed
Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***HOST ROUTED ***




From: users-boun...@lists.opensips.org on behalf of Julien Chavanton
Sent: Thu 29/04/2010 8:27 PM
To: Users@lists.opensips.org
Subject: [OpenSIPS-Users] tm - module out of memory



tm module went out of memory, we did face other problems  with a non compliant 
SIP device, so this could well be a side effect of it.

Any recommendation on tm memory usage ?

opensips log
---

Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:new_t: out of mem
Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:t_newtran: new_t 
failed

 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] tm - module out of memory

2010-04-29 Thread Brett Nemeroff
For what it's worth, I have also experienced out of memory error occurring
from large quantities of routing loops that I hadn't detected. The memory
loss was so bad that opensips stopped processing calls (but never seemed to
have crashed).

Memory errors went away when I resolved the route loops. :)
-Brett


On Thu, Apr 29, 2010 at 7:22 PM, Julien Chavanton j...@atlastelecom.comwrote:


 I found is a routing loop with another equipement, I was able to find some
 trace, this is not an Opensips related problem anymore.


 --
 *From:* users-boun...@lists.opensips.org on behalf of Julien Chavanton
 *Sent:* Thu 29/04/2010 11:22 PM
 *To:* OpenSIPS users mailling list; Users@lists.opensips.org
 *Subject:* Re: [OpenSIPS-Users] tm - module out of memory


 I have to diagnostic this system further, as before facing
 a memory shortage, there is a huge bunch of
 ERROR:tm:t_check: reply cannot be parsed


 Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***BRANCH ROUTE**
 Apr 29 19:16:58 osip /usr/local/sbin/opensips[20104]: ***REPLY ROUTE -
 td[10.1.16.50]**
 Apr 29 19:16:58 osip /usr/local/sbin/opensips[20103]: ERROR:tm:t_check:
 reply cannot be parsed
 Apr 29 19:16:58 osip /usr/local/sbin/opensips[20101]: ***HOST ROUTED ***

 --
 *From:* users-boun...@lists.opensips.org on behalf of Julien Chavanton
 *Sent:* Thu 29/04/2010 8:27 PM
 *To:* Users@lists.opensips.org
 *Subject:* [OpenSIPS-Users] tm - module out of memory

  tm module went out of memory, we did face other problems  with a non
 compliant SIP device, so this could well be a side effect of it.

 Any recommendation on tm memory usage ?

 opensips log

 ---

 Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:new_t: out
 of mem
 Apr 29 19:17:33 osip /usr/local/sbin/opensips[20101]: ERROR:tm:t_newtran:
 new_t failed



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] spam on callcontrol website

2010-04-29 Thread Paul Wise
Hi all,

I found some more spam, this time on the callcontrol website. The front
page (one essay link), Installation page (two essay links) and the
tickets (three german spams).

-- 
bye,
pabs

http://bonedaddy.net/pabs3/


signature.asc
Description: This is a digitally signed message part
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] cdrtool rating computation problem

2010-04-29 Thread Paul Wise
I'm having this problem:

http://opensips.wordpress.com/2009/06/26/cdrtool-rating-computation-problem/

Looking at the code, it seems to be caused by rating.php line 6443:

if (!preg_match(/^0/,$CDR-CanonicalURINormalized)) {

Should I be working around this line of code by prefixing a 0 to the
can_uri avp before calling call_control() in opensips.cfg?

-- 
bye,
pabs

http://bonedaddy.net/pabs3/


signature.asc
Description: This is a digitally signed message part
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users