[OpenSIPS-Users] get error with opensip-cp on centos 5

2010-09-13 Thread ha do
Hi all

i try to use the opensips-cp 4:
i login the the web page http://192.168.1.100/cp successfull 

the menu Admin + User are working properly
but the system menu does not work
i get the error on the webpage: 

sorry -- cannot open write fifo

and this is the error in debug message : 
Sep 14 00:10:42 localhost kernel: type=1400 audit(1284437442.630:49): avc:  
denied  { getattr } for  pid=2093 comm="httpd" path="/tmp/opensips_fifo" 
dev=dm-0 ino=884744 scontext=root:system_r:httpd_t:s0 
tcontext=root:object_r:tmp_t:s0 tclass=fifo_file


i did set fifo_mode, 0666 in opensips.cfg

please help,what should i do to resolve problem

Thank you
Ha`



  

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


[OpenSIPS-Users] problem with opensips startup on Centos 5

2010-09-13 Thread ha do
Hello all

i use Centos 5:
[r...@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 
i686 i686 i386 GNU/Linux

i am testing the opensips 1.6.2 and i installed successfully opensips

the step to get problem:
  1. Install opensips successfull
   2. copy file packaging/fedora/opensips.init to /etc/init.d/opensips
  3. chmod 755 /etc/init.d/opensips
   4. chkconfig --add /etc/init.d/opensips
   5. restart Server 
   6. check the opensips status:
[r...@localhost ~]# ps -ef | grep opensips
root  1539 1  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1543  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1544  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1545  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1546  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1547  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1548  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1574  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1575  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1576  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1577  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1578  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1579  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1599  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1600  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1601  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1602  1539  0 22:56 ?00:00:00 /usr/local/sbin/opensips
root  1650  1627  0 22:57 pts/000:00:00 grep opensips

7. i use the opensipsctl restart and got the problem :
[r...@localhost ~]# opensipsctl restart

INFO: Restarting OpenSIPS :

ERROR: No PID file found (/var/run/opensips.pid)! OpenSIPS probably not running

INFO: Starting OpenSIPS :

ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start failed


could someone help me, i want opensips startup along with Server and the 
opensipsctl command should work properly

Thank you
Ha`



  

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


[OpenSIPS-Users] One-way audio problem with Opensips and Mediaproxy

2010-09-13 Thread Maciej Bylica
Hello,

That is my first post here :)
I am playing around with NAT traversal and mediaproxy on opensips
1.6.3. (media-dispatcher 2.4.3, media-relay 2.4.3, python 2.6)
I've just encounterd a problem with my configuration that really worries me.

Here is my script:
# main request routing logic

route {

  # -
  # Sanity Check Section
  # -
  if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
exit;
  };

  if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
exit;
  };

  # -
  # Record Route Section
  # -
  if (method=="INVITE" && nat_uac_test("3")) {
record_route_preset("xx.yy.zz.vv:5060;nat=yes");
  } else if (method!="REGISTER") {
record_route();
  };

  # -
  # Call Tear Down Section
  # -
  if (method=="BYE" || method=="CANCEL") {
end_media_session();
  };

  # -
  # Loose Route Section
  # -
  if (loose_route()) {

if ((method=="INVITE" || method=="REFER") && !has_totag()) {
  sl_send_reply("403", "Forbidden");
  exit;
};

if (method=="INVITE") {

if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
exit;
  } else if (!db_check_from()) {
sl_send_reply("403", "Use From=ID");
exit;
  };

  consume_credentials();

  if (nat_uac_test("3") || search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
  };
};

route(1);
exit;
  };

  # -
  # Call Type Processing Section
  # -
  if (uri!=myself) {
route(4);
route(1);
exit;
  };

  if (method=="ACK") {
route(1);
exit;
  } else if (method=="CANCEL") {
route(1);
exit;
  } else if (method=="INVITE") {
route(3);
exit;
  } else  if (method=="REGISTER") {
route(2);
exit;
  };

  lookup("aliases");
  if (uri!=myself) {
route(4);
route(1);
exit;
  };

  if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
exit;
  };

  route(1);
}

route[1] {

  # -
  # Default Message Handler
  # -

  t_on_reply("1");

  if (!t_relay()) {

  if (method=="INVITE" || method=="ACK") {
  end_media_session();
};

sl_reply_error();
  };
}

