Re: [OpenSIPS-Users] My mediaproxy and callcontrol do not output any log on Debian.

2014-02-07 Thread Saúl Ibarra Corretgé

On Feb 7, 2014, at 3:06 AM, hutx wrote:

 Hi All,
 
 I do not know how to make my mediaproxy and callcontrol output log. I use 
 Debian3.2.0. 
 

The default log level for MediaProxy is debug, so you should see it starting. 
Don't you see any entries on syslog? What happens if you run the binaries 
(media-dispatcher and media-relay) manually?

--
Saúl Ibarra Corretgé
AG Projects




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


Re: [OpenSIPS-Users] Crash of Opensips

2014-02-07 Thread Bogdan-Andrei Iancu
Perfect Sean ! The crash was also fixed in OpenSIPS by Liviu - even if 
config is wrong, it should not crash at all !


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.02.2014 03:03, hutx wrote:

Hi,

Yes, I modified my configuration accordingly. This problem disappears. Thank 
you so much for your great help.

Sean





On Thursday, February 6, 2014 10:09 AM, Bogdan-Andrei Iancu 
bog...@opensips.org wrote:
Hello,

Based on the BT, I guess you are using the acc_db_request() function
from the local_route, right ? If so, have you defined a db_url for the
acc module ? I see the table param is NULL  and this may happen only
if you do not set the db_url for the module.

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06.02.2014 15:26, hutx wrote:

Hi All,

I am playing with opensips + call control + cdrtool. When I set 
MaximumSession=60 and the opensips tries to hang up two call legs upon timeout, 
opensips experiences crash. The bt of core file is below.
Any help and opinion are appreciated.


Best Regards,
Sean


/bt of Core file/

Program terminated with signal 11, Segmentation fault.
#0  0xb6b7bc96 in w_acc_db_request (rq=0xb7156740, comment=0xb7185360, 
table=0x0) at acc_logic.c:213
213 int table_len = strlen(table);
(gdb) bt
#0  0xb6b7bc96 in w_acc_db_request (rq=0xb7156740, comment=0xb7185360, 
table=0x0) at acc_logic.c:213
#1  0x0805f5b5 in do_action (a=0xb7182718, msg=0xb7156740) at action.c:1715
#2  0x08064ea4 in run_action_list (a=0xb7182718, msg=0xb7156740) at action.c:171
#3  0x08062851 in do_action (a=0xb7182784, msg=0xb7156740) at action.c:1010
#4  0x08064891 in run_action_list (a=Unhandled dwarf expression opcode 0xf3
) at action.c:171
#5  run_actions (a=Unhandled dwarf expression opcode 0xf3
) at action.c:136
#6  0x08065276 in run_actions (a=0xb7182784, msg=0xb7156740) at action.c:129
#7  run_top_route (a=0xb7182784, msg=0xb7156740) at action.c:211
#8  0xb713672c in t_uac (method=0xbfc942d8, headers=0xbfc942d0, body=0x0, 
dialog=0xb7195c64, cb=0xb6adf606 bye_reply_cb, cbp=0xb2bd6e94, release_func=0)
   at uac.c:313
#9  0xb7137dd3 in req_within (method=0xbfc942d8, headers=0xbfc942d0, body=0x0, 
dialog=0xb7195c64, completion_cb=0xb6adf606 bye_reply_cb, cbp=0xb2bd6e94,
   release_func=0) at uac.c:476
#10 0xb6ae081b in send_leg_bye (dlg=0xb2bd6e94, extra_hdrs=0x0) at 
dlg_req_within.c:352
#11 dlg_end_dlg (dlg=0xb2bd6e94, extra_hdrs=0x0) at dlg_req_within.c:418
#12 0xb6ae1b05 in mi_terminate_dlg (cmd_tree=0xb7195bac, param=0x0) at 
dlg_req_within.c:475
#13 0xb6a6ea75 in run_mi_cmd (rx_sock=8, tx_sock=9) at ../../mi/mi.h:109
#14 mi_datagram_server (rx_sock=8, tx_sock=9) at datagram_fnc.c:520
#15 0xb6a6fda4 in datagram_process (rank=0) at mi_datagram.c:311
#16 0x080e41d8 in start_module_procs () at sr_module.c:586
#17 0x0805b6e0 in main_loop (argc=13, argv=0xbfc946a4) at main.c:840
#18 main (argc=13, argv=0xbfc946a4) at main.c:1598
(gdb)
///


