Re: [OpenSIPS-Users] OpenSIPS or Kamailio

2011-02-02 Thread Erik Dekkers
Toyima,

This question is asked many time before :). Kamailio and OpenSIPS have the same 
roots. However,  they differ more and more over time since each project is 
going it's own way.
Bogdan has made a nice description of his (and the community's) vision on the 
future of Opensips: http://www.opensips.org/Development/NewDesign

I would say: install both in e.g. a VMware environment and use what you like 
most. I've installed both kamailio and opensips and selected opensips in the 
end. My reason for choosing opensips:


-  Opensips is from my point of view more 'cleaner'. My experience with 
Kamailio was that it's looks pretty chaotic with the pre - past 3.0 
modules/configs. For a beginner and noob like me that's not very useful

-  Opensips has a active IRC channel where you can ask questions and 
get (mostly) direct response.

-  Book 
(https://www.packtpub.com/building-telephony-systems-with-opensips-1-6/book  ) 
of opensips to study.

-  EbootCamp (http://www.opensips.org/Training/EBootcamp )to learn 
hands-on how opensips is working. All done via the Internet and good source for 
study either.


Again, everything above is based on my own experience. But if you asked me, I 
definitely would recommend OpenSIPS.

Erik

Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Namens Toyima Dias
Verzonden: dinsdag 1 februari 2011 17:19
Aan: OpenSIPS users mailling list
Onderwerp: [OpenSIPS-Users] OpenSIPS or Kamailio

Hello Community,

I've a question about OpenSIPS; Kamailio and OpenSIPS are the same application 
right? i mean, both are Proxy servers for high enterprise productions 
environmets...what i want to know is if there is any difference between them? 
why the Kamailio community is higher than OpenSIPS community, or at least seems 
to be like this...or not?

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


[OpenSIPS-Users] Memory leak

2011-02-02 Thread Yannick LE COENT
Hi,

 

I am using opensips 1.6.2.

I have modified the opensips.cfg script and it generates a memory leak.

 

The memory leak seems to be on pkmem since when I use the following command
'opensipsctl fifo get_statistics pkmem: shmem: | grep free', pkmem dicreases


 

I have followed the documentation from
http://www.opensips.org/Resources/DocsTsMem, but unfortunately the memory
status does not give any idea.

 

What can I do to find the reason of the leak?

 

Regards,

Yannick LE COENT

 

NEXCOM Systems



 

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


Re: [OpenSIPS-Users] new install and INVITES not being forwarded

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Brett,

Brett Nemeroff wrote:
On Wed, Jan 12, 2011 at 9:04 AM, Bogdan-Andrei Iancu 
bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:


Hi Gareth,


Gareth Blades wrote:

I am having a problem with running opensips in debug level 6.
When opensips is set to this I am finding that it takes a long
time to respond to register requests (over 5 seconds compared
to a fraction of a second) which means that my phone times out
when trying to register so I cannot then debug trying to send
calls through.

woow...that is really strange.never encountered something like
thatdo you log to stderror(console) or to syslog ?


Bogdan / Gareth,
I've seen this on several installations. Exactly as you describe. If 
you search the archives, you'll see others have reported this as well. 
The problem seems to be in the syslog configuration. If you switch 
your configuration to use asynchronous writes, you'll see performance 
improve dramatically. In syslog, this is done by placing a minus sign 
before the filename. For example /var/log/opensips.log becomes 
-/var/log/opensips. Your distribution / syslogger may vary.


And yes, this is apparent on a system with no load, and SINGLE SIP 
users. With full logging and no modifications to syslog, I've seen on 
*many* systems REGISTER timeouts. Took me a while to track it down; 
suspecting all sorts of other IO issues. 

Bogdan, I'm not sure if this should be expected or if it's an 
indication of a more serious problem in OpenSIPs. If it's not an 
indication of a coding problem, then I believe this information should 
be in the documentation somewhere (if it's not already)?


The problem is not opensips related - the syslog is seen as an external 
I/O (as DB, DNS) which unfortunately blocks.


And, yes, it may be a good idea to have it somewhere - for example you 
can add something to the Tips and FAQs section:

   http://www.opensips.org/Resources/DocsTipsFaqs

Regards,
Bogdan


--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] memory trouble on 1.6.4

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Denis,

Be sure you the latest version of 1.6.4 (SVN/tarball/debs) - there was a 
mem leak in the dialog module, issues that was fixed 1 or 2 weeks ago.


Regards,
bogdan

Denis Putyato wrote:


Hello!

 


I have such error messages in syslog while using 1.6.4

 

Jan 24 09:40:04 opensips 
/usr/local/opensips1.6.4/sbin/opensips[10176]: WARNING:core:fm_malloc: 
Not enough free memory, will atempt defragmenation


Jan 24 09:40:04 opensips 
/usr/local/opensips1.6.4/sbin/opensips[10176]: 
ERROR:core:build_res_buf_from_sip_req: out of pkg memory  ; needs 477


Jan 24 09:40:04 opensips 
/usr/local/opensips1.6.4/sbin/opensips[10176]: WARNING:core:fm_malloc: 
Not enough free memory, will atempt defragmenation


Jan 24 09:40:04 opensips 
/usr/local/opensips1.6.4/sbin/opensips[10176]: 
ERROR:core:db_allocate_columns: no private memory left


 


After restart Opensips everything is OK but only during some time.

 


I increase shm memory from 32M to 256M in config.h, but it didn`t help.

 


I have such module loading:

loadmodule db_mysql.so

loadmodule sl.so

loadmodule tm.so

loadmodule signaling.so

loadmodule auth.so

loadmodule rr.so

loadmodule maxfwd.so

loadmodule textops.so

loadmodule mi_fifo.so

loadmodule uri.so

loadmodule domain.so

loadmodule drouting.so

loadmodule siptrace.so

loadmodule avpops.so

loadmodule dialplan.so

loadmodule dialog.so

loadmodule permissions.so

loadmodule usrloc.so

loadmodule registrar.so

loadmodule alias_db.so

loadmodule auth_db.so

loadmodule nathelper.so

loadmodule acc.so

loadmodule uac.so

loadmodule aaa_radius.so

 


For accounting I use cdr_flag feature.

 

During call process Opensips makes about 4 SQL queries to db and 
receives from it some account parameters which stores to AVP.


 


Thank you for any help

 

 




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



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] Pointing auth_db at remote database, OpenSIPS is expecting a local-like schema?

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Ambert,

Just to be sure it is clear. When you configure a DB connection for a 
certain module, OpenSIPS will use that particular connection to check in 
a version table for the entries corresponding to that module.


So, for your case, opensips will check in the remote DB, in the version 
table, only for the version of the subscriber table (used by auth_db) 
module ; for the rest of the modules (pointing to local DB), the version 
from the local Db will be queried.


Regards,
Bogdan

ambertch wrote:

I pointed auth_db at a remote DB and table via the following:

modparam(auth_db, db_url, mysql://user:pass@server/MY_REMOTE_DB)
...
if (!www_authorize(serve.name, users)) {


Doing this, it complains that the table MY_REMOTE_DB.version doesn't
exist. 
When I create MY_REMOTE_DB.version and copy over opensips.version, it then

complains about users not being the correct version.

I addressed this by noting a db entry in opensips.version for the default
user storage table of subscriber = 7 and adding users = 7 that into
MY_DB_NAME.version


It works, but it looks to me that pointing to a remote db, some logic in
OpenSIPS is expecting the same things as if auth_db were pointed locally. Is
there any way to address this so I can remove the opensips version table
from MY_REMOTE_DB?

Thanks!
Ambert

  



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] My OpenSIPS apparently ignoring 100s

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Jock,

Jock McKechnie wrote:

Greetings;

I apologise in advance for this one. I _know_ I screwed it up, but I 
just cannot see how. I'm sure it's something blazingly obvious, but I 
just cannot find it and it's driving me nuts.


I've written an OpenSIPS config that uses an external perl 'helper' to 
do an LCR lookup (it incorporates a bunch more things that the 
built-in OpenSIPS LCR can't do, elsewise I'd use it),
Have you looked at Dynamic Routing module (a more powerful LCR) - 
http://www.opensips.org/html/docs/modules/1.6.x/drouting.html


I've rewritten the configuration several times over, and somewhere 
along the way I've borked it, I guess. When the system receives a call 
it'll do the LCR lookup, find a route, and sends the call out to that 
route.
The gateway it sends the call to responds with a '100 Trying' and 
then a second later OpenSIPS sends the INVITE again, and gets another 
'100 Trying'. And then a second later, OpenSIPS sends the INVITE 
again, etc. Even when the call comes up, sometimes OpenSIPS isn't 
seeing the '200 OK' and continues sending INVITES until it times out 
the call.


Set debug=6, make a call, and post the output somewhere - most probably 
the replies from GW are not matching the INVITE transactionbut let's 
see what the logs say. (attaching a SIP capture of the call will help)




I've pasted the whole config here - I hate to gobsmack people with the 
inanity and insanity of the config, remember it is in development, but 
I think I really need to show 'everything' to have someone work out 
what the heck I'm doing wrong here.


Config:
http://pastebin.com/bqy9P9bt

looks ok on a first look.

Regards,
Bogdan


Thank you very much for your help!

 - Jock


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



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] call forwarding with replace from uri

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Jesse,

Lost me a bit between those pieces of script.

Anyhow, as far I understood from your problem, you want to change the 
FROM URI in order to use the new value later in the script (in the auth 
part). Well, this does not work - in opensips, the changes you do over 
the message are not visible until the message is sent out. So you cannot 
use your own changes later in script.


To avoid this issue, you can use a variable to store the correct value 
of the FROM URI ($fu directly or the value from DB) - later in script, 
use for auth (or other purposes) this variable in order to deal with the 
FROM URI value (the right one).


Regards,
Bogdan

Jesse Cloutier wrote:

Hi list,

I having trouble with my script when trying to call forward by 
reseting the $ru and doing a route(1)


My problem seems to be coming from the fact that I am changing my $fu 
with uac_replace_from. When I xlog the $fu right before the route() It 
shows the correct value (the original $fu before it was changed by 
uac_replace_from). But on the request to the forwarded number it tries 
to authenticate the user using the new value (the value that 
uac_replace_from put in)


If I don't replace the $fu everything works fine.

Thanks A lot for any help!!

here is the relavant parts of my script:

Replacing the uri in the original request:

 if (is_avp_set($avp(s:uri))) {
if (is_avp_set($avp(s:fromname))) {
xlog(L_INFO,Fromname set to 
$avp(s:fromname) and URI set to $avp(s:uri));

uac_replace_from($avp(s:fromname),$avp(s:uri));

} else {
uac_replace_from(,$avp(s:uri));
xlog(L_INFO,Only Fromname Set);
}
}


The fowrwarding:

 if(avp_db_load($ru,$avp(s:unavailcallfwd))) {
  #xlog(call forward is set 
to: $avp(s:unavailcallfwd));
  
avp_pushto($ru,$avp(s:unavailcallfwd));
  xlog(call forward is set 
to: $ru from $fu);


  route(1);

  exit;
}


And the proxy authorize


xlog(Checking if we should attempt authentication on $fu);
if (!(method==REGISTER))
{
#Do not authenticate calls from the gateways
xlog(Checking if its from a gateway);
if(!is_from_gw()) # This check is from the drouting module
{
xlog(Checking if it is an IP Authed IP);
if(!check_source_address(0, $avp(i:9))) 
#This check looks in the address table

{
xlog(Checking if it is a subscriber);

xlog(from is $fu);

if (!proxy_authorize(, subscriber)) {
proxy_challenge(, 0);
xlog(Sent proxy challange to 
$fu);

exit;
}
if (!db_check_from()) {
sl_send_reply(403,Forbidden 
auth ID);

exit;
}

}
}
}


--
Jesse Cloutier
Network Administrator
Cronomagic Canada
5143411579 x210
je...@cronomagic.com


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



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] Permissions module

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Anton,

It seams that variables are not supported for this function params. More 
or less as this functions are not so used in the late time (the idea of 
using files for data provisioning is deprecated).


You have two options:
   - use dialplan module to set rules for checking the allowance (see 
http://www.opensips.org/html/docs/modules/1.6.x/dialplan.html#id249065  
1.4.1.3).

   - open a feature request to see if variable support  can be added.

Regards,
Bogdan

Anton Zagorskiy wrote:

Hi.

Can I use pseudo variable as first parameter in the function allow_routing?

I've made files domain1.allow, domain1.deny, domain2.allow, domain2.deny. 
Next, I'm calling allow_routing($dlg_val(cur_domain)). In the log file I

see DBG:permissions:check_routing: no rules = allow any routing and
nothing more from permissions module.
In each file there is at least one rule.

What I'm doing wrong?




WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru




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

  



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] BYE request for proper signalling

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Denis,

From SIP point of view, the BYE must be sent to the contact URIs . I 
guess your contact is different than the layer3 IP because of some NAT 
presence, right ? if so, use fix_nated_contact() for INVITE and 200 OK, 
so that the received contact will be fixed with the layer3 IP, so the 
dialog module will use the contact with a useful info.


Regards,
Bogdan

Denis Putyato wrote:


Hello!

 


I am using dialog module for control of call duration.

When timeout of dialog expires I need Opensips send BYE not to caller 
and callee contact (which is stored during creation of dialog) but to 
IP address and port from which INVITE (caller) and 200 OK (callee) had 
been received.


 


Thank you for any help

 

 




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



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Dave,

do :  if (src_ip==myself) {}

Regards,
Bogdan

Dave Singer wrote:

Is there any way to check if the source IP/port is one that opensips
is listening on or one ? something like if (sip:$si:$sp == myself) {
...bla; bla;}

Thanks
Dave

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

  



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-02-02 Thread Bogdan-Andrei Iancu

Hi Guys,

Just to clarify a bit here  - from OpenSIPS perspective, all LINUX 
distro are fully supported (like compiling and runing) and most of 
UNIX-like OS (BSD, SOLARIS, etc).


There is no difference is running OpenSIPS on Debian or RedHat - you 
just need to take care of the dependencies (packaging is different on 
the 2 distros) and the init script. Otherwise it is the same.


Again, OpenSIPS is not Debian-only supported/focused.

Regards,
Bogdan

Jeff Pyle wrote:

Toyima,

Adrian is right.  We started on a CentOS infrastructure with Opensips. 
 It works, but it's a pain.  We're migrating to a complete Debian 
infrastructure.  We started with Debian because of Opensips, 
Mediaproxy and CDRtool.  But now that we understand it we find it to 
be much more lightweight, configurable and just easier than CentOS 
and the other RedHat derivatives.


Is Debian better than CentOS?  Not the question, and not the point. 
 I can say in our experience it is far easier to manage Opensips-based 
systems in Debian than in CentOS.  Xen is a lot more flexible, too, 
and we've made great use of that with Opensips.



- Jeff

From: Adrian Georgescu a...@ag-projects.com mailto:a...@ag-projects.com
Reply-To: OpenSIPS users mailling list users@lists.opensips.org 
mailto:users@lists.opensips.org

Date: Mon, 31 Jan 2011 11:35:13 -0500
To: OpenSIPS users mailling list users@lists.opensips.org 
mailto:users@lists.opensips.org

Subject: Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

You should use Debian in production as the software is developed on 
Debian. If you use Redhat you will always be behind new developments 
or any bug fixes as there might be nobody porting them to Redhat.


Adrian

On Jan 31, 2011, at 5:28 PM, Toyima Dias wrote:


Hello,
 
I've seen many information on how to install OpenSIPS in DEBIAN, but 
in my case i need to install it on Red Hat, i've found some 
information but not very well supported, i would like to have a very 
clean and stable installation for a very large and stable production 
server, is there any recommendations please?


Regards


___
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
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-02-02 Thread Bogdan-Andrei Iancu

Hi John,

Can I list you here:
   http://www.opensips.org/Resources/Downloads#osipmi

Thanks and regards,
Bogdan

John Khvatov wrote:

Hello.

I maintain OpenSIPS package in fedora/epel.

Of course, let me know if you have issues with OpenSIPS rpm package from 
official fedora/epel repos.

On 31.01.2011, at 20:03, Adrian Georgescu wrote:

  

Would the maintainers of those packages please step forward so that people who 
need support know exactly who to ask when in need?

This would help everyone to better understand who is maintaing what so that 
there is no fear uncertainty and doubts but only sure things.

Adrian



  



--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


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


Re: [OpenSIPS-Users] BYE request for proper signalling

2011-02-02 Thread Denis Putyato
Hello Bogdan

 because of some NAT presence, right ?

No, I need use IP address when there is more than one SIP proxy in call path. 

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, February 02, 2011 3:36 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] BYE request for proper signalling

Hi Denis,

 From SIP point of view, the BYE must be sent to the contact URIs . I 
guess your contact is different than the layer3 IP because of some NAT 
presence, right ? if so, use fix_nated_contact() for INVITE and 200 OK, 
so that the received contact will be fixed with the layer3 IP, so the 
dialog module will use the contact with a useful info.

Regards,
Bogdan

Denis Putyato wrote:

 Hello!

  

 I am using dialog module for control of call duration.

 When timeout of dialog expires I need Opensips send BYE not to caller 
 and callee contact (which is stored during creation of dialog) but to 
 IP address and port from which INVITE (caller) and 200 OK (callee) had 
 been received.

  

 Thank you for any help

  

  

 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
OpenSIPS solutions and know-how


___
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] drouting / is_from_gw - matching for groups and not types

2011-02-02 Thread Max Mühlbronner

Hello,


regarding opensips-cp and drouting i came across a small problem, maybe 
someone already tried something similar and wants to share his knowledge :)


|
opensips-cp -- Drouting / Settings, Gateway Types / Group ID?s is what 
i am talking about.


|
Is there any function to check for the Group ID?s  instead of Gateway 
types inside the routing script?
|is_from_gw and goes_to_gw only checks for types of Gateways but i can 
not find any equivalent to check for gateway group ids? The Group ids 
are assigned via permissions and i am selecting the group ids via 
avp_db_query.



My goal is to decide by group ids which calls (permissions/group-based) 
are routed directly to load_balance function instead of going through 
the normal drouting process of rules/gateway(lists). I could eventually 
use a avp_db_query to get the group id for every call but this would 
probably use lots of Database Resources? Maybe there is another smarter 
way to do all of this?



Best Regards


Max M.








|



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


[OpenSIPS-Users] $auth.resp script variable

2011-02-02 Thread John Khvatov
Hello.

There is problem with $auth.resp script variable.

Line from opensips.cfg:
xlog(L_INFO, $auth.resp\n);

opensips -f opensips.cfg -c results:
Feb  2 16:33:12 [24453] NOTICE:core:main: config file ok, exiting...

Runtime error:
Feb  2 16:34:27 aki /usr/sbin/opensips[24485]: ERROR:core:pv_parse_spec: pvar 
auth.resp not found
Feb  2 16:34:27 aki /usr/sbin/opensips[24485]: ERROR:core:pv_parse_spec: wrong 
char [p/112] in [$auth.resp#012] at [9 (0)]
Feb  2 16:34:27 aki /usr/sbin/opensips[24485]: ERROR:core:fix_actions: wrong 
fomat [$auth.resp#012] for value param
Feb  2 16:34:27 aki /usr/sbin/opensips[24485]: ERROR:core:fix_actions: fixing 
failed (code=-5) at cfg line 216
Feb  2 16:34:27 aki /usr/sbin/opensips[24485]: ERROR:core:main: failed to fix 
configuration with err code -5

-- 
WBR, John Khvatov


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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-02-02 Thread John Khvatov
Hi Bogdan.

On 02.02.2011, at 15:45, Bogdan-Andrei Iancu wrote:
 Hi John,
 
 Can I list you here:
   http://www.opensips.org/Resources/Downloads#osipmi

Sure.

Also, you can update 'Fedora' (link: 'http://fedoraproject.org', latest version 
of OpenSIPS available in all currently supported Fedora branches) and add 
'EPEL' with link: http://fedoraproject.org/wiki/EPEL.


 John Khvatov wrote:
 Hello.
 
 I maintain OpenSIPS package in fedora/epel.
 
 Of course, let me know if you have issues with OpenSIPS rpm package from 
 official fedora/epel repos.

-- 
WBR, John Khvatov


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


Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat

2011-02-02 Thread Adrian Georgescu
Anyone doing Fedora RPMs for MediaProxy?

I have only a CentOS link here:

http://mediaproxy-ng.org/wiki/InstallationGuide

Adrian


On Feb 2, 2011, at 8:52 AM, John Khvatov wrote:

 Hi Bogdan.
 
 On 02.02.2011, at 15:45, Bogdan-Andrei Iancu wrote:
 Hi John,
 
 Can I list you here:
  http://www.opensips.org/Resources/Downloads#osipmi
 
 Sure.
 
 Also, you can update 'Fedora' (link: 'http://fedoraproject.org', latest 
 version of OpenSIPS available in all currently supported Fedora branches) and 
 add 'EPEL' with link: http://fedoraproject.org/wiki/EPEL.
 
 
 John Khvatov wrote:
 Hello.
 
 I maintain OpenSIPS package in fedora/epel.
 
 Of course, let me know if you have issues with OpenSIPS rpm package from 
 official fedora/epel repos.
 
 -- 
 WBR, John Khvatov
 
 
 ___
 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] Lookup contact from user part of RURI

2011-02-02 Thread Nauman Sulaiman
Hi, using opensips 1.6.2. I am trying to use the user part of incoming RURI 
to look up a contact, reason being is full RURI is incorrect, this is due to 
bogus proxy upstream so need a workaround.

lookup(location) seems to be only if you use AOR.

For exmaple i need to reroute incoming ACK to real address of UA
So i would like to lookup 1234 user part of RURI below and rewrite the
RURI with the correct ip. 12.34.56.78 is Opensips IP rather than end UA ip.

1...@domain.com is stored in db. How do i lookup contact just with user part 
and rewrite the RURI.

ie ACK sip:1234@12.34.56.78;rinstance=A89B5393

Need something for below
 if(method==ACK)
 {
  xlog(ACK received  \n);
  if( $rd == 12.34.56.78)  // check if opensips ip
  {
   lookup(user);  // ???   // need to lookup with user or rinstance
   // rewrite RURI with correct address
 }
 }




Hope its clear, thanks


  

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


Re: [OpenSIPS-Users] Lookup contact from user part of RURI

2011-02-02 Thread Stefano Pisani

Hi,
you could set OpenSIPS to not use domain part of uri, so your issue is 
solved.


stefano

Il 02/02/2011 15:30, Nauman Sulaiman ha scritto:

Hi, using opensips 1.6.2. I am trying to use the user part of incoming RURI
to look up a contact, reason being is full RURI is incorrect, this is due to 
bogus proxy upstream so need a workaround.

lookup(location) seems to be only if you use AOR.

For exmaple i need to reroute incoming ACK to real address of UA
So i would like to lookup 1234 user part of RURI below and rewrite the
RURI with the correct ip. 12.34.56.78 is Opensips IP rather than end UA ip.

1...@domain.com is stored in db. How do i lookup contact just with user part 
and rewrite the RURI.

ie ACK sip:1234@12.34.56.78;rinstance=A89B5393

Need something for below
  if(method==ACK)
  {
   xlog(ACK received  \n);
   if( $rd == 12.34.56.78)  // check if opensips ip
   {
lookup(user);  // ???   // need to lookup with user or rinstance
// rewrite RURI with correct address
  }
  }




Hope its clear, thanks




___
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] call forwarding with replace from uri

2011-02-02 Thread Stefano Pisani

Hi Jesse,
in your script you are replacing from header twice.
Double check to your script and delete the second uac_replace_from.
This function can be used just once a phone call.

ciao
s

Il 02/02/2011 16:41, Jesse Cloutier ha scritto:
Thanks for the answer, I was not very clear in my first email though, 
sorry for that. Basically when caller A initiates a call, his $fu may 
be pulled from the db and replaced with a uac_replace_from. Then if 
the call progresses and is redirected to a new destination the call 
fails to authenticate because the new FROM URI is not in the DB. I 
have tried to restore his original FROM URI using uac_restore_from, 
but this doesnt seem to do it and if I store the original uri and call 
uac_replace_from a second time I get something like 
sip:111@1.1.1.1sip:222@1.1.1.1


Multumesc!

On Wed 02 Feb 2011 07:28:28 AM EST, Bogdan-Andrei Iancu wrote:

Hi Jesse,

Lost me a bit between those pieces of script.

Anyhow, as far I understood from your problem, you want to change the 
FROM URI in order to use the new value later in the script (in the 
auth part). Well, this does not work - in opensips, the changes you 
do over the message are not visible until the message is sent out. So 
you cannot use your own changes later in script.


To avoid this issue, you can use a variable to store the correct 
value of the FROM URI ($fu directly or the value from DB) - later in 
script, use for auth (or other purposes) this variable in order to 
deal with the FROM URI value (the right one).


Regards,
Bogdan

Jesse Cloutier wrote:

Hi list,

I having trouble with my script when trying to call forward by 
reseting the $ru and doing a route(1)


My problem seems to be coming from the fact that I am changing my 
$fu with uac_replace_from. When I xlog the $fu right before the 
route() It shows the correct value (the original $fu before it was 
changed by uac_replace_from). But on the request to the forwarded 
number it tries to authenticate the user using the new value (the 
value that uac_replace_from put in)


If I don't replace the $fu everything works fine.

Thanks A lot for any help!!

here is the relavant parts of my script:

Replacing the uri in the original request:

if (is_avp_set($avp(s:uri))) {
if (is_avp_set($avp(s:fromname))) {
xlog(L_INFO,Fromname set to $avp(s:fromname) and URI set to 
$avp(s:uri));

uac_replace_from($avp(s:fromname),$avp(s:uri));
} else {
uac_replace_from(,$avp(s:uri));
xlog(L_INFO,Only Fromname Set);
}
}


The fowrwarding:

if(avp_db_load($ru,$avp(s:unavailcallfwd))) {
#xlog(call forward is set to: $avp(s:unavailcallfwd));
avp_pushto($ru,$avp(s:unavailcallfwd));
xlog(call forward is set to: $ru from $fu);

route(1);

exit;
}


And the proxy authorize


xlog(Checking if we should attempt authentication on $fu);
if (!(method==REGISTER))
{
#Do not authenticate calls from the gateways
xlog(Checking if its from a gateway);
if(!is_from_gw()) # This check is from the drouting module
{
xlog(Checking if it is an IP Authed IP);
if(!check_source_address(0, $avp(i:9))) #This check looks in the 
address table

{
xlog(Checking if it is a subscriber);

xlog(from is $fu);

if (!proxy_authorize(, subscriber)) {
proxy_challenge(, 0);
xlog(Sent proxy challange to $fu);
exit;
}
if (!db_check_from()) {
sl_send_reply(403,Forbidden auth ID);
exit;
}

}
}
}


--
Jesse Cloutier
Network Administrator
Cronomagic Canada
5143411579 x210
je...@cronomagic.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


Re: [OpenSIPS-Users] Logging to many files

2011-02-02 Thread Brett Nemeroff
On Wed, Feb 2, 2011 at 10:10 AM, Anton Zagorskiy 
a.zagors...@oyster-telecom.ru wrote:

 Hi.

 Is it possible to log not to a 1 file via xlog?


Not entirely sure what you are asking, but it's probably not an opensips
question. It's probably a syslog question. To log to more than one file,
you'll need to set syslog to log to more than one file and then set xlog to
log to more than one facility (facility?)

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


[OpenSIPS-Users] Nathelper / rtpproxy , problem with trusted IP

2011-02-02 Thread Laurent Schweizer
Hello all,

 

Small problem with rtpproxy and nathelper

 

as you can see in the log bellow , I use the force_rtp_proxy method  with
the 'r' flag to indicate to trust the IP of the SDP.

 

In the example bellow, the trusted IP is 95.128.80.6 3966 , the problem is
that the old rtp source (in this case a MoH server) continue to send 1 or 2
packet so the RTP proxy change them with 95.128.80.92:1086 so packet are
not correctly forwarded.

 

If the IP must be trusted why he take care of a received Packet ?  

 

I use the rtpproxy 1.2.1.

 

Regards

 

Laurent

 

Feb  2 16:58:42 dns2 kamailio-1.5.4-notls/kamailio[31518]:  route 5 | INVITE
has SDP | we trust the IP in SDP

Feb  2 16:58:42 dns2 kamailio-1.5.4-notls/kamailio[31518]:  route 5 |
force_rtp_proxy ocrf

Feb  2 16:58:42 dns2 rtpproxy[8101]: DBUG:handle_command: received command
31518_84 Uc0,101 408970232 95.128.80.6 3966 16e48326;1 2107358281;1

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: adding strong flag
to existing session, new=1/0/0

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: lookup on ports
3162/3820, session timer restarted

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: update

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command:   Unless the
address provided by client historically

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: pre-filling
callee's address with 95.128.80.6:3966

Feb  2 16:58:42 dns2 rtpproxy[8101]: DBUG:doreply: sending reply 31518_84
3820 95.128.80.6 

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:rxmit_packets: callee's address
filled in: 95.128.80.92:1086 (RTP)

Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:rxmit_packets: guessing RTCP port
for callee to be 1087

 

 

 

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


[OpenSIPS-Users] B2B + top hiding + origination media IP

2011-02-02 Thread Kamen Petrov
Hi Guys,

I am testing the following call flow:
Soft Phone = opensips (configured for B2B) = third party termination SIP
proxy

Here is my config:

modparam(b2b_entities, script_req_route, b2b_request)
modparam(b2b_entities, script_reply_route, b2b_reply)



local_route {
xlog(LOCAL_ROUTE ($rm - $rr)\n);
setflag(22);
if (is_method(INVITE)) {
engage_rtp_proxy(e,OPENSIPS_IP);
exit;
}
else if (is_method(BYE) ) {
xlog(BYE\n);
}
}


route[b2b_request] {
$avp(s:source_ip_address) := $si;
perl_exec(messagedump_route, messages);
xlog(b2b_request ($ci) ($rm - $rr)\n);
}


route[b2b_reply] {
$avp(s:source_ip_address) := $si;
perl_exec(messagedump_reply, messages);
xlog(b2b_reply ($ci) - $rm - $rr\n);
}


route{
...
if (is_method(INVITE)  perl_exec(check_for_forwarding_number))
{
engage_rtp_proxy(e,OPENSIPS_IP);
xlog(LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD TO:
$avp(s:fwd_ip)\n);
setflag(1); # do accounting
xlog(L_ERR, LOG: to uri=[$tu] [$avp(s:sip_proxy_ip)]\n);

b2b_init_request(top hiding);
exit;
};

...
}


What happens is:
- INVITE from the soft phone to the opensips
- catched by the B2B and relayed to the third party SIP proxy + trying
returned to the soft phone
- Session Progress received from the third party SIP proxy - opensips -
my soft phone

At that stage, here is what I have on the soft phone log:
18:56:50 UDP Packet Received from OPENSIPS_IP:5060

SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
To: sip:359883409291@OPENSIPS_DOMAIN:5060;tag=B2B.113.667
From: 359883327749 sip:359883327749@OPENSIPS_DOMAIN:5060;tag=1040
Call-ID: 1296636915-3604-SALASWORK@192.168.1.2
CSeq: 361 INVITE
Content-Type: application/sdp
Contact: sip:OPENSIPS_IP:5060;transport=udp
Server: OpenSIPS (1.6.3-notls (x86_64/linux))
Content-Length: 184

v=0
o=SBCSIPUAS 900116523 1 IN IP4 THIRD_PARTY_SIP_PROXY_IP
s=SBCSIPUAS SIP STACK v1.0
c=IN IP4 THIRD_PARTY_SIP_PROXY_IP
t=0 0
m=audio 17900 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv
a=maxptime:30


As can be seen, the media IP is not rewritten by the opensips and the IP
passed to my soft phone is the IP of the termination IP for the opensips
(i.e. the third party SIP proxy IP). Because of that, my soft phone starts
the RTP directly to my provider instead trough the RTP proxy that is
attached to the opensips.
Just to clarify, the media IP of my soft phone is not passed to my provider
- that case is handled good.


Any idea what is missing ?

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


Re: [OpenSIPS-Users] My OpenSIPS apparently ignoring 100s

2011-02-02 Thread Jock McKechnie
On Wed, Feb 2, 2011 at 6:20 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 Hi Jock,


 Jock McKechnie wrote:

 Greetings;

 I apologise in advance for this one. I _know_ I screwed it up, but I just
 cannot see how. I'm sure it's something blazingly obvious, but I just cannot
 find it and it's driving me nuts.

 I've written an OpenSIPS config that uses an external perl 'helper' to do
 an LCR lookup (it incorporates a bunch more things that the built-in
 OpenSIPS LCR can't do, elsewise I'd use it),

 Have you looked at Dynamic Routing module (a more powerful LCR) -
 http://www.opensips.org/html/docs/modules/1.6.x/drouting.html


  I've rewritten the configuration several times over, and somewhere along
 the way I've borked it, I guess. When the system receives a call it'll do
 the LCR lookup, find a route, and sends the call out to that route.
 The gateway it sends the call to responds with a '100 Trying' and then
 a second later OpenSIPS sends the INVITE again, and gets another '100
 Trying'. And then a second later, OpenSIPS sends the INVITE again, etc. Even
 when the call comes up, sometimes OpenSIPS isn't seeing the '200 OK' and
 continues sending INVITES until it times out the call.


 Set debug=6, make a call, and post the output somewhere - most probably the
 replies from GW are not matching the INVITE transactionbut let's see
 what the logs say. (attaching a SIP capture of the call will help)


Thanks, Bogdan.

I'm staring at this and I'm not seeing where it's getting the '100 Tryings'
at all, but perhaps it's forest/trees for me. I've stripped off all the
syslog date/time headers, but during this time space it sent out the initial
INVITE, received a 100, send a second INVITE, a second 100 back, received a
183 Session Progress (presumably from the first INVITE)... after the time
frame included it sent another three INVITEs and received two 183s back
before everything BYE'd out.

[Wed Feb  2 09:05:38 2011] Attempting to relay call to
sip:+1641456@192.168.1.99 sip%3A%2B1641456@192.168.1.99
DBG:tm:t_newtran: transaction on entrance=0x
DBG:core:parse_headers: flags=
DBG:core:parse_headers: flags=78
DBG:tm:t_lookup_request: start searching: hash=22751, isACK=0
DBG:tm:matching_3261: RFC3261 transaction matching failed
DBG:tm:t_lookup_request: no transaction found
DBG:tm:run_reqin_callbacks: trans=0x7f5d8c2a14e8, callback type 1, id 1
entered
DBG:core:parse_headers: flags=78
DBG:dialog:new_dlg_val: inserting accX_created=
DBG:tm:run_reqin_callbacks: trans=0x7f5d8c2a14e8, callback type 1, id 0
entered
DBG:dialog:get_dlg_timeout: invalid AVP value, use default timeout
DBG:core:parse_headers: flags=
DBG:core:check_ip_address: params 10.10.101.101, 10.10.101.101, 0
DBG:core:_shm_resize: resize(0) called
DBG:tm:_reply_light: reply sent out. buf=0x7b21d8: SIP/2.0 1...,
shmem=0x7f5d8c2942b8: SIP/2.0 1
DBG:tm:_reply_light: finished
DBG:core:mk_proxy: doing DNS lookup...
DBG:tm:set_timer: relative timeout is 50
DBG:tm:insert_timer_unsafe: [4]: 0x7f5d8c2a1708 (44600)
DBG:tm:set_timer: relative timeout is 30
DBG:tm:insert_timer_unsafe: [0]: 0x7f5d8c2a1738 (475)
DBG:tm:t_relay_to: new transaction fwd'ed
DBG:tm:t_unref: UNREF_UNSAFE: [0x7f5d8c2a14e8] after is 0
DBG:dialog:unref_dlg: unref dlg 0x7f5d8c294d68 with 1 - 2
DBG:core:destroy_avp_list: destroying list (nil)
DBG:core:receive_msg: cleaning up
DBG:tm:utimer_routine: timer routine:4,tl=0x7f5d8c2a1708 next=(nil),
timeout=44600
DBG:tm:retransmission_handler: retransmission_handler : request resending
(t=0x7f5d8c2a14e8, INVITE si ... )
DBG:tm:set_timer: relative timeout is 100
DBG:tm:insert_timer_unsafe: [5]: 0x7f5d8c2a1708 (44700)
DBG:tm:retransmission_handler: retransmission_handler : done
DBG:tm:utimer_routine: timer routine:5,tl=0x7f5d8c2a1708 next=(nil),
timeout=44700
DBG:tm:retransmission_handler: retransmission_handler : request resending
(t=0x7f5d8c2a14e8, INVITE si ... )
DBG:tm:utimer_routine: timer routine:7,tl=0x7f5d8c292a20 next=(nil),
timeout=44800
DBG:tm:retransmission_handler: retransmission_handler : request resending
(t=0x7f5d8c292800, INVITE si ... )
DBG:tm:set_timer: relative timeout is 400
DBG:tm:insert_timer_unsafe: [7]: 0x7f5d8c292a20 (45200)
DBG:tm:retransmission_handler: retransmission_handler : done
DBG:tm:utimer_routine: timer routine:6,tl=0x7f5d8c2a1708 next=(nil),
timeout=44900
DBG:tm:retransmission_handler: retransmission_handler : request resending
(t=0x7f5d8c2a14e8, INVITE si ... )
DBG:tm:set_timer: relative timeout is 400
DBG:tm:insert_timer_unsafe: [7]: 0x7f5d8c2a1708 (45300)
DBG:tm:retransmission_handler: retransmission_handler : done
DBG:tm:utimer_routine: timer routine:7,tl=0x7f5d8c2a4408 next=(nil),
timeout=44900
DBG:tm:retransmission_handler: retransmission_handler : request resending
(t=0x7f5d8c2a41e8, INVITE si ... )
DBG:tm:set_timer: relative timeout is 400
DBG:tm:insert_timer_unsafe: [7]: 

[OpenSIPS-Users] not storing registers and auth not working

2011-02-02 Thread Toyima Dias
Hello,

Something is happening with my configuration, every time i restart opensips,
opensips lost the registrations and i have to restart the phonesby the
way, i configured the authentication and is not workink, for non-Register
and Register OpenSIPS is not sending the 401 or 407...i don't now what is
going on...a will paste here my configs, opensips.cfg and openctlrc

*opensips.cfg*

#
# $Id: opensips.cfg 7027 2010-07-15 13:48:29Z razvancrainea $
#
# OpenSIPS basic configuration script
# by Anca Vamanu a...@voice-system.ro
#
# Please refer to the Core CookBook at:
#  http://www.opensips.org/index.php?n=Resources.DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#

### Global Parameters #
debug=3
log_stderror=no
log_facility=LOG_LOCAL0
fork=yes
children=4 #total number of UDP SIP worker processes per interface
/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes
server_header=Server: OpenSIPS SIP Proxy
/* uncomment the next line to disable TCP (default on) */
disable_tcp=yes #total number of TCP SIP worker processes in total
/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no
/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes
/* uncomment the next line to disable the auto discovery of local aliases
   based on revers DNS on IPs (default on) */
#auto_aliases=no
/* uncomment the following lines to enable TLS support  (default off) */
#disable_tls = no
#listen = tls:your_IP:5061
#tls_verify_server = 1
#tls_verify_client = 1
#tls_require_client_certificate = 0
#tls_method = TLSv1
#tls_certificate = //etc/opensips/tls/user/user-cert.pem
#tls_private_key = //etc/opensips/tls/user/user-privkey.pem
#tls_ca_list = //etc/opensips/tls/user/user-calist.pem

port=5060
/* uncomment and configure the following line if you want opensips to
   bind on a specific interface/port/proto (default bind on all available)
*/
listen=udp:172.30.140.8:5060

### Modules Section 
#set module path
mpath=//lib/opensips/modules/
/* uncomment next line for MySQL DB support */
loadmodule db_mysql.so
loadmodule signaling.so
loadmodule sl.so
loadmodule tm.so
loadmodule rr.so
loadmodule maxfwd.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule textops.so
loadmodule mi_fifo.so
loadmodule uri.so
loadmodule acc.so
/* uncomment next lines for MySQL based authentication support
   NOTE: a DB (like db_mysql) module must be also loaded */
loadmodule auth.so
loadmodule auth_db.so
/* uncomment next line for aliases support
   NOTE: a DB (like db_mysql) module must be also loaded */
#loadmodule alias_db.so
/* uncomment next line for multi-domain support
   NOTE: a DB (like db_mysql) module must be also loaded
   NOTE: be sure and enable multi-domain support in all used modules
 (see multi-module params section ) */
#loadmodule domain.so
/* uncomment the next two lines for presence server support
   NOTE: a DB (like db_mysql) module must be also loaded */
#loadmodule presence.so
#loadmodule presence_xml.so

# - setting module-specific parameters ---

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

# - rr params -
# add value to ;lr param to cope with most of the UAs
modparam(rr, enable_full_lr, 1)
# do not append from tag to the RR (no need for this script)
modparam(rr, append_fromtag, 0)

# - registrar params -
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam(registrar, max_contacts, 10)

# - usrloc params -
modparam(usrloc, db_mode,   2) #All changes are made to memory and
database synchronization is done in the timer
/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam(usrloc,
db_url,mysql://opensips:opensipsro@localhost/opensips)

# - uri params -
modparam(uri, use_uri_table, 0)

# - acc params -
/* what sepcial events should be accounted ? */
modparam(acc, early_media, 1)
modparam(acc, report_ack, 1)
modparam(acc, report_cancels, 1)
/* by default ww do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable append_fromtag
   in rr module */
modparam(acc, detect_direction, 0)
/* account triggers (flags) */
modparam(acc, failed_transaction_flag, 3)
modparam(acc, log_flag, 1)
modparam(acc, log_missed_flag, 2)
/* uncomment the following lines to enable DB accounting also */
modparam(acc, db_flag, 1)
modparam(acc, db_missed_flag, 2)

# - auth_db params -
/* uncomment the following lines if you want to enable the DB based
   authentication */
modparam(auth_db, calculate_ha1, yes)
modparam(auth_db, password_column, password)
modparam(auth_db,
db_url,mysql://opensips:opensipsro@localhost/opensips)
modparam(auth_db, 

Re: [OpenSIPS-Users] B2B + top hiding + origination media IP

2011-02-02 Thread Ovidiu Sas
The B2B module is operating on the received INVITE.  Any changes that
you make to the received INVITE are not visible by the B2B module.
Use a proxy to perform whatever you want to do (rtpproxy, accounting,
etc.) and a separate server only for b2b (top hiding).

Regards,
Ovidiu Sas

On Wed, Feb 2, 2011 at 12:11 PM, Kamen Petrov kamen.pet...@gmail.com wrote:
 Hi Guys,

 I am testing the following call flow:
 Soft Phone = opensips (configured for B2B) = third party termination SIP
 proxy

 Here is my config:

 modparam(b2b_entities, script_req_route, b2b_request)
 modparam(b2b_entities, script_reply_route, b2b_reply)



 local_route {
     xlog(LOCAL_ROUTE ($rm - $rr)\n);
     setflag(22);
     if (is_method(INVITE)) {
     engage_rtp_proxy(e,OPENSIPS_IP);
     exit;
     }
     else if (is_method(BYE) ) {
     xlog(BYE\n);
     }
 }


 route[b2b_request] {
     $avp(s:source_ip_address) := $si;
     perl_exec(messagedump_route, messages);
     xlog(b2b_request ($ci) ($rm - $rr)\n);
 }


 route[b2b_reply] {
     $avp(s:source_ip_address) := $si;
     perl_exec(messagedump_reply, messages);
     xlog(b2b_reply ($ci) - $rm - $rr\n);
 }


 route{
 ...
     if (is_method(INVITE)  perl_exec(check_for_forwarding_number))
 {
     engage_rtp_proxy(e,OPENSIPS_IP);
     xlog(LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD TO:
 $avp(s:fwd_ip)\n);
     setflag(1); # do accounting
     xlog(L_ERR, LOG: to uri=[$tu] [$avp(s:sip_proxy_ip)]\n);

     b2b_init_request(top hiding);
     exit;
     };

 ...
 }


 What happens is:
 - INVITE from the soft phone to the opensips
 - catched by the B2B and relayed to the third party SIP proxy + trying
 returned to the soft phone
 - Session Progress received from the third party SIP proxy - opensips -
 my soft phone

 At that stage, here is what I have on the soft phone log:
 18:56:50 UDP Packet Received from OPENSIPS_IP:5060
 
 SIP/2.0 183 Session Progress
 Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
 To: sip:359883409291@OPENSIPS_DOMAIN:5060;tag=B2B.113.667
 From: 359883327749 sip:359883327749@OPENSIPS_DOMAIN:5060;tag=1040
 Call-ID: 1296636915-3604-SALASWORK@192.168.1.2
 CSeq: 361 INVITE
 Content-Type: application/sdp
 Contact: sip:OPENSIPS_IP:5060;transport=udp
 Server: OpenSIPS (1.6.3-notls (x86_64/linux))
 Content-Length: 184

 v=0
 o=SBCSIPUAS 900116523 1 IN IP4 THIRD_PARTY_SIP_PROXY_IP
 s=SBCSIPUAS SIP STACK v1.0
 c=IN IP4 THIRD_PARTY_SIP_PROXY_IP
 t=0 0
 m=audio 17900 RTP/AVP 0
 a=rtpmap:0 PCMU/8000
 a=sendrecv
 a=maxptime:30


 As can be seen, the media IP is not rewritten by the opensips and the IP
 passed to my soft phone is the IP of the termination IP for the opensips
 (i.e. the third party SIP proxy IP). Because of that, my soft phone starts
 the RTP directly to my provider instead trough the RTP proxy that is
 attached to the opensips.
 Just to clarify, the media IP of my soft phone is not passed to my provider
 - that case is handled good.


 Any idea what is missing ?

 Thanks in advance.
 -- Kamen

 ___
 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] Nathelper / rtpproxy , problem with trusted IP

2011-02-02 Thread Ovidiu Sas
How did you started the session?  Maybe you should start the session
from the beginning in trusted mode.

Regards,
Ovidiu Sas

On Wed, Feb 2, 2011 at 11:26 AM, Laurent Schweizer
laurent.schwei...@peoplefone.com wrote:
 Hello all,



 Small problem with rtpproxy and nathelper



 as you can see in the log bellow , I use the force_rtp_proxy method  with
 the 'r' flag to indicate to trust the IP of the SDP.



 In the example bellow, the trusted IP is 95.128.80.6 3966 , the problem is
 that the old rtp source (in this case a MoH server) continue to send 1 or 2
 packet so the RTP proxy change them with 95.128.80.92:1086 so packet are
 not correctly forwarded.



 If the IP must be trusted why he take care of a received Packet ?



 I use the rtpproxy 1.2.1.



 Regards



 Laurent



 Feb  2 16:58:42 dns2 kamailio-1.5.4-notls/kamailio[31518]:  route 5 | INVITE
 has SDP | we trust the IP in SDP

 Feb  2 16:58:42 dns2 kamailio-1.5.4-notls/kamailio[31518]:  route 5 |
 force_rtp_proxy ocrf

 Feb  2 16:58:42 dns2 rtpproxy[8101]: DBUG:handle_command: received command
 31518_84 Uc0,101 408970232 95.128.80.6 3966 16e48326;1 2107358281;1

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: adding strong flag
 to existing session, new=1/0/0

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: lookup on ports
 3162/3820, session timer restarted

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: update

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command:   Unless the
 address provided by client historically

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:handle_command: pre-filling
 callee's address with 95.128.80.6:3966

 Feb  2 16:58:42 dns2 rtpproxy[8101]: DBUG:doreply: sending reply 31518_84
 3820 95.128.80.6 

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:rxmit_packets: callee's address
 filled in: 95.128.80.92:1086 (RTP)

 Feb  2 16:58:42 dns2 rtpproxy[8101]: INFO:rxmit_packets: guessing RTCP port
 for callee to be 1087







 ___
 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] B2B + top hiding + origination media IP

2011-02-02 Thread Kamen Petrov
Hi Ovidu,

I do not perform any changes on the received invite.

The top hiding does it and the problem is.. it does not change only the
media IP. Everything else goes OK.

Are you saying the top hiding does not work properly with the nathelper ?

Thanks
-- Kamen




On 2 February 2011 19:41, Ovidiu Sas o...@voipembedded.com wrote:

 The B2B module is operating on the received INVITE.  Any changes that
 you make to the received INVITE are not visible by the B2B module.
 Use a proxy to perform whatever you want to do (rtpproxy, accounting,
 etc.) and a separate server only for b2b (top hiding).

 Regards,
 Ovidiu Sas

 On Wed, Feb 2, 2011 at 12:11 PM, Kamen Petrov kamen.pet...@gmail.com
 wrote:
  Hi Guys,
 
  I am testing the following call flow:
  Soft Phone = opensips (configured for B2B) = third party termination
 SIP
  proxy
 
  Here is my config:
 
  modparam(b2b_entities, script_req_route, b2b_request)
  modparam(b2b_entities, script_reply_route, b2b_reply)
 
 
 
  local_route {
  xlog(LOCAL_ROUTE ($rm - $rr)\n);
  setflag(22);
  if (is_method(INVITE)) {
  engage_rtp_proxy(e,OPENSIPS_IP);
  exit;
  }
  else if (is_method(BYE) ) {
  xlog(BYE\n);
  }
  }
 
 
  route[b2b_request] {
  $avp(s:source_ip_address) := $si;
  perl_exec(messagedump_route, messages);
  xlog(b2b_request ($ci) ($rm - $rr)\n);
  }
 
 
  route[b2b_reply] {
  $avp(s:source_ip_address) := $si;
  perl_exec(messagedump_reply, messages);
  xlog(b2b_reply ($ci) - $rm - $rr\n);
  }
 
 
  route{
  ...
  if (is_method(INVITE) 
 perl_exec(check_for_forwarding_number))
  {
  engage_rtp_proxy(e,OPENSIPS_IP);
  xlog(LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD TO:
  $avp(s:fwd_ip)\n);
  setflag(1); # do accounting
  xlog(L_ERR, LOG: to uri=[$tu]
 [$avp(s:sip_proxy_ip)]\n);
 
  b2b_init_request(top hiding);
  exit;
  };
 
  ...
  }
 
 
  What happens is:
  - INVITE from the soft phone to the opensips
  - catched by the B2B and relayed to the third party SIP proxy + trying
  returned to the soft phone
  - Session Progress received from the third party SIP proxy - opensips
 -
  my soft phone
 
  At that stage, here is what I have on the soft phone log:
  18:56:50 UDP Packet Received from OPENSIPS_IP:5060
  
  SIP/2.0 183 Session Progress
  Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
  To: sip:359883409291@OPENSIPS_DOMAIN:5060;tag=B2B.113.667
  From: 359883327749 sip:359883327749@OPENSIPS_DOMAIN:5060;tag=1040
  Call-ID: 1296636915-3604-SALASWORK@192.168.1.2
  CSeq: 361 INVITE
  Content-Type: application/sdp
  Contact: sip:OPENSIPS_IP:5060;transport=udp
  Server: OpenSIPS (1.6.3-notls (x86_64/linux))
  Content-Length: 184
 
  v=0
  o=SBCSIPUAS 900116523 1 IN IP4 THIRD_PARTY_SIP_PROXY_IP
  s=SBCSIPUAS SIP STACK v1.0
  c=IN IP4 THIRD_PARTY_SIP_PROXY_IP
  t=0 0
  m=audio 17900 RTP/AVP 0
  a=rtpmap:0 PCMU/8000
  a=sendrecv
  a=maxptime:30
 
 
  As can be seen, the media IP is not rewritten by the opensips and the IP
  passed to my soft phone is the IP of the termination IP for the opensips
  (i.e. the third party SIP proxy IP). Because of that, my soft phone
 starts
  the RTP directly to my provider instead trough the RTP proxy that is
  attached to the opensips.
  Just to clarify, the media IP of my soft phone is not passed to my
 provider
  - that case is handled good.
 
 
  Any idea what is missing ?
 
  Thanks in advance.
  -- Kamen
 
  ___
  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


Re: [OpenSIPS-Users] B2B + top hiding + origination media IP

2011-02-02 Thread Ovidiu Sas
The nathelper module is performing changes on the received INVITE
(changing the SDP).
Those changes are not visible by the b2b module and therefor discarded.
As a result, the nathelper module (and any module that is changing the
initial INVITE) doesn't work with the b2b module.
The only change visible to the b2b module is the RURI.

Regards,
Ovidiu Sas

On Wed, Feb 2, 2011 at 12:52 PM, Kamen Petrov kamen.pet...@gmail.com wrote:
 Hi Ovidu,

 I do not perform any changes on the received invite.

 The top hiding does it and the problem is.. it does not change only the
 media IP. Everything else goes OK.

 Are you saying the top hiding does not work properly with the nathelper ?

 Thanks
 -- Kamen




 On 2 February 2011 19:41, Ovidiu Sas o...@voipembedded.com wrote:

 The B2B module is operating on the received INVITE.  Any changes that
 you make to the received INVITE are not visible by the B2B module.
 Use a proxy to perform whatever you want to do (rtpproxy, accounting,
 etc.) and a separate server only for b2b (top hiding).

 Regards,
 Ovidiu Sas

 On Wed, Feb 2, 2011 at 12:11 PM, Kamen Petrov kamen.pet...@gmail.com
 wrote:
  Hi Guys,
 
  I am testing the following call flow:
  Soft Phone = opensips (configured for B2B) = third party termination
  SIP
  proxy
 
  Here is my config:
 
  modparam(b2b_entities, script_req_route, b2b_request)
  modparam(b2b_entities, script_reply_route, b2b_reply)
 
 
 
  local_route {
      xlog(LOCAL_ROUTE ($rm - $rr)\n);
      setflag(22);
      if (is_method(INVITE)) {
      engage_rtp_proxy(e,OPENSIPS_IP);
      exit;
      }
      else if (is_method(BYE) ) {
      xlog(BYE\n);
      }
  }
 
 
  route[b2b_request] {
      $avp(s:source_ip_address) := $si;
      perl_exec(messagedump_route, messages);
      xlog(b2b_request ($ci) ($rm - $rr)\n);
  }
 
 
  route[b2b_reply] {
      $avp(s:source_ip_address) := $si;
      perl_exec(messagedump_reply, messages);
      xlog(b2b_reply ($ci) - $rm - $rr\n);
  }
 
 
  route{
  ...
      if (is_method(INVITE) 
  perl_exec(check_for_forwarding_number))
  {
      engage_rtp_proxy(e,OPENSIPS_IP);
      xlog(LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD
  TO:
  $avp(s:fwd_ip)\n);
      setflag(1); # do accounting
      xlog(L_ERR, LOG: to uri=[$tu]
  [$avp(s:sip_proxy_ip)]\n);
 
      b2b_init_request(top hiding);
      exit;
      };
 
  ...
  }
 
 
  What happens is:
  - INVITE from the soft phone to the opensips
  - catched by the B2B and relayed to the third party SIP proxy + trying
  returned to the soft phone
  - Session Progress received from the third party SIP proxy - opensips
  -
  my soft phone
 
  At that stage, here is what I have on the soft phone log:
  18:56:50 UDP Packet Received from OPENSIPS_IP:5060
  
  SIP/2.0 183 Session Progress
  Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
  To: sip:359883409291@OPENSIPS_DOMAIN:5060;tag=B2B.113.667
  From: 359883327749 sip:359883327749@OPENSIPS_DOMAIN:5060;tag=1040
  Call-ID: 1296636915-3604-SALASWORK@192.168.1.2
  CSeq: 361 INVITE
  Content-Type: application/sdp
  Contact: sip:OPENSIPS_IP:5060;transport=udp
  Server: OpenSIPS (1.6.3-notls (x86_64/linux))
  Content-Length: 184
 
  v=0
  o=SBCSIPUAS 900116523 1 IN IP4 THIRD_PARTY_SIP_PROXY_IP
  s=SBCSIPUAS SIP STACK v1.0
  c=IN IP4 THIRD_PARTY_SIP_PROXY_IP
  t=0 0
  m=audio 17900 RTP/AVP 0
  a=rtpmap:0 PCMU/8000
  a=sendrecv
  a=maxptime:30
 
 
  As can be seen, the media IP is not rewritten by the opensips and the IP
  passed to my soft phone is the IP of the termination IP for the opensips
  (i.e. the third party SIP proxy IP). Because of that, my soft phone
  starts
  the RTP directly to my provider instead trough the RTP proxy that is
  attached to the opensips.
  Just to clarify, the media IP of my soft phone is not passed to my
  provider
  - that case is handled good.
 
 
  Any idea what is missing ?
 
  Thanks in advance.
  -- Kamen
 
  ___
  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



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


Re: [OpenSIPS-Users] Pointing auth_db at remote database, OpenSIPS is expecting a local-like schema?

2011-02-02 Thread ambertch

O ok thanks for the clarification. Just have to make sure to include
that in my web server code to make sure that table is always there
then.

On Wed, Feb 2, 2011 at 4:11 AM, Bogdan-Andrei Iancu-2 [via OpenSIPS
(Open SIP Server)] ml-node+5984529-875472476-313...@n2.nabble.com
wrote:
 Hi Ambert,

 Just to be sure it is clear. When you configure a DB connection for a
 certain module, OpenSIPS will use that particular connection to check in
 a version table for the entries corresponding to that module.

 So, for your case, opensips will check in the remote DB, in the version
 table, only for the version of the subscriber table (used by auth_db)
 module ; for the rest of the modules (pointing to local DB), the version
 from the local Db will be queried.

 Regards,
 Bogdan

 ambertch wrote:
 I pointed auth_db at a remote DB and table via the following:

 modparam(auth_db, db_url, mysql://user:pass@server/MY_REMOTE_DB)
 ...
 if (!www_authorize(serve.name, users)) {


 Doing this, it complains that the table MY_REMOTE_DB.version doesn't
 exist.
 When I create MY_REMOTE_DB.version and copy over opensips.version, it then
 complains about users not being the correct version.

 I addressed this by noting a db entry in opensips.version for the default
 user storage table of subscriber = 7 and adding users = 7 that into
 MY_DB_NAME.version


 It works, but it looks to me that pointing to a remote db, some logic in
 OpenSIPS is expecting the same things as if auth_db were pointed locally.
 Is
 there any way to address this so I can remove the opensips version table
 from MY_REMOTE_DB?

 Thanks!
 Ambert



 --
 Bogdan-Andrei Iancu
 OpenSIPS Event - expo, conf, social, bootcamp
 2 - 4 February 2011, ITExpo, Miami,  USA
 OpenSIPS solutions and know-how


 ___
 Users mailing list
 [hidden email]
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 
 If you reply to this email, your message will be added to the discussion
 below:
 http://opensips-open-sip-server.1449251.n2.nabble.com/Pointing-auth-db-at-remote-database-OpenSIPS-is-expecting-a-local-like-schema-tp5983295p5984529.html
 To unsubscribe from Pointing auth_db at remote database, OpenSIPS is
 expecting a local-like schema?, click here.

-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Pointing-auth-db-at-remote-database-OpenSIPS-is-expecting-a-local-like-schema-tp5983295p5985847.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] B2B + top hiding + origination media IP

2011-02-02 Thread Ovidiu Sas
yes!

On Wed, Feb 2, 2011 at 1:12 PM, Kamen Petrov kamen.pet...@gmail.com wrote:
 Ok, that brings some clarification. Thanks.

 So the correct scenario is:
 1) softphone --registered to-- opensips A (pure)
 2) call is relayed from opensips A to opensips B (the B2B one)
 3) the opensips B connects to the termination
 4) the RTP goes between the softphone - opensips A - rtpproxy

 Would that work ? :)





 On 2 February 2011 20:04, Ovidiu Sas o...@voipembedded.com wrote:

 The nathelper module is performing changes on the received INVITE
 (changing the SDP).
 Those changes are not visible by the b2b module and therefor discarded.
 As a result, the nathelper module (and any module that is changing the
 initial INVITE) doesn't work with the b2b module.
 The only change visible to the b2b module is the RURI.

 Regards,
 Ovidiu Sas

 On Wed, Feb 2, 2011 at 12:52 PM, Kamen Petrov kamen.pet...@gmail.com
 wrote:
  Hi Ovidu,
 
  I do not perform any changes on the received invite.
 
  The top hiding does it and the problem is.. it does not change only
  the
  media IP. Everything else goes OK.
 
  Are you saying the top hiding does not work properly with the
  nathelper ?
 
  Thanks
  -- Kamen
 
 
 
 
  On 2 February 2011 19:41, Ovidiu Sas o...@voipembedded.com wrote:
 
  The B2B module is operating on the received INVITE.  Any changes that
  you make to the received INVITE are not visible by the B2B module.
  Use a proxy to perform whatever you want to do (rtpproxy, accounting,
  etc.) and a separate server only for b2b (top hiding).
 
  Regards,
  Ovidiu Sas
 
  On Wed, Feb 2, 2011 at 12:11 PM, Kamen Petrov kamen.pet...@gmail.com
  wrote:
   Hi Guys,
  
   I am testing the following call flow:
   Soft Phone = opensips (configured for B2B) = third party
   termination
   SIP
   proxy
  
   Here is my config:
  
   modparam(b2b_entities, script_req_route, b2b_request)
   modparam(b2b_entities, script_reply_route, b2b_reply)
  
  
  
   local_route {
       xlog(LOCAL_ROUTE ($rm -
   $rr)\n);
       setflag(22);
       if (is_method(INVITE)) {
       engage_rtp_proxy(e,OPENSIPS_IP);
       exit;
       }
       else if (is_method(BYE) ) {
       xlog(BYE\n);
       }
   }
  
  
   route[b2b_request] {
       $avp(s:source_ip_address) := $si;
       perl_exec(messagedump_route, messages);
       xlog(b2b_request ($ci) ($rm - $rr)\n);
   }
  
  
   route[b2b_reply] {
       $avp(s:source_ip_address) := $si;
       perl_exec(messagedump_reply, messages);
       xlog(b2b_reply ($ci) - $rm - $rr\n);
   }
  
  
   route{
   ...
       if (is_method(INVITE) 
   perl_exec(check_for_forwarding_number))
   {
       engage_rtp_proxy(e,OPENSIPS_IP);
       xlog(LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD
   TO:
   $avp(s:fwd_ip)\n);
       setflag(1); # do accounting
       xlog(L_ERR, LOG: to uri=[$tu]
   [$avp(s:sip_proxy_ip)]\n);
  
       b2b_init_request(top hiding);
       exit;
       };
  
   ...
   }
  
  
   What happens is:
   - INVITE from the soft phone to the opensips
   - catched by the B2B and relayed to the third party SIP proxy +
   trying
   returned to the soft phone
   - Session Progress received from the third party SIP proxy -
   opensips
   -
   my soft phone
  
   At that stage, here is what I have on the soft phone log:
   18:56:50 UDP Packet Received from OPENSIPS_IP:5060
   
   SIP/2.0 183 Session Progress
   Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
   To: sip:359883409291@OPENSIPS_DOMAIN:5060;tag=B2B.113.667
   From: 359883327749
   sip:359883327749@OPENSIPS_DOMAIN:5060;tag=1040
   Call-ID: 1296636915-3604-SALASWORK@192.168.1.2
   CSeq: 361 INVITE
   Content-Type: application/sdp
   Contact: sip:OPENSIPS_IP:5060;transport=udp
   Server: OpenSIPS (1.6.3-notls (x86_64/linux))
   Content-Length: 184
  
   v=0
   o=SBCSIPUAS 900116523 1 IN IP4 THIRD_PARTY_SIP_PROXY_IP
   s=SBCSIPUAS SIP STACK v1.0
   c=IN IP4 THIRD_PARTY_SIP_PROXY_IP
   t=0 0
   m=audio 17900 RTP/AVP 0
   a=rtpmap:0 PCMU/8000
   a=sendrecv
   a=maxptime:30
  
  
   As can be seen, the media IP is not rewritten by the opensips and the
   IP
   passed to my soft phone is the IP of the termination IP for the
   opensips
   (i.e. the third party SIP proxy IP). Because of that, my soft phone
   starts
   the RTP directly to my provider instead trough the RTP proxy that is
   attached to the opensips.
   Just to clarify, the media IP of my soft phone is not passed to my
   provider
   - that case is handled good.
  
  
   Any idea what is missing ?
  
   Thanks in advance.
   -- Kamen
  
   ___
   Users mailing list
   Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
  
 
  

[OpenSIPS-Users] MySQL tables using the opensipsdbctl shell script

2011-02-02 Thread Robin Malhotra
Step 3: Create MySQL tables using the opensipsdbctl shell script. The syntax
for
this utility follows:

opensipsdbctl create db name or db_path, optional



I'm getting the following error for the above syntax

bash: syntax error near unexpected token `newline'



what's wrong here ?  might be silly question
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-02 Thread Dave Singer
Wow I missed that one. Thanks.
Does that work for PVs so I can test other IPs like one from another
header, say X-src-ip:192.168.0.5. Last I tried I couldn't get it to
work. Not sure if that was 1.6.2 or 1.6.3. I'm using 1.6.4 now. :)

Thanks Again
Dave

On Wed, Feb 2, 2011 at 4:37 AM, Bogdan-Andrei Iancu bog...@opensips.org wrote:
 Hi Dave,

 do :  if (src_ip==myself) {}

 Regards,
 Bogdan

 Dave Singer wrote:

 Is there any way to check if the source IP/port is one that opensips
 is listening on or one ? something like if (sip:$si:$sp == myself) {
 ...bla; bla;}

 Thanks
 Dave

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




 --
 Bogdan-Andrei Iancu
 OpenSIPS Event - expo, conf, social, bootcamp
 2 - 4 February 2011, ITExpo, Miami,  USA
 OpenSIPS solutions and know-how


 ___
 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] OpenSIPS 1.6 on Ubuntu

2011-02-02 Thread Pradeep Patil
Anyone can help please in installing Opensip on Ubuntu.





On Wed, Feb 2, 2011 at 1:15 AM, Duane Larson duane.lar...@gmail.com wrote:

 The first thing you should do is
 http://www.packtpub.com/article/installation-of-opensips-1.6

 You can watch the webinars here
 http://www.opensips.org/Resources/Webinars

 You should join the mailing list
 http://www.opensips.org/Resources/MailingLists

 To search old mailing list posts I use

 http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html


 Sounds like what you need to do is to actually create a user/subscriber so
 that opensips can register the x-lite client.  For that you need to use the
 opensipsctl command or the osipsconsole.




 On Tue, Feb 1, 2011 at 12:21 PM, Robin Malhotra rocky...@gmail.comwrote:


 Guys I a newbie to OpenSIPS

  I have installed opensips and mysql on ubuntu following some
 instructions. I have also installed x-lite. Now how to register a user in
 opensips and to use it with the client ? I am stuck, please let me know

 Regards
 Ricky


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




 --
 --
 *--*--*--*--*--*
 Duane
 *--*--*--*--*--*
 --

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




-- 
thanking you,
Pradeep Patil
Cell No: 9676206432
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS 1.6 on Ubuntu

2011-02-02 Thread Dave Singer
The best place to start is http://www.opensips.org/
In the left column of the web page there is a section titled Resources
with links to many very helpful resources. Your using the mailing list
so you probably already have seen them to get here.
So. Where are you getting stuck? We need specifics in order to help out.

Also when you have a question you should start your own thread and not
use an existing thread unless it is completely relevant to what your
asking/stating.

FYI: The webinars are VERY important for getting an understanding of
how the whole thing works. With SIP the big picture is very important!
With out them you'll learn a lot of things the hard way like I did
before they were available.
Another good way to learn is to follow the mailing list discussions.

Welcome to the club,  ;-)
Dave

P.S. The software, documentation, mailing list, IRC, etc are all free
resources. The people helping you out are not getting paid to do it.
So an attitude of appreciation with patience will get you the best
millage. If you need more support there are those willing to do
contract support. See http://www.opensips.org/Resources/Business

On Wed, Feb 2, 2011 at 7:16 PM, Pradeep Patil pradeep.pati...@gmail.com wrote:
 Anyone can help please in installing Opensip on Ubuntu.





 On Wed, Feb 2, 2011 at 1:15 AM, Duane Larson duane.lar...@gmail.com wrote:

 The first thing you should do is
 http://www.packtpub.com/article/installation-of-opensips-1.6

 You can watch the webinars here
 http://www.opensips.org/Resources/Webinars

 You should join the mailing list
 http://www.opensips.org/Resources/MailingLists

 To search old mailing list posts I use

 http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

 Sounds like what you need to do is to actually create a user/subscriber so
 that opensips can register the x-lite client.  For that you need to use the
 opensipsctl command or the osipsconsole.



 On Tue, Feb 1, 2011 at 12:21 PM, Robin Malhotra rocky...@gmail.com
 wrote:

 Guys I a newbie to OpenSIPS

  I have installed opensips and mysql on ubuntu following some
 instructions. I have also installed x-lite. Now how to register a user in
 opensips and to use it with the client ? I am stuck, please let me know
 Regards
 Ricky

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




 --
 --
 *--*--*--*--*--*
 Duane
 *--*--*--*--*--*
 --

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




 --
 thanking you,
 Pradeep Patil
 Cell No: 9676206432

 ___
 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