[OpenSIPS-Users] Custom RADIUS authentication

2012-07-20 Thread Sebastien CRUAUX

Hi,

I was wondering if it was possible to perform RADIUS authentication 
(using custom AVPs) when the REGISTER request (with digest attributes) 
is received BUT without checking anything in the subscriber database 
(no user/password checking, only RADIUS server should tell us if we can 
register or not).


To sum up, here is the call flow I would like to get :
- Opensips receives 1st REGISTER from the user
- Opensips challenges the user with a 401 Unauthorized
- user sends a 2nd REGISTER with digest attributes
- Opensips sends an Access-Request with custom AVPs to my external 
RADIUS server (using the radius_send_auth function)
- RADIUS server answers Access-Accept (or Access-Reject) and Opensips 
sends 200 OK (or 403 Forbidden) to the user


I do not see how to do that in opensips.cfg since as far as I know, 
www_challenge is always associated to either www_authorize (which 
will perform a database check of username/password that I do not want) 
or aaa_www_authorize (which will send an Access-Request to my RADIUS 
server but without my custom AVPs).


Thank you !

Best regards,
Sebastien

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


[OpenSIPS-Users] Get SIP method's name

2012-06-29 Thread Sebastien CRUAUX

  
  
Hi,

Is there a way to get the name of a SIP method as a string in
opensips.cfg, maybe using transformations on a pseudo-variable ?

For example, on a REGISTER request, I tried $rm and
$(ru{uri.method}) but each time the result was 128 (internal
opensips code of the REGISTER method, cf

http://opensips.org/pipermail/users/2011-July/018347.html).
I would like to get "REGISTER" instead of "128". How can I do that ?
Thanks for your help.

Regards,

Sebastien
  


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


Re: [OpenSIPS-Users] Get SIP method's name

2012-06-29 Thread Sebastien CRUAUX

  
  
You are absolutely right, my bad I mixed up my logs and got
confused.
Thank you for your quick answer !

Le 29/06/2012 16:33, Vlad Paiu a crit:

  
  Hello,
  
  The $rm pvar returns the exact 'REGISTER' or 'INVITE' or whatever
  SIP method you have in the current SIP message, so this is the one
  to use in your case.
  The {uri.method} transformation returns the value of the method
  parameter from the URI passed at input, so this is not what you're
  interested in.
  
  Regards,
  Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 
  
  On 06/29/2012 04:49 PM, Sebastien CRUAUX wrote:
  

Hi,

Is there a way to get the name of a SIP method as a string in
opensips.cfg, maybe using transformations on a pseudo-variable ?

For example, on a REGISTER request, I tried $rm and
$(ru{uri.method}) but each time the result was 128 (internal
opensips code of the REGISTER method, cf

http://opensips.org/pipermail/users/2011-July/018347.html).


I would like to get "REGISTER" instead of "128". How can I do
that ?
Thanks for your help.

Regards,

Sebastien

___
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] aaa_radius sets definition: malformed modparam

2012-06-21 Thread Sebastien CRUAUX

  
  
Does anyone have an idea ? It seems the problem lies in the
formatting of the authentication request.

Indeed, I added a xlog in opensips just before the call to
radius_send_auth() in order to check if all the pseudo variables I
put in my custom AVPs are correctly recognized by Opensips and it
seems they are :

Jun 21 12:44:05
WWW_64Bits ./opensips[17927]: Sip-URI-User=37493210064,
User-Name=37493210064, Sip-Method=REGISTER,
Digest-User-Name=37493210064, Digest-Realm=halys.fr,
Digest-Nonce=4fe2fb132e38b48919f0b3196bf73cb9b4d65a77,
Digest-Algorithm=MD5,
Digest-Response=7e87b71a1b6b80f20329d281835305dd,
Framed-IP-Address=192.168.1.18, NAS-IP-Address=78.xxx.xxx.xxx

Best Regards,

Sebastien

Le 20/06/2012 18:27, Sebastien CRUAUX a crit:

  
  Unfortunately, now I am facing another issue...
  
  Here is my input set :
  
  modparam("aaa_radius",

  "sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
  Digest-User-Name=$au, Digest-Realm=$ar, 
   Digest-Nonce=$an,
  Digest-Algorithm=$auth.alg, Digest-Response=$auth.resp, 
  
  Framed-IP-Address=$(ct.fields(uri){uri.host}),
  NAS-IP-Address=$si)")
  
  and here is what I get in my Access-Request :
  
   Attribute
  Value Pairs
   AVP: l=6 t=NAS-IP-Address(4): 78.xxx.xxx.xxx 
   // Source IP of the REGISTER request
   AVP: l=6 t=Framed-IP-Address(8): 0.0.0.0
   AVP: l=34 t=Digest-Response(206):
  257b8dd004056e89d347dc396898102b
   AVP: l=7 t=Digest-Attributes(207): 06054D4435
   AVP: l=52 t=Digest-Attributes(207):
  023234666531663234373030303030303031636563383464...
   AVP: l=12 t=Digest-Attributes(207):
  010A68616C79732E6672
   AVP: l=15 t=Digest-Attributes(207):
  0A0D3337343933323130303634
   AVP: l=6 t=Error-Cause(101): Unknown(128)
   AVP: l=13 t=User-Name(1): 37493210064
   AVP: l=6 t=NAS-Port(5): 5060
   AVP: l=6 t=NAS-IP-Address(4): 172.17.1.126// local
  IP of my Opensips server
  
  Why do the AVPs Digest-Attributes, Error-Cause, NAS-Port and the
  2nd NAS-IP-Address appear while I never asked for them in my set ?
  
  Moreover, some of the AVPs I asked for are not present
  (Sip-Method, Digest-User-Name, Digest-Realm, Digest-Nonce,
  Digest-Algorithm) and the AVP Framed-IP-Address contains 0.0.0.0
  while it should contain the IP address in the Contact URI.
  Thanks for your help.
  
  Best Regards,
  
  Sebastien
  
  Le 20/06/2012 15:07, Sebastien CRUAUX a crit:
  

Thanks Vlad, it works ! :)

Regards,

Sebastien

Le 20/06/2012 15:04, Vlad Paiu a crit:

  
  Hello,
  
  You are calling the uri.host transformation wrong. You have 
$ct.fields(uri){uri.host}
  but it should be
 $(ct.fields(uri){uri.host})
  
  Regards,
  Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 
  
  On 06/20/2012 01:45 PM, Sebastien CRUAUX wrote:
  

Hi,

I would like to send custom RADIUS Access-Requests from
Opensips to my RADIUS server. The documentation told me it
was possible using the radius_send_auth() function. This
function needs the definition of sets in aaa_radius module
parameters in order to work.