___
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] use branches with uac_replace_from?

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

If you plan to change the FROM in different ways for each branch, you 
need to do the change in a branch_route and not in the request route - 
whatever changes you do in request route will be propagate in all 
branches. The changes you do in branch route will be vizible only in 
that branch. See:

http://www.opensips.org/Documentation/Script-Routes-1-10#toc2

So, in your script store the new FROM into an AVP variable and arm the 
branch route - in that branch, if AVP is set, use it as input for 
uac_replace_from().


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 27.01.2014 14:05, Edwin Haselhoff wrote:

Hello Everyone,

I want to use 'uac_replace_from' multiple times in my script (to use 
for a failover situation). This is a simple example of what I want to do:


route[1]
{
if (method==INVITE)
{
record_route();

 uac_replace_from(,sip:anonymous@anonymous.invalid);
append_hf(Remote-Party-ID: 
sip:anonymous@anonymous.invalid;party=calling;screen=yes;privacy=full\r\n);
append_hf(P-Asserted-Identity: 
sip:anonymous@anonymous.invalid\r\n);

append_hf(Privacy: id\r\n);

t_on_failure(1);
t_relay();
}
}

route[2]
{
if (method==INVITE)
{
record_route();

uac_replace_from(,sip:a...@xx.xxx.xx);
append_hf(Remote-Party-ID: 
sip:a...@xx.xxx.xx;party=calling;screen=no;privacy=off\r\n);

append_hf(P-Asserted-Identity: sip:a...@xx.xxx.xx\r\n);

t_on_failure(1);
t_relay();

exit;
}
}

failure_route[1]
{
route(2);
}

Reading the docs and forums I tried to use branches but I think I 
don't understand the explanation / examples of the branches well 
enough :)


Can anyone explain / give me a hint how to change my script so I can 
drop the first 'uac_replace_from' and 'append_hf'?


___
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] Fwd: Account expiration notification

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

There is no such mechanism - as said, subscribing to a user's presentity 
(and the whole presence stuff) is completely independent from the 
registration mechanism. There is no need to register in order to have 
presence working.


The subscriptions are time based (they have an expire, exactly like 
registration), so , even if the UA crashed, the subscription will 
timeout after some time (exactly like the registration, but independent 
and maybe with different timeout value). So, the crashed UA will go 
offline at some point (because of the subscribe expire) - there is no 
need for a parallel mechanism (the registration expire).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.02.2014 09:12, Bogdan Chifor wrote:

Yes, this is correct.

I would like to know if there is a mechanism to notify all the 
subscribed users when an account expires.


Thank you,
Chifor Bogdan


On Thu, Feb 6, 2014 at 10:15 AM, Bogdan-Andrei Iancu 
bog...@opensips.org mailto:bog...@opensips.org wrote:


Hello,

You are mentioning 2 different things here : (1) presence for
notifications and (2) registration status of the user.

Presence and registration are not related at all (unless using the
pua_usrloc module).

The closest I can understand is: you have presence between UAs and
one UA crashes - the other UAs are still seeing it online (and
not offline) - is this correct ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 30.01.2014 14:52, Bogdan Chifor wrote:

Hello,

I have a presence enabled Opensips server and am facing the
following issue.

My SIP client sometimes stops in an unfriendly manner (crashes
etc..) and the account remains active on the registrar side
(until the registration period expires, of course).

I would like to notify all the users which are subscribed to this
user when the account expired.

Any help would be appreciated.

Thank you,
Bogdan Chifor.


___
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


[OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-07 Thread Adrien Martin
Hello,

In the registrar module I set the max_contacts parameter.
Save function work as expected, but I did not manage to log the 503
status when max contacts is reached.

It seems configuration after save function is not used by Opensips in
this case.

Is this an expected behavior and could I log the 503 in this way or
another ?

PS: I found an appropriate log at INFO level, but at the moment I would
rather keep NOTICE level. Indeed I could use INFO level if there is no
other way to check save function's return.
PS2: Opensips version is 1.8.0.

Regards,

Adrien Martin





signature.asc
Description: OpenPGP digital signature
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Manipulating Contact header in locally generated 200 OK for a REGISTER

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

The SIP RFC3261 says that only the registered URI contact (along with 
the URI params) are to be stored by the registrar server. The header 
params are not to be stored.
So, should I understand the that GSMA specs may conflict with the SIP 
specs ???


BTW, do you have an example of such a Contact hdr ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 24.01.2014 08:00, Java Jalwa wrote:
Hello experts, I am using the registrar module and the save() function 
automatically sends a 200 OK for the REGISTER. However the Contact 
header built by the registrar module removes all the feature tags such 
as +g.oma.sip-im, +sip.instance etc. To be spec compliant with certain 
GSMA specs I need to keep these feature tags / parameters in the 
Contact header of 200 response, while at the same time want the 
registrar module to add expires and received= params.
append_to_reply() is not something that is useful for achieving this 
since it adds a new header. Is there anyway to achieve this without 
having to hack the registrar module ?


Using the r flag in save method, would force the registrar module to 
not send a reply, however if I use sl_send_reply(200, OK) after 
calling save(location,fr); the 200 OK does not contain the Contact 
header at all.


Any suggestions as to how I can achieve this ?

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] Initializing SIP messages from routing

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

No sure what CRBT stands for, but it looks to me that you need to use 
B2B module - what you are trying to do is something more than simply 
proxying a call.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.02.2014 19:00, H Yavari wrote:

Hi Bogdan,
thanks for your answer. I want to implement CRBT. For this I want when 
the invite received,I send an invite to media server and play something.
I can do this with B2BUA? I write a module for this or do with script? 
script running has side effect on performance when load is high?


Regards,
H.Yavari



Hello,

Typically you process in OpenSIPS script an incoming request (and you 
fwd or reply it). It is unusual to generate a new request while 
processing another one.


May I ask about your scenario ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com  http://www.opensips-solutions.com/
On 28.01.2014 10:02, H Yavari wrote:

Hi to all openSIPSer,
I want to initialize a sip message from routing, is it possible?
If only way that do this is writing script, is this efficient when 
load on openSIPS is high?

If answer is yes, can you give me some example to how do this?

Regards,
H.Yavari


___
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


Re: [OpenSIPS-Users] Registrar - max_contacts and 503 logging

2014-02-07 Thread Bogdan-Andrei Iancu

Hello,

Not sure a bug or an undocumented feature, but save() function, in case 
of internal error, is stopping the script.


Assuming we change that (to continue the script execution), you will 
failure from save() without actually knowing the error itself. I 
assume you are looking the error code/reason, right ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.02.2014 17:38, Adrien Martin wrote:

Hello,

In the registrar module I set the max_contacts parameter.
Save function work as expected, but I did not manage to log the 503
status when max contacts is reached.

It seems configuration after save function is not used by Opensips in
this case.

Is this an expected behavior and could I log the 503 in this way or
another ?

PS: I found an appropriate log at INFO level, but at the moment I would
rather keep NOTICE level. Indeed I could use INFO level if there is no
other way to check save function's return.
PS2: Opensips version is 1.8.0.

Regards,

Adrien Martin





___
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] topology hiding

2014-02-07 Thread BJ Quinn
The traffic goes from the server making the call to the opensips proxy to the 
carrier. The /304 doesn't exist in the original invite from the server that 
makes the call. Do you want to see the packets from the calling server to the 
opensips box to the carrier? 

But most importantly, I'm still having trouble getting topology hiding to work. 
I made the change you suggested, but it appears that opensips is throwing away 
all responses it's receiving from the carrier, which means that opensips thinks 
the call never got set up and the invite was never accepted, and then it 
eventually responds 408 to the original calling server. In fact the invite WAS 
accepted, and the carrier sent back a 200 ok, but opensips threw it away and 
never acknowledged it. The outgoing invite from the opensips server looks 
correct -- opensips has modified the route and contact headers to its own IP, 
but obviously it doesn't know what to do with the responses that are coming 
back to it. 

The /304 issue is odd and could be causing us issues with certain carriers, but 
right now I'd like to get topology hiding working with even ONE carrier, and I 
can't do that yet. All I did was add the section you showed in your response -- 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 