route[2] {

  # -
  # REGISTER Message Handler
  # 

  sl_send_reply("100", "Trying");

  if (!search("^Contact:[ ]*\*") && nat_uac_test("31")) {
setflag(6);
fix_nated_register();
force_rport();
  };

  if (!www_authorize("","subscriber")) {
www_challenge("","0");
exit;
  };

  if (!db_check_to()) {
sl_send_reply("401", "Unauthorized");
exit;
  };

  consume_credentials();

  if (!save("location")) {
sl_reply_error();
  };
}

route[3] {

  # -
  # INVITE Message Handler
  # -

  if (nat_uac_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
  };

  if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
exit;
  } else if (!db_check_from()) {
sl_send_reply("403", "Use From=ID");
exit;
  };

  consume_credentials();

  lookup("aliases");
  if (uri!=myself) {
route(4);
route(1);
exit;
  };

  if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
exit;
  };

  route(4);
  route(1);
}

  route[4] {

  # -
  # NAT Traversal Section
  # -

  if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
  setflag(8);
  use_media_proxy();
};
  };
}

   onreply_route[1] {

  if ((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {

  if (!search("^Content-Length:[ ]*0")) {
  $avp(s:media_relay) = "xx.yy.zz.vv";
  use_media_proxy();
};
  };

if (nat_uac_test("1")) {
fix_nated_contact();
  };
}


Here is my call flow:
UA1(behindNAT)---Opensips,mediaproxy--Asterisk(publicip)UA2(behind
NAT)

If the call is originated from UA1 side, there is a both-ways audio.
The problem occur

Re: [OpenSIPS-Users] double reply by presence [and missing subscriptions]

2010-09-13 Thread Kennard_White

Hi Anca,

I picked up your commit and I'm testing now. Thanks for the very fast
response!

I'm tracing down another issue (see below if interested) and I'm looking
for the code that generates the to tag upon an initial subscription. I
cannot find it. Can anyone point me to it?

I'm getting messages:
Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]:
ERROR:presence:get_stored_info: record not found in hash_table
Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]:
ERROR:presence:handle_subscribe: getting stored info

And also:
Sep 13 11:02:30 sdc01sip01 /var/run/openser/opensips-pres[13748]:
ERROR:db_mysql:db_mysql_do_prepared_query: driver error: Duplicate entry
'X-NzExMWUzODdmZDc1YTFiNTFlNGU3ZWQ' for key
'active_watchers_idx'

I think the two might be related, and I want to understand how to to-tag is
generated since it is a key to both the db and hash look ups.

Thanks,
Kennard



From:   kennard_wh...@logitech.com
To: OpenSIPS users mailling list 
Date:   09/10/2010 09:44 AM
Subject:[OpenSIPS-Users] double reply by presence
Sent by:users-boun...@lists.opensips.org



Hi,

Running opensips HEAD code, it seems that in at least one case the presence
PUBLISH handling code attempts to generate two replies. Please see log
trace below.

In this particular case, I think presence_xml needs to return some flag to
let the core presence module know that it has already replied. Or perhaps
the core presence code could query sig/tm to see if a reply has already
been sent.

I'm happy to make the changes and submit patch if that is helpful, but
please let me know which direction I should take so that the patch will be
accepted.

One other minor request: would be helpful if the "bad body format" message
could also log the from address (or perhaps the callid -- something to make
to traceable).

Thanks,
Kennard


Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence_xml:xml_publ_handl: bad body format
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:handle_publish: in event specific publish handling
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:tm:_reply_light: failed to generate 500 reply when a final 415 was
sent out
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:signaling:sig_send_reply_mod: failed to send reply with tm module
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:send_error_reply: sending 500 Server Internal Error reply
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:handle_publish: failed to send error reply
___
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] double reply by presence

2010-09-13 Thread Anca Vamanu

Hi Kennard,

You are right - this is the only place when presence_xml also sends a 
reply. I will fix this now.


Thanks and regards,
Anca

On 09/10/2010 07:44 PM, kennard_wh...@logitech.com wrote:


Hi,

Running opensips HEAD code, it seems that in at least one case the 
presence PUBLISH handling code attempts to generate two replies. 
Please see log trace below.


In this particular case, I think presence_xml needs to return some 
flag to let the core presence module know that it has already replied. 
Or perhaps the core presence code could query sig/tm to see if a reply 
has already been sent.


I'm happy to make the changes and submit patch if that is helpful, but 
please let me know which direction I should take so that the patch 
will be accepted.