I followed the doc and defined a couple of sets but I always
get the same error :

ERROR:aaa_radius:parse_set_content: malformed modparam 
ERROR:aaa_radius:parse_sets_func: malformed modparam
set1 
CRITICAL:core:yyerror: parse error in config file, line
258, column 18-19: Parameter sets not found in
module aaa_radius - can't set 
ERROR:core:main: bad config file (1 errors) 

Here is the definition of my custom sets :

modparam("aaa_radius",




"sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
Digest-User-Name=$au, Digest-Realm=$ar,
Digest-Nonce=$an, Digest-Algorithm=$auth.alg,
Digest-Response=$auth.resp,
Framed-IP-Address=$ct.fields(uri){uri.host},
NAS-IP-Address=$si)")
modparam("aaa_radius",




"sets", "set2 = (User-Name=$fU)")

Can anyone tell me what could be wrong in this definition ?
  

[OpenSIPS-Users] aaa_radius sets definition: malformed modparam

2012-06-20 Thread Sebastien CRUAUX

  
  
Hi,

I would like to send custom RADIUS Access-Requests from Opensips to
my RADIUS server. The documentation told me it was possible using
the radius_send_auth() function. This function needs the definition
of sets in aaa_radius module parameters in order to work.

I followed the doc and defined a couple of sets but I always get the
same error :

ERROR:aaa_radius:parse_set_content: malformed modparam 
ERROR:aaa_radius:parse_sets_func: malformed modparam set1 
CRITICAL:core:yyerror: parse error in config file, line 258,
column 18-19: Parameter sets not found in module
aaa_radius - can't set 
ERROR:core:main: bad config file (1 errors) 

Here is the definition of my custom sets :

modparam("aaa_radius",
"sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
Digest-User-Name=$au, Digest-Realm=$ar, Digest-Nonce=$an,
Digest-Algorithm=$auth.alg, Digest-Response=$auth.resp,
Framed-IP-Address=$ct.fields(uri){uri.host},
NAS-IP-Address=$si)")
modparam("aaa_radius",
"sets", "set2 = (User-Name=$fU)")

Can anyone tell me what could be wrong in this definition ? When I
comment the definition of "set1", Opensips starts fine so I guess
one of the AVPs makes it crash but I can't figure out which one.
Thanks.

Best Regards,

Sebastien
  


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


Re: [OpenSIPS-Users] aaa_radius sets definition: malformed modparam

2012-06-20 Thread Sebastien CRUAUX

  
  
Thanks Vlad, it works ! :)

Regards,

Sebastien

Le 20/06/2012 15:04, Vlad Paiu a crit:

  
  Hello,
  
  You are calling the uri.host transformation wrong. You have 
$ct.fields(uri){uri.host}
  but it should be
 $(ct.fields(uri){uri.host})
  
  Regards,
  Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 
  
  On 06/20/2012 01:45 PM, Sebastien CRUAUX wrote:
  

Hi,

I would like to send custom RADIUS Access-Requests from Opensips
to my RADIUS server. The documentation told me it was possible
using the radius_send_auth() function. This function needs the
definition of sets in aaa_radius module parameters in order to
work.

I followed the doc and defined a couple of sets but I always get
the same error :

ERROR:aaa_radius:parse_set_content: malformed modparam 
ERROR:aaa_radius:parse_sets_func: malformed modparam set1 
CRITICAL:core:yyerror: parse error in config file, line 258,
column 18-19: Parameter sets not found in module
aaa_radius - can't set 
ERROR:core:main: bad config file (1 errors) 

Here is the definition of my custom sets :

modparam("aaa_radius",


"sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
Digest-User-Name=$au, Digest-Realm=$ar, Digest-Nonce=$an,
Digest-Algorithm=$auth.alg, Digest-Response=$auth.resp,
Framed-IP-Address=$ct.fields(uri){uri.host},
NAS-IP-Address=$si)")
modparam("aaa_radius",


"sets", "set2 = (User-Name=$fU)")

Can anyone tell me what could be wrong in this definition ? When
I comment the definition of "set1", Opensips starts fine so I
guess one of the AVPs makes it crash but I can't figure out
which one.
Thanks.

Best Regards,

Sebastien

___
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] cdr_flag not working in v1.7

2012-03-23 Thread Sebastien CRUAUX

Hi Razvan,

I dug up this thread because I am facing the same issue as John and I am 
not sure I understood your answer.

What should be done in order to make the cdr_flag work with opensips 1.7 ?

Regards,

Sebastien

Le 20/09/2011 18:23, Razvan Crainea a écrit :

Hi John,

The problem is here:

if (method==INVITE || method==BYE) {
# Write CDR records to the database
setflag(2);
}

For any sequential request, the CDR engine ignores the flag (2 in your 
case). But the standard accounting will still notice it, and therefore 
will log the
BYE into the database. Deleting this lines above should no longer 
account it.
Anyway, I guess that the INVITE has all the fields filled properly 
(especially duration and setuptime), right?


Regards,

--
Răzvan Crainea
OpenSIPS Developer


On 20.09.2011 19:07, John Quick wrote:
My favourite module (dialog) got even better when the cdr_flag option 
was

added. I use it all the time now.

But it doesn't seem to be working in version 1.7. I know the call is
creating a dialog because db_mode is set to 1 and the record can be 
seen in
the dialog table while the call is active. However, 2 records are 
written to
the acc table - one for the INVITE and another for the BYE. So 
cdr_flag is

being ignored. Is this a problem in v1.7 or have I done something wrong?

Here's the relevant bits from opensips.cfg:
modparam(acc, db_flag, 2)
modparam(acc, cdr_flag, 2)
modparam(acc, db_missed_flag, 3)
modparam(acc, failed_transaction_flag, 3)
modparam(acc, report_cancels, 1)
modparam(acc, detect_direction, 1)
modparam(acc, db_extra, authid=$avp(authid); srcip=$si; called=$rU;
route=$rd; cli=$fU)

modparam(dialog, db_mode, 1)# 1 during testing; 0 or 3 for
production
modparam(dialog, dlg_match_mode, 1)
modparam(dialog, rr_param, scdg)  # unique rr tag value in case 
other

opensips servers in route
modparam(dialog, default_timeout, 14400)   # default timeout set 
to 4

hours

route[3]
 if (method==INVITE || method==BYE) {
 # Write CDR records to the database
 setflag(2);
 # ...and missed calls too
 setflag(3);
 }

 if (method==INVITE) {
 # make OpenSIPS create a dialog record (see dialog module 
for info)

 create_dialog();
 }