... as a replacement to ... 

if (loose_route()) { 

And I added -- 

if (is_method(INVITE)) { 

topology_hiding(); 
} 

... right after -- 

# account only INVITEs 
if (is_method(INVITE)) { 

setflag(ACC_DO); # do accounting 
} 


All this is from the stock config file, with only my listen IPs and a couple 
aliases added, and obviously the dialog module loaded as well to allow for 
topology hiding. 

Thanks! 

-BJ 

- Original Message -

From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Wednesday, February 5, 2014 6:19:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

The sequential processing part is a little bit wrong - you should have 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 


Can you please also post a trace of the traffic flow when the Route 
header gets that bogus \304 header ? Trying to replicate this on my side 
and see what's wrong. 

Best Regards, 

Vlad Paiu 
OpenSIPS Developer 
http://www.opensips-solutions.com 

On 03.02.2014 20:36, BJ Quinn wrote: 
 Oh and the only manual manipulation of the route headers was an attempt to 
 get rid of that \304 in the header. 
 
 I think the \304 thing may be a red herring for now. I still can't get the 
 topology hiding to work. Below is my config file. It's literally the default 
 config file with nothing changed but I've put in my IP address on the listen 
 line, added a couple of aliases, added UAC module to try to change the from 
 header (that works) and the dialog module and a couple of modifications to 
 the route to make topology hiding work (not working for me). 
 
 Am I putting this in the wrong part of the route? 
 
 Thx 
 
 -BJ Quinn 
 
 --- 
 debug=3 
 log_stderror=no 
 log_facility=LOG_LOCAL0 
 
 fork=yes 
 children=4 
 
 auto_aliases=no 
 
 listen=udp:xx.xx.xx.9:5060 
 
 disable_tcp=yes 
 
 disable_tls=yes 
 
 alias=xx.xx.xx.76:5060 
 alias=xx.xx.xx.77:5060 
 
 mpath=/usr/lib64/opensips/modules 
 
 loadmodule signaling.so 
 
 loadmodule sl.so 
 
 loadmodule tm.so 
 modparam(tm, fr_timer, 5) 
 modparam(tm, fr_inv_timer, 30) 
 modparam(tm, restart_fr_on_each_reply, 0) 
 modparam(tm, onreply_avp_mode, 1) 
 
 loadmodule rr.so 
 modparam(rr, append_fromtag, 0) 
 
 loadmodule maxfwd.so 
 
 loadmodule sipmsgops.so 
 
 loadmodule mi_fifo.so 
 modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) 
 modparam(mi_fifo, fifo_mode, 0666) 
 
 loadmodule uri.so 
 modparam(uri, use_uri_table, 0) 
 
 loadmodule usrloc.so 
 modparam(usrloc, nat_bflag, NAT) 
 modparam(usrloc, db_mode, 0) 
 
 loadmodule registrar.so 
 modparam(registrar, tcp_persistent_flag, TCP_PERSISTENT) 
 
 loadmodule acc.so 
 modparam(acc, early_media, 0) 
 modparam(acc, report_cancels, 0) 
 modparam(acc, detect_direction, 0) 
 modparam(acc, failed_transaction_flag, ACC_FAILED) 
 modparam(acc, log_flag, ACC_DO) 
 modparam(acc, log_missed_flag, ACC_MISSED) 
 
 # added to rewrite from header 
 loadmodule uac.so 
 loadmodule uac_auth.so 
 modparam(uac,restore_mode,manual) 
 
 #added for topology hiding 
 loadmodule dialog.so 
 
 route{ 
 if (!mf_process_maxfwd_header(10)) { 
 sl_send_reply(483,Too Many Hops); 
 exit; 
 } 
 
 if (has_totag()) { 
 if (loose_route()) { 
 # added for topology hiding 
 if ($DLG_status==NULL  !match_dialog() ) { 
 xlog( cannot match request to a dialog \n); 
 } 
 #/added for topology hiding 
 
 if (is_method(BYE)) { 
 setflag(ACC_DO); 
 setflag(ACC_FAILED); 
 } else if (is_method(INVITE)) { 
 record_route(); 
 }