One other minor request: would be helpful if the "bad body format" 
message could also log the from address (or perhaps the callid -- 
something to make to traceable).


Thanks,
Kennard


Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:presence_xml:xml_publ_handl: bad body format
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:presence:handle_publish: in event specific publish handling
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:tm:_reply_light: failed to generate 500 reply when a final 415 
was sent out
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:signaling:sig_send_reply_mod: failed to send reply with tm module
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:presence:send_error_reply: sending 500 Server Internal Error reply
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
ERROR:presence:handle_publish: failed to send error reply



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



--
Anca Vamanu
www.voice-system.ro

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


Re: [OpenSIPS-Users] HTTP to SIP

2010-09-13 Thread Yuriy Nasida

Hello Remi

 

There is another way to solve your task - to not use opensips =).

Instead of use  "web server---> sip registrar (opensips)", you can use 
G-Boss\Glasfish with container java SIP servlets. 
This solution combines web and SIP server. Java implements all the necessary 
logic for message passing

Regards,
Nasida Yuriy


 


Date: Tue, 7 Sep 2010 17:53:19 +0200
From: mimi...@gmail.com
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] HTTP to SIP

Hi,

Thank you, this works fine, I am able to send messages from the web server and 
receive them in 
my SIP clients. However I have the following problem:

the xmlrpc request block until either the SIP message is sent to the client, or 
the request timeout
if the client is not reachable (and the sip server tried to re-send the sip 
request several time).

Is there a way to tell opensips to acknowledge the xmlrpc request immediatly 
and then to send
(and then resend if needed) the sip request to the client ?

Regards,

On Tue, Aug 3, 2010 at 12:01 AM, Bogdan-Andrei Iancu  
wrote:


Hi Remi,

the simplest way is to build a CGI do deal with the http part - this CGI
can simply invoke via XMLRPC the t_uac_dlg command from opensips, tm
module (see
http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id272728) - with
this command you can make opensips to generate a SIP request.

For how to use this IM command, see the example file locate under
examples/web_im/send_im.php in SVN/tarball

So basic schema:
   browser ---> HTTP ---> WEB server (CGI) >XMLRPC > OpenSIPs
>SIP  > MESSAGE


Regards,
Bogdan

remi humbert wrote:

> Hi Bogdan,
>
> I want to talk to Sip clients from a web browser.
> Eg do:
>
> POST /t...@domain.com  HTTP1.1
> host:www.somewebserver.com 
> hello how are u ?
>
> And then in the sip client t...@domain.com 
> receive
> SIP MESSAGE "hello how are u"  from b...@domain.com 

>
> To do that, I can use CGI in my web server to host the "bot" sip clients
> which will take the http message and relay it as a SIP message.
>
> web browser  ---> web server (also host "bot" sip client) ---> sip
> registrar ---> sip client (t...@domain.com )

>
> Or I could make http request directly to opensips:
>
> web browser  ---> sip registrar ---> sip client (t...@domain.com
> )

>
> Perhaps it's a bad idea to try to talk http to the registrar. I just
> stumbled upon this
> http://www.iptel.org/rpc_xml_rpc, and I was wondering if I could do
> the same with opensips,
> since I am using opensips...
>
> On Sun, Aug 1, 2010 at 6:22 PM, Bogdan-Andrei Iancu



> mailto:bog...@voice-system.ro>> wrote:
>
> Hello Remi,
>
> If you want to receive and process an HTTP request, why do you want to
> do it with a SIP server (opensips) and not with a HTTP server ? I
> think
> will be more suitable to you some CGI with APACHE for example, instead
> of misusing opensips for that.
>
> If you can explain me better what the HTTP request is good for, I can
> give you some advices on how to do itif it has some SIP
> implications
>
> Regards,
> Bogdan
>
> remi humbert wrote:
> > Hi,
> >
> > I want to be able to make http REST request to some http server, and
> > transform
> > these requests into SIP MESSAGE requests.
> >
> > I made a prototype that works using several sip clients embedded
> into
> > an http server. This kinda works.
> > I would like to suppress the http server, and make request
> directly to
> > the OpenSIPS registrar.
> >
> > I found out about the mi_xmlrpc module, which makes opensips
> > understand http, but I cannot
> > find out how to get the http requests in the opensips.cfg file.
> > In kamalio they seems to have some /modparam/("/xmlrpc/", "/route/",
> > "XMLRPC");)
> > which allows to declare a route in the config file to get the http
> > request.
> > I could not find the equivalent in mi_xmlrpc.
> >
> > So first question, does this exists in opensips, how can I get the
> > http requests ?
> > Second, do you think it is a good idea to do this way ? Have you got
> > another idea ?
> >
> > Regards,
> >
> > --
> > Remi
> >
> >
> 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 

> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro 
>
>
> ___
> Users mailing list
> Users@lists.opensips.org 

[OpenSIPS-Users] Mediaproxy: media relay selection algorithm improvements

2010-09-13 Thread John Khvatov
Hello all!

We are working on building geo-distributed VoIP solution with
Mediaproxy.

I think, that the current media relay selection algorithm is not perfect
and can be improved. In the current implementation we set IP address of
a particular media relay that will be preferred by dispatcher. But what
if the particular media relay will be unavailable? Media dispatcher will
run normal selection algorithm and does not select neighbor of the
particular media relay.

I propose to implement the groups of media relays. Each media-relay can
be registered on dispatcher with name and group. In the OpenSIPS config
we can specify preferred media relay/relays by name or group.

Consider the example. Several our relays in Frankfurt registered on
dispatchers with group=frankfurt, in Moscow -- with group=moscow. When
we set “$avp(s:media_relay_group) to "moscow", dispatcher will
select one of media_relay hosted in Moscow. Also, we can simply add/remove
media_relays in run-time.

What do you think about this idea? Is it difficult to implement?

-- 
WBR, John Khvatov

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


[OpenSIPS-Users] lookup() problem

2010-09-13 Thread Антон Загорский
Hi!

I'm using subdomains. But lookup("location", "m") substitutes ip instead of
domain's name.
Here is log:
DBG:dialplan:translate: the rule's attrs are internal
DBG:dialplan:translate: the copied attributes are: internal
DBG:dialplan:rule_translate: null replacement
DBG:dialplan:dp_translate_f: input sip:3...@org1.mydomain.com with dpid 0 =>
output
DBG:core:comp_scriptvar: str 20 : internal
last message repeated 5 times
DBG:registrar:lookup: setting as ruri 
DBG:registrar:lookup: looking for branches
 
Why?
 




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


[OpenSIPS-Users] new "disable_503_translation" parameter

2010-09-13 Thread Alex Massover
Hi,

Maybe I missed that lesson, but I'm curious what is the idea behind implicit 
translation of responses (503-->500)?
Can somebody explain me please?

--
Best Regards,
Alex Massover
Telephony Group Manager
R&D Department
Jajah Inc.


This mail was sent via Mail-SeCure System.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] [OpenSIPS LiveDVD]Register OK but call failed:prompt "420 invalid destination"

2010-09-13 Thread Zhijun ZOU
Hi,
  How are you.
SoftPhone can not make call for [OpenSIPS LiveDVD],the Opensips prompt:420 
invalid destination.
The detailed infomation:
1.SoftPhone1(user1):8...@10.68.4.101 register successfully
2.SoftPhone2(user2):8...@10.68.4.101 register successfully
3.8001 call 8002,but call failed,the prompt is :420 invalid destination

The environment:
1.OpenSips IP:10.68.4.101
2.SoftPhone1 and SoftPhone2 IP:10.68.6.54(port is different)
3.IP:10.68.4.101 can access IP:10.68.6.54
4.DialPlan:
5.Domain:10.68.4.101

Whether need to config Dynamic Routing?but i do not know how to config.

Thank you very much


#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractère privé. S'ils ne vous sont
pas destinés, nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque manière que ce
soit le contenu. Si ce message vous a été transmis par erreur, merci d'en
informer l'expéditeur et de supprimer immédiatement de votre système
informatique ce courriel ainsi que tous les documents qui y sont attachés."


   **

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#

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


Re: [OpenSIPS-Users] avp_db_query doesn't save value

2010-09-13 Thread Victor Gamov

On 10.09.2010 13:21, Антон Загорский wrote:

Hi!

I'm using a column 'fwdcall' (CHAR (64)) in the table subscriber. But there
is a problem with avp_db_query:

avp_db_query("SELECT fwdcall FROM subscriber WHERE username='$fU' AND
domain='$fd'", "$avp(i:100)");
xlog("*** Blink Call Forwarding to $avp(i:100)\n");


type mismatch?

CHAR(64) at DB but integer type for $avp(i:100)
try to use $avp(s:fwd)

--
CU,
Victor Gamov
<>___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users