...and my loose routing section:
 if (has_totag()) {
 if (loose_route()) {
 # Attempt to match this request with an existing dialog
 match_dialog();

 # Check authentication of re-invites - don't challenge 
if from a

known address
 if(method==INVITE
(!check_address(0,$si,$sp,$proto))) {
 if (!proxy_authorize(,subscriber)) {
   proxy_challenge(,1);
   exit;
 };
 };

 if (method==INVITE || method==BYE) {
 # Write CDR records to the database
 setflag(2);
 }


John Quick
Smartvox Limited
Web: www.smartvox.co.uk

Smartvox is a limited company, registered in England and Wales, number
5005263.
Registered office: Spectrum House, Dunstable Road, Redbourn, St.Albans,
Herts AL3 7PR




___
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] uac_registrant : forced socket parameter

2011-12-09 Thread Sebastien CRUAUX

  
  
Hi Ovidiu,

Finally after days and days of this issue making me crazy, I found
out where the problem came from !
I thought it could be helpful to share it, it might help other users
having the same problem.

Actually, the parameter "listen=ip_you_want_opensips_to_listen_on"
is MANDATORY if you want to use the forced_socket parameter in
uac_registrant.
For example, if you define the following line in opensips.cfg :

modparam("uac_registrant",
"uac","sip:my_domain,,sip:my_user@my_domain,,my_user,my_password,sip:my_user@my_contact_ip,,,udp:172.17.1.131:5060")

you have to define the following line :

  listen=172.17.1.131

before in opensips.cfg, otherwise, uac_registrant will consider the
forced_socket as invalid. By default in opensips.cfg the listen
parameter is not defined and opensips listens by default on all IPs,
but uac_registrant does not recognize the open sockets.

Best regards,

Sebastien


Le 24/11/2011 16:11, Ovidiu Sas a crit:

  The difference between trunk and 1.7 is that if a forced socket is
invalid, an error will be printed and opensips will stop.
On 1.7, is a forced socket is invalid, it will be ignored and a
default one will be used.
You can copy the whole module from trunk into your 1.7 repo if you
want to test the new behaviour.

Regards,
Ovidiu Sas

On Thu, Nov 24, 2011 at 9:57 AM, Sebastien CRUAUX scru...@halys.fr wrote:

  
Hi Ovidiu,

Sorry about the late reply.
Are these changes included in the new Opensips 1.7.1 ?

Best regards,

Sebastien

Le 17/11/2011 15:45, Ovidiu Sas a crit :


  
Actually, it was implemented completely and it is working ok.
If the forced socket (in the uac param) is not a valid one, it is
discarded and opensips will choose a valid one from it's own list.

I pushed a check in the trunk (if a socket is forced and it is
invalid, opensips will fail to start).
Please pull the latest trunk and try again (you will get an error if
you are forcing a bad socket).

Regards,
Ovidiu Sas

On Wed, Nov 16, 2011 at 12:22 PM, Sebastien CRUAUXscru...@halys.fr
wrote:

  

Thank you very much for your quick answer Ovidiu ! :)

Le 16/11/2011 18:15, Ovidiu Sas a crit :


  
It seems that you are right. I forgot to completely implement this
feature.
I will take care of it.

Regards,
Ovidiu Sas

On Wed, Nov 16, 2011 at 12:00 PM, Sebastien CRUAUXscru...@halys.fr
wrote:

  

Hi,

It seems that the forced socket parameter in the uac_registrant module
is
ignored.
I have 3 IP addresses on my Opensips server :
- 172.17.1.126 on eth0
- 172.17.1.13 on eth0:1
- 172.17.1.131 on eth1

I would like my REGISTER requests to go through the eth1 interface so I
used
the following line in opensips.cfg :

modparam("uac_registrant",


"uac","sip:mydomain.org,,sip:my_u...@mydomain.org,,my_user,my_password,sip:my_user@my_ip,,,172.17.1.131")

However, the REGISTER requests are going out through the IP address
172.17.1.13 (eth0:1 interface). I tried replacing the last parameter of
the
above line by "udp:172.17.1.131:5060" but the behaviour did not change.
Note
that Opensips is listening on all 3 IP addresses.

Thanks,

Sebastien

___
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] uac_registrant : forced socket parameter

2011-11-24 Thread Sebastien CRUAUX

Hi Ovidiu,

Sorry about the late reply.
Are these changes included in the new Opensips 1.7.1 ?

Best regards,

Sebastien

Le 17/11/2011 15:45, Ovidiu Sas a écrit :

Actually, it was implemented completely and it is working ok.
If the forced socket (in the uac param) is not a valid one, it is
discarded and opensips will choose a valid one from it's own list.

I pushed a check in the trunk (if a socket is forced and it is
invalid, opensips will fail to start).
Please pull the latest trunk and try again (you will get an error if
you are forcing a bad socket).

Regards,
Ovidiu Sas

On Wed, Nov 16, 2011 at 12:22 PM, Sebastien CRUAUXscru...@halys.fr  wrote:

Thank you very much for your quick answer Ovidiu ! :)

Le 16/11/2011 18:15, Ovidiu Sas a écrit :

It seems that you are right.  I forgot to completely implement this
feature.
I will take care of it.

Regards,
Ovidiu Sas

On Wed, Nov 16, 2011 at 12:00 PM, Sebastien CRUAUXscru...@halys.fr
  wrote:

Hi,

It seems that the forced socket parameter in the uac_registrant module is
ignored.
I have 3 IP addresses on my Opensips server :
- 172.17.1.126 on eth0
- 172.17.1.13 on eth0:1
- 172.17.1.131 on eth1

I would like my REGISTER requests to go through the eth1 interface so I
used
the following line in opensips.cfg :

modparam(uac_registrant,

uac,sip:mydomain.org,,sip:my_u...@mydomain.org,,my_user,my_password,sip:my_user@my_ip,,,172.17.1.131)

However, the REGISTER requests are going out through the IP address
172.17.1.13 (eth0:1 interface). I tried replacing the last parameter of
the
above line by udp:172.17.1.131:5060 but the behaviour did not change.
Note
that Opensips is listening on all 3 IP addresses.

Thanks,

Sebastien

___
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] uac_registrant : forced socket parameter

2011-11-16 Thread Sebastien CRUAUX

  
  
Hi,

It seems that the forced socket parameter in the uac_registrant
module is ignored.
I have 3 IP addresses on my Opensips server :
- 172.17.1.126 on eth0
- 172.17.1.13 on eth0:1
- 172.17.1.131 on eth1

I would like my REGISTER requests to go through the eth1 interface
so I used the following line in opensips.cfg :

modparam("uac_registrant",
"uac","sip:mydomain.org,,sip:my_u...@mydomain.org,,my_user,my_password,sip:my_user@my_ip,,,172.17.1.131")

However, the REGISTER requests are going out through the IP address
172.17.1.13 (eth0:1 interface). I tried replacing the last parameter
of the above line by "udp:172.17.1.131:5060" but the
behaviour did not change. Note that Opensips is listening on all 3
IP addresses.

Thanks,

Sebastien
  


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


Re: [OpenSIPS-Users] uac_registrant : forced socket parameter

2011-11-16 Thread Sebastien CRUAUX

Thank you very much for your quick answer Ovidiu ! :)

Le 16/11/2011 18:15, Ovidiu Sas a écrit :

It seems that you are right.  I forgot to completely implement this feature.
I will take care of it.

Regards,
Ovidiu Sas

On Wed, Nov 16, 2011 at 12:00 PM, Sebastien CRUAUXscru...@halys.fr  wrote:

Hi,

It seems that the forced socket parameter in the uac_registrant module is
ignored.
I have 3 IP addresses on my Opensips server :
- 172.17.1.126 on eth0
- 172.17.1.13 on eth0:1
- 172.17.1.131 on eth1

I would like my REGISTER requests to go through the eth1 interface so I used
the following line in opensips.cfg :

modparam(uac_registrant,
uac,sip:mydomain.org,,sip:my_u...@mydomain.org,,my_user,my_password,sip:my_user@my_ip,,,172.17.1.131)

However, the REGISTER requests are going out through the IP address
172.17.1.13 (eth0:1 interface). I tried replacing the last parameter of the
above line by udp:172.17.1.131:5060 but the behaviour did not change. Note
that Opensips is listening on all 3 IP addresses.

Thanks,

Sebastien

___
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] RTPproxy + Opensips 1.7.0

2011-11-09 Thread Sebastien CRUAUX

  
  
Hi Razvan,

I finally managed to get the rtpproxy logs (it only needed to be
launched with the -d flag), so I added a trace in the
create_twinlistener function in rtpp_command.c in order to see what
was the errno on the bind attempt. I get an errno 98 (Address
already in use) for all the UDP ports in my rtpproxy range (18000 -
18020) :

Nov  8 17:53:52
WWW_64Bits ./opensips[22671]: INFO :: (INVITE) rtpproxy set 1
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: node-rn_disabled = 1,
node-rn_recheck_ticks = 70, get_ticks = 72 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:rtpp_test: force = 0 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:rtpp_test: rtp proxy udp:localhost:12221
found, support for it re-enabled 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 0 
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]: INFO:handle_command:
new session 944821033294@192.168.1.206, tag z9hG4bK74406739;1
requested, type strong
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18013 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18007 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18017 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18009 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18005 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18001 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18015 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:force_rtp_proxy_body: command sent to rtpproxy, cp
= E10 , err = 10 
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18011 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:force_rtp_proxy_body: rtpproxy returned an error,
we disable the node 
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]:
ERR:create_twinlistener: bind to the 18003 port failed, errno =
98: Address already in use
Nov  8 17:53:52 WWW_64Bits rtpproxy[22611]: ERR:handle_command:
can't create listener
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: node-rn_disabled = 1,
node-rn_recheck_ticks = 132, get_ticks = 72 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 1 
Nov  8 17:53:52 WWW_64Bits ./opensips[22671]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies

However, when I run netstat none of these ports seems to be used...

Best regards,

Sebastien

Le 08/11/2011 13:48, Razvan Crainea a écrit :
Hi
  Sebastien,
  
  
  Taking a look into RTPProxy's code, I see that the error 10 is
  returned when it can't create a listener. This happens when
  RTPProxy can't create or bind a socket, or doesn't have enough
  ports allocated. My guess is that in your case it can't bind a
  socket on the interface specified by the "-l" parameter.
  
  
  Best regards,
  
  
  --
  
  Răzvan Crainea
  
  OpenSIPS Developer
  
  
  
  ___
  
  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] RTPproxy + Opensips 1.7.0

2011-11-09 Thread Sebastien CRUAUX

  
  
Update : it seems rtpproxy tries to bind on 2 sockets, one on an
even port and another on the odd port just after (cf for loop in the
create_twinlistener function). The first bind is successful but it
fails on the second :

Nov 9 15:01:57 WWW_64Bits ./opensips[1882]: INFO :: (INVITE)
rtpproxy set 1
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: node-rn_disabled = 0,
node-rn_recheck_ticks = 0, get_ticks = 11
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 0
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]: INFO:handle_command:
new session 886876334, tag 1383821790;1 requested, type strong
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18014 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18015 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18000 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18001 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18016 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18017 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18002 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18003 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18012 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18013 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18010 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18011 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18008 port succeeded
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:force_rtp_proxy_body: command sent to rtpproxy, cp
= E10 , err = 10
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:force_rtp_proxy_body: rtpproxy returned an error,
we disable the node
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18009 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18018 port succeeded
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: node-rn_disabled = 1,
node-rn_recheck_ticks = 71, get_ticks = 11
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18019 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 1
Nov 9 15:01:57 WWW_64Bits ./opensips[1882]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
INFO:create_twinlistener: bind to the 18004 port succeeded
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]:
ERR:create_twinlistener: bind to the 18005 port failed, errno =
98: Address already in use
Nov 9 15:01:57 WWW_64Bits rtpproxy[1774]: ERR:handle_command:
can't create listener

Why are there 2 binds ? One should be enough (there is no video in
my INVITE request).

Best regards,

Sebastien

Le 09/11/2011 12:12, Sebastien CRUAUX a crit:

  
  Hi Razvan,
  
  I finally managed to get the rtpproxy logs (it only needed to be
  launched with the -d flag), so I added a trace in the
  create_twinlistener function in rtpp_command.c in order to see
  what was the errno on the bind attempt. I get an errno 98

Re: [OpenSIPS-Users] RTPproxy + Opensips 1.7.0

2011-11-07 Thread Sebastien CRUAUX

  
  
Hi Razvan,

I added some INFO traces in the select_rtpp_node function in order
to get some clues about what happens (see enclosed file).
Here is what is displayed in my /var/log/messages when an INVITE is
received :

Nov 7 15:21:38 WWW_64Bits ./opensips[19884]: INFO :: (INVITE)
rtpproxy set 1
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 0
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: entering select_rtpp_node
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: rtpproxy node count = 1
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
INFO:rtpproxy:select_rtpp_node: result rtpp_test = 1
Nov 7 15:21:38 WWW_64Bits ./opensips[19884]:
ERROR:rtpproxy:force_rtp_proxy_body: no available proxies

This is really weird, if rtpp_test returns 1, it should mean that
the rtpproxy socket was found right ? Then why do we have an error
message saying that there are no available proxies ? I'm confused...

Best regards,

Sebastien

Le 04/11/2011 15:23, Razvan Crainea a crit:

  
  Hi Sebastien,
  
  I will try to replicate this scenario and see if I am getting the
  same behaviour. I will get back to you later.
  
  Regards,
  --
Rzvan Crainea
OpenSIPS Developer
  
  On 11/04/2011 04:20 PM, Sebastien CRUAUX wrote:
  

I also tried to enter the rtpproxy_sock parameters and the set
IDs in the nh_sockets table and to load the rtpproxy sets from
the database but it did not work either :(

Sebastien

Le 04/11/2011 11:52, Sebastien CRUAUX a crit:

  
  Hi Razvan,
  
  Yes I think I declared the rtpproxy sets correctly, unless
  there is some new parameter in the new rtpproxy module that I
  forgot :
  
  # - rtpproxy params -
  modparam("rtpproxy", "rtpproxy_sock", "1 ==
  udp:localhost:12221")
  modparam("rtpproxy", "rtpproxy_sock", "2 ==
  udp:localhost:1")
  
  Regards,
  
  Sebastien
  
  Le 04/11/2011 11:44, Razvan Crainea a crit:
  

Hi Sebastien,

Are you sure that when you declare the RTPProxy sets you
allocate them the set identifiers (1 and 2)? Can you send us
the rtpproxy_sock parameters declaration?

Regards,
--
Rzvan Crainea
OpenSIPS Developer
    
On 11/04/2011 12:27 PM, Sebastien CRUAUX wrote:

  
  Hi,
  
  I am currently migrating my old Opensips 1.6.2 to the new
  Opensips 1.7.0 but I am facing some issues with the
  configuration of rtpproxy.
  The version of rtpproxy I am using is the commit
  6b82ff914543d21ff9ddbb797b40a77516348308.
  
  When I start Opensips, the two sets of rtpproxies I
  configured are detected :
  
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:12221 found, support
  for it enabled
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:1 found, support
  for it enabled
  
  However, when an INVITE is received by Opensips it seems
  rtpproxy is not found, consequently the SDP body is not
  rewritten :
  
  INFO
  :: (INVITE) rtpproxy set 1
  ERROR:rtpproxy:force_rtp_proxy_body:






  no available proxies
  
  More information about my configuration :
  - my Opensips/rtpproxy server has 2 IP addresses, one
  opened on the internet, one internal used to communicate
  with my VoIP/PSTN gateway
  - I have 2 sets of rtpproxies : the 1st one is in bridge
  mode for VoIP to PSTN or PSTN to VoIP calls, the 2nd one
  only listens on the external IP and is used for SIP to SIP
  calls
  
  
  ./rtpproxy -u seb -l 172.17.1.126 172.17.1.131 -s
  udp:localhost 12221 -m 18000 -M 18020
   ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost
  1 -m 18021 -M 18030

  - below is the part of my opensips.cfg file whic

[OpenSIPS-Users] RTPproxy + Opensips 1.7.0

2011-11-04 Thread Sebastien CRUAUX

  
  
Hi,

I am currently migrating my old Opensips 1.6.2 to the new Opensips
1.7.0 but I am facing some issues with the configuration of
rtpproxy.
The version of rtpproxy I am using is the commit
6b82ff914543d21ff9ddbb797b40a77516348308.

When I start Opensips, the two sets of rtpproxies I configured are
detected :

INFO:rtpproxy:rtpp_test: rtp proxy udp:localhost:12221
found, support for it enabled
INFO:rtpproxy:rtpp_test: rtp proxy udp:localhost:1
found, support for it enabled

However, when an INVITE is received by Opensips it seems rtpproxy is
not found, consequently the SDP body is not rewritten :

INFO :: (INVITE)
rtpproxy set 1
ERROR:rtpproxy:force_rtp_proxy_body:

no available proxies

More information about my configuration :
- my Opensips/rtpproxy server has 2 IP addresses, one opened on the
internet, one internal used to communicate with my VoIP/PSTN gateway
- I have 2 sets of rtpproxies : the 1st one is in bridge mode for
VoIP to PSTN or PSTN to VoIP calls, the 2nd one only listens on the
external IP and is used for SIP to SIP calls

 ./rtpproxy
-u seb -l 172.17.1.126 172.17.1.131 -s udp:localhost 12221 -m
18000 -M 18020
 ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost 1 -m
18021 -M 18030
  
- below is the part of my opensips.cfg file which handles
the INVITE requests (I just replaced my public IP address with
xx.xx.xx.xx) :

 if
(is_method("INVITE")) {
 if (registered("location","$fu") 
registered("location")) { # if From and To are SIP
registered : we use rtpproxy 2 (external IP)
 setflag(22);
 xlog("INFO :: (INVITE) rtpproxy set 2");
 }
 else
{ #
otherwise, SIP to ISUP or ISUP to SIP call : we use rtpproxy 1
(bridge mode)
 xlog("INFO :: (INVITE) rtpproxy set 1");
 }
 if (has_body("application/sdp")) {
 if (isflagset(22)) {
 set_rtp_proxy_set("2");
 if
(rtpproxy_offer("","xx.xx.xx.xx")) {
 t_on_reply("1");
 }
 }
 else {
 set_rtp_proxy_set("1");
 if (dst_ip == 172.17.1.131) {
# my IP address opened to the internet
(external IP)
 if
(rtpproxy_offer("ei","xx.xx.xx.xx")) {
 t_on_reply("1");
 }
 }
 if (dst_ip == 172.17.1.126) {
 # my internal IP address
 if
(rtpproxy_offer("ie","xx.xx.xx.xx")) {
 t_on_reply("1");
 }
 }
 }

 }
 else {
 t_on_reply("2");
 }
 }


Any idea ? I have been stuck on this issue for a few days, this
configuration worked fine with my previous versions of Opensips and
rtpproxy.

Best Regards,

Sebastien
  


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


Re: [OpenSIPS-Users] RTPproxy + Opensips 1.7.0

2011-11-04 Thread Sebastien CRUAUX

  
  
Hi Razvan,

Yes I think I declared the rtpproxy sets correctly, unless there is
some new parameter in the new rtpproxy module that I forgot :

# - rtpproxy params -
modparam("rtpproxy", "rtpproxy_sock", "1 == udp:localhost:12221")
modparam("rtpproxy", "rtpproxy_sock", "2 == udp:localhost:1")

Regards,

Sebastien

Le 04/11/2011 11:44, Razvan Crainea a crit:

  
  Hi Sebastien,
  
  Are you sure that when you declare the RTPProxy sets you allocate
  them the set identifiers (1 and 2)? Can you send us the
  rtpproxy_sock parameters declaration?
  
  Regards,
  --
Rzvan Crainea
OpenSIPS Developer
  
  On 11/04/2011 12:27 PM, Sebastien CRUAUX wrote:
  

Hi,

I am currently migrating my old Opensips 1.6.2 to the new
Opensips 1.7.0 but I am facing some issues with the
configuration of rtpproxy.
The version of rtpproxy I am using is the commit
6b82ff914543d21ff9ddbb797b40a77516348308.

When I start Opensips, the two sets of rtpproxies I configured
are detected :

INFO:rtpproxy:rtpp_test:
rtp proxy udp:localhost:12221 found, support for it
enabled
INFO:rtpproxy:rtpp_test:
rtp proxy udp:localhost:1 found, support for it
enabled

However, when an INVITE is received by Opensips it seems
rtpproxy is not found, consequently the SDP body is not
rewritten :

INFO ::
(INVITE) rtpproxy set 1
ERROR:rtpproxy:force_rtp_proxy_body:



no available proxies

More information about my configuration :
- my Opensips/rtpproxy server has 2 IP addresses, one opened on
the internet, one internal used to communicate with my VoIP/PSTN
gateway
- I have 2 sets of rtpproxies : the 1st one is in bridge mode
for VoIP to PSTN or PSTN to VoIP calls, the 2nd one only listens
on the external IP and is used for SIP to SIP calls


./rtpproxy -u seb -l 172.17.1.126 172.17.1.131 -s
udp:localhost 12221 -m 18000 -M 18020
 ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost 1
-m 18021 -M 18030
  
- below is the part of my opensips.cfg file which
handles the INVITE requests (I just replaced my public IP
address with xx.xx.xx.xx) :

 if
(is_method("INVITE")) {
 if (registered("location","$fu") 
registered("location")) { # if From and To are SIP
registered : we use rtpproxy 2 (external IP)
 setflag(22);
 xlog("INFO :: (INVITE) rtpproxy set
2");
 }
 else
{
# otherwise, SIP to ISUP or ISUP to SIP call : we use
rtpproxy 1 (bridge mode)
 xlog("INFO :: (INVITE) rtpproxy set
1");
 }
 if (has_body("application/sdp")) {
 if (isflagset(22)) {
 set_rtp_proxy_set("2");
 if
(rtpproxy_offer("","xx.xx.xx.xx")) {
 t_on_reply("1");
 }
 }
 else {
 set_rtp_proxy_set("1");
 if (dst_ip == 172.17.1.131)
{ # my IP address opened to the
internet (external IP)
 if
(rtpproxy_offer("ei","xx.xx.xx.xx")) {

t_on_reply("1");
 }
 }
 if (dst_ip == 172.17.1.126)
{  # my internal IP address
 if
(rtpproxy_offer("ie","xx.xx.xx.xx")) {

t_on_reply("1");
 }
 }
 }

 }
 else {
 t_on_reply("2");
 }
 }


Any idea ? I have been stuck on this issue for a few days, this
configuration worked fine with my previous versions of Opensips
and rtpproxy.

Best Regards,

Sebastien 


___
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] RTPproxy + Opensips 1.7.0

2011-11-04 Thread Sebastien CRUAUX

  
  
I also tried to enter the rtpproxy_sock parameters and the set IDs
in the nh_sockets table and to load the rtpproxy sets from the
database but it did not work either :(

Sebastien

Le 04/11/2011 11:52, Sebastien CRUAUX a crit:

  
  Hi Razvan,
  
  Yes I think I declared the rtpproxy sets correctly, unless there
  is some new parameter in the new rtpproxy module that I forgot :
  
  # - rtpproxy params -
  modparam("rtpproxy", "rtpproxy_sock", "1 == udp:localhost:12221")
  modparam("rtpproxy", "rtpproxy_sock", "2 == udp:localhost:1")
  
  Regards,
  
  Sebastien
  
  Le 04/11/2011 11:44, Razvan Crainea a crit:
  

Hi Sebastien,

Are you sure that when you declare the RTPProxy sets you
allocate them the set identifiers (1 and 2)? Can you send us the
rtpproxy_sock parameters declaration?

Regards,
--
Rzvan Crainea
OpenSIPS Developer

On 11/04/2011 12:27 PM, Sebastien CRUAUX wrote:

  
  Hi,
  
  I am currently migrating my old Opensips 1.6.2 to the new
  Opensips 1.7.0 but I am facing some issues with the
  configuration of rtpproxy.
  The version of rtpproxy I am using is the commit
  6b82ff914543d21ff9ddbb797b40a77516348308.
  
  When I start Opensips, the two sets of rtpproxies I configured
  are detected :
  
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:12221 found, support for
  it enabled
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:1 found, support for
  it enabled
  
  However, when an INVITE is received by Opensips it seems
  rtpproxy is not found, consequently the SDP body is not
  rewritten :
  
  INFO ::
  (INVITE) rtpproxy set 1
  ERROR:rtpproxy:force_rtp_proxy_body:




  no available proxies
  
  More information about my configuration :
  - my Opensips/rtpproxy server has 2 IP addresses, one opened
  on the internet, one internal used to communicate with my
  VoIP/PSTN gateway
  - I have 2 sets of rtpproxies : the 1st one is in bridge mode
  for VoIP to PSTN or PSTN to VoIP calls, the 2nd one only
  listens on the external IP and is used for SIP to SIP calls
  
  
  ./rtpproxy -u seb -l 172.17.1.126 172.17.1.131 -s
  udp:localhost 12221 -m 18000 -M 18020
   ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost
  1 -m 18021 -M 18030

  - below is the part of my opensips.cfg file which
  handles the INVITE requests (I just replaced my public IP
  address with xx.xx.xx.xx) :
  
   if
  (is_method("INVITE")) {
   if (registered("location","$fu")
   registered("location")) { # if From and To
  are SIP registered : we use rtpproxy 2 (external IP)
   setflag(22);
   xlog("INFO :: (INVITE) rtpproxy
  set 2");
   }
   else
  {
  # otherwise, SIP to ISUP or ISUP to SIP call : we use
  rtpproxy 1 (bridge mode)
   xlog("INFO :: (INVITE) rtpproxy
  set 1");
   }
   if (has_body("application/sdp")) {
   if (isflagset(22)) {
   set_rtp_proxy_set("2");
   if
  (rtpproxy_offer("","xx.xx.xx.xx")) {
   t_on_reply("1");
   }
   }
   else {
   set_rtp_proxy_set("1");
   if (dst_ip ==
  172.17.1.131) { # my IP address
  opened to the internet (external IP)
   if
  (rtpproxy_offer("ei","xx.xx.xx.xx")) {
  
  t_on_reply("1");
   }
   }
   if (dst_ip ==
  172.17.1.126) {  # my internal IP
  address
   if
  (rtpproxy_offer("ie","xx.xx.xx.xx")) {
  
  t_on_reply("1");
   }
   }
   }
  
   }
   else {
   t_on_reply("2");
   }
   }
  
  
  Any idea ? I have been stuck on this issue for a few days,
  this configuration worked fine with my previous versions of
  Opensips and rtpprox

Re: [OpenSIPS-Users] RTPproxy + Opensips 1.7.0

2011-11-04 Thread Sebastien CRUAUX

  
  
Thank you very much Razvan !

Regards,
Sebastien

Le 04/11/2011 15:23, Razvan Crainea a crit:

  
  Hi Sebastien,
  
  I will try to replicate this scenario and see if I am getting the
  same behaviour. I will get back to you later.
  
  Regards,
  --
Rzvan Crainea
OpenSIPS Developer
  
  On 11/04/2011 04:20 PM, Sebastien CRUAUX wrote:
  

I also tried to enter the rtpproxy_sock parameters and the set
IDs in the nh_sockets table and to load the rtpproxy sets from
the database but it did not work either :(

Sebastien

Le 04/11/2011 11:52, Sebastien CRUAUX a crit:

  
  Hi Razvan,
  
  Yes I think I declared the rtpproxy sets correctly, unless
  there is some new parameter in the new rtpproxy module that I
  forgot :
  
  # - rtpproxy params -
  modparam("rtpproxy", "rtpproxy_sock", "1 ==
  udp:localhost:12221")
  modparam("rtpproxy", "rtpproxy_sock", "2 ==
  udp:localhost:1")
  
  Regards,
  
  Sebastien
  
  Le 04/11/2011 11:44, Razvan Crainea a crit:
  

Hi Sebastien,

Are you sure that when you declare the RTPProxy sets you
allocate them the set identifiers (1 and 2)? Can you send us
the rtpproxy_sock parameters declaration?

Regards,
--
Rzvan Crainea
OpenSIPS Developer
    
On 11/04/2011 12:27 PM, Sebastien CRUAUX wrote:

  
  Hi,
  
  I am currently migrating my old Opensips 1.6.2 to the new
  Opensips 1.7.0 but I am facing some issues with the
  configuration of rtpproxy.
  The version of rtpproxy I am using is the commit
  6b82ff914543d21ff9ddbb797b40a77516348308.
  
  When I start Opensips, the two sets of rtpproxies I
  configured are detected :
  
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:12221 found, support
  for it enabled
  INFO:rtpproxy:rtpp_test:
  rtp proxy udp:localhost:1 found, support
  for it enabled
  
  However, when an INVITE is received by Opensips it seems
  rtpproxy is not found, consequently the SDP body is not
  rewritten :
  
  INFO
  :: (INVITE) rtpproxy set 1
  ERROR:rtpproxy:force_rtp_proxy_body:






  no available proxies
  
  More information about my configuration :
  - my Opensips/rtpproxy server has 2 IP addresses, one
  opened on the internet, one internal used to communicate
  with my VoIP/PSTN gateway
  - I have 2 sets of rtpproxies : the 1st one is in bridge
  mode for VoIP to PSTN or PSTN to VoIP calls, the 2nd one
  only listens on the external IP and is used for SIP to SIP
  calls
  
  
  ./rtpproxy -u seb -l 172.17.1.126 172.17.1.131 -s
  udp:localhost 12221 -m 18000 -M 18020
   ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost
  1 -m 18021 -M 18030

  - below is the part of my opensips.cfg file which
  handles the INVITE requests (I just replaced my public IP
  address with xx.xx.xx.xx) :
  
  

  if (is_method("INVITE")) {
   if (registered("location","$fu")
   registered("location")) { # if From
  and To are SIP registered : we use rtpproxy 2
  (external IP)
   setflag(22);
   xlog("INFO :: (INVITE)
  rtpproxy set 2");
   }
   else
  {
  # otherwise, SIP to ISUP or ISUP to SIP call : we use
  rtpproxy 1 (bridge mode)
   xlog("INFO :: (INVITE)
  rtpproxy set 1");
   }
   if (has_body("application/sdp")) {
   if (isflagset(22)) {
  
  set_rtp_proxy_set("2");
   if
  (rtpproxy_offer("","xx.xx.xx.xx")) {
  
  t_on_reply("1");
   }
   }
   else {
  

Re: [OpenSIPS-Users] Opensips relaying MESSAGE - source IP problem

2010-11-08 Thread Sebastien CRUAUX
Hi Jose,

This option is not set in my config but actually I managed to figure out 
things using the ie and ei flags in the 
rtpproxy_offer/rtpproxy_answer fonctions.
Thanks for your help !

Best Regards,

Sebastien



Le 08/11/2010 10:16, jose luis millan a écrit :
 Hi Sebastien,

 Is the 'mhomed' option set in your configuration file?

 regards.


 On Sun, Nov 7, 2010 at 2:53 PM, Sebastien CRUAUXscru...@halys.fr  wrote:
 I'm getting the same problem with RTP packets... Maybe some issue with
 rtpproxy bridging mode ?



 Le 05/11/2010 11:21, Vallimamod ABDULLAH a écrit :
 Hi,

 Have a look at force_send_socket 
 (http://www.opensips.org/Resources/DocsCoreFcn#toc103)

 Regards,
 - vma
 .

 On Nov 5, 2010, at 11:10 AM, Sebastien CRUAUX wrote:

 Hi,

 I'm encountering some issue with my Opensips configuration.
 My Opensips server is configured to relay SIP MESSAGE requests to
 another server when the destination URI is not located on my server.
 Here is the part of opensips.cfg which is concerned :

 if (!lookup(location,m)) {

 switch ($retcode) {
   case -1:
   case -3:
 rewritehost(10.254.230.148);
 if (is_method(MESSAGE)) {
   rewriteport(5062);
 }
 if (!t_relay()) {
   sl_reply_error();
 } exit;
   case -2:
 sl_send_reply(405, Method Not Allowed);
 exit;
 }
 }

 My server receives SIP requests on eth0 interface (IP 10.254.31.45) but
 when it relays the requests to the server 10.254.230.148 it should use
 eth2 IP (10.254.28.45) as src IP because there is a firewall between the
 two servers and port 5062 is only allowed for source IP 10.254.28.45.
 The problem is the following : when I open Wireshark on my Opensips
 server, I can see that the source IP for the relayed MESSAGE is still
 10.254.31.45 so it never reaches the other server ! I don't understand
 where is the issue, my Linux routing table is OK, when I'm trying to
 reach 10.254.230.148 from my Opensips server using telnet for example it
 uses the right interface and the right gateway. Here is my routing table :

 10.254.230.144 10.254.28.1 255.255.255.240 UG 0 0 0 eth2
 10.254.31.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 10.254.28.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
 10.254.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
 192.168.0.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 10.254.225.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 0.0.0.0 10.254.31.1 0.0.0.0 UG 0 0 0 eth0

 Did I miss something in Opensips configuration file ?
 Thanks a lot for your help.

 Best Regards,

 Sebastien



 ___
 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



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


Re: [OpenSIPS-Users] Opensips relaying MESSAGE - source IP problem

2010-11-07 Thread Sebastien CRUAUX
I'm getting the same problem with RTP packets... Maybe some issue with 
rtpproxy bridging mode ?



Le 05/11/2010 11:21, Vallimamod ABDULLAH a écrit :
 Hi,

 Have a look at force_send_socket 
 (http://www.opensips.org/Resources/DocsCoreFcn#toc103)

 Regards,
 - vma
 .

 On Nov 5, 2010, at 11:10 AM, Sebastien CRUAUX wrote:

 Hi,

 I'm encountering some issue with my Opensips configuration.
 My Opensips server is configured to relay SIP MESSAGE requests to
 another server when the destination URI is not located on my server.
 Here is the part of opensips.cfg which is concerned :

 if (!lookup(location,m)) {

switch ($retcode) {
  case -1:
  case -3:
rewritehost(10.254.230.148);
if (is_method(MESSAGE)) {
  rewriteport(5062);
}
if (!t_relay()) {
  sl_reply_error();
} exit;
  case -2:
sl_send_reply(405, Method Not Allowed);
exit;
}
 }

 My server receives SIP requests on eth0 interface (IP 10.254.31.45) but
 when it relays the requests to the server 10.254.230.148 it should use
 eth2 IP (10.254.28.45) as src IP because there is a firewall between the
 two servers and port 5062 is only allowed for source IP 10.254.28.45.
 The problem is the following : when I open Wireshark on my Opensips
 server, I can see that the source IP for the relayed MESSAGE is still
 10.254.31.45 so it never reaches the other server ! I don't understand
 where is the issue, my Linux routing table is OK, when I'm trying to
 reach 10.254.230.148 from my Opensips server using telnet for example it
 uses the right interface and the right gateway. Here is my routing table :

 10.254.230.144 10.254.28.1 255.255.255.240 UG 0 0 0 eth2
 10.254.31.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 10.254.28.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
 10.254.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
 192.168.0.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 10.254.225.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 0.0.0.0 10.254.31.1 0.0.0.0 UG 0 0 0 eth0

 Did I miss something in Opensips configuration file ?
 Thanks a lot for your help.

 Best Regards,

 Sebastien



 ___
 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] Opensips relaying MESSAGE - source IP problem

2010-11-05 Thread Sebastien CRUAUX
Hi,

I'm encountering some issue with my Opensips configuration.
My Opensips server is configured to relay SIP MESSAGE requests to 
another server when the destination URI is not located on my server. 
Here is the part of opensips.cfg which is concerned :

if (!lookup(location,m)) {

   switch ($retcode) {
 case -1:
 case -3:
   rewritehost(10.254.230.148);
   if (is_method(MESSAGE)) {
 rewriteport(5062);
   }
   if (!t_relay()) {
 sl_reply_error();
   } exit;
 case -2:
   sl_send_reply(405, Method Not Allowed);
   exit;
   }
}

My server receives SIP requests on eth0 interface (IP 10.254.31.45) but 
when it relays the requests to the server 10.254.230.148 it should use 
eth2 IP (10.254.28.45) as src IP because there is a firewall between the 
two servers and port 5062 is only allowed for source IP 10.254.28.45. 
The problem is the following : when I open Wireshark on my Opensips 
server, I can see that the source IP for the relayed MESSAGE is still 
10.254.31.45 so it never reaches the other server ! I don't understand 
where is the issue, my Linux routing table is OK, when I'm trying to 
reach 10.254.230.148 from my Opensips server using telnet for example it 
uses the right interface and the right gateway. Here is my routing table :

10.254.230.144 10.254.28.1 255.255.255.240 UG 0 0 0 eth2
10.254.31.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.254.28.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.254.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
192.168.0.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
10.254.225.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
0.0.0.0 10.254.31.1 0.0.0.0 UG 0 0 0 eth0

Did I miss something in Opensips configuration file ?
Thanks a lot for your help.

Best Regards,

Sebastien



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


Re: [OpenSIPS-Users] Opensips relaying MESSAGE - source IP problem

2010-11-05 Thread Sebastien CRUAUX
Hi,

It worked, thank you so much you saved my life !

Sebastien

Le 05/11/2010 11:21, Vallimamod ABDULLAH a écrit :
 Hi,

 Have a look at force_send_socket 
 (http://www.opensips.org/Resources/DocsCoreFcn#toc103)

 Regards,
 - vma
 .

 On Nov 5, 2010, at 11:10 AM, Sebastien CRUAUX wrote:

 Hi,

 I'm encountering some issue with my Opensips configuration.
 My Opensips server is configured to relay SIP MESSAGE requests to
 another server when the destination URI is not located on my server.
 Here is the part of opensips.cfg which is concerned :

 if (!lookup(location,m)) {

switch ($retcode) {
  case -1:
  case -3:
rewritehost(10.254.230.148);
if (is_method(MESSAGE)) {
  rewriteport(5062);
}
if (!t_relay()) {
  sl_reply_error();
} exit;
  case -2:
sl_send_reply(405, Method Not Allowed);
exit;
}
 }

 My server receives SIP requests on eth0 interface (IP 10.254.31.45) but
 when it relays the requests to the server 10.254.230.148 it should use
 eth2 IP (10.254.28.45) as src IP because there is a firewall between the
 two servers and port 5062 is only allowed for source IP 10.254.28.45.
 The problem is the following : when I open Wireshark on my Opensips
 server, I can see that the source IP for the relayed MESSAGE is still
 10.254.31.45 so it never reaches the other server ! I don't understand
 where is the issue, my Linux routing table is OK, when I'm trying to
 reach 10.254.230.148 from my Opensips server using telnet for example it
 uses the right interface and the right gateway. Here is my routing table :

 10.254.230.144 10.254.28.1 255.255.255.240 UG 0 0 0 eth2
 10.254.31.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 10.254.28.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
 10.254.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
 192.168.0.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 10.254.225.0 10.254.28.1 255.255.255.0 UG 0 0 0 eth2
 0.0.0.0 10.254.31.1 0.0.0.0 UG 0 0 0 eth0

 Did I miss something in Opensips configuration file ?
 Thanks a lot for your help.

 Best Regards,

 Sebastien



 ___
 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