Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread Saúl Ibarra Corretgé

On 29/3/11 6:21 AM, n...@uni-petrol.com wrote:

Yes, ip_tables loaded:

ip_tables 57440 3 iptable_nat,iptable_mangle,iptable_filter

But media-relay exception still present on every calls.



Was it loaded before or after starting the media-relay?


Is it possible that error because of python 2.4?



Not precisely that, but you'll get a bunch of other errors because of this.

Unfortunately I can't test/reproduce this. Anyway, you better upgrade to 
Python 2.6.



Regards,

--
Saúl Ibarra Corretgé
AG Projects

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


Re: [OpenSIPS-Users] dialog db_mode

2011-03-29 Thread Vlad Paiu

Hello Brett,

The only db_mode that doesn't write to DB at shutdown is 0 ( NO_DB ).
For all the other db_modes, dialog info is flushed to DB at shutdown.

Regards,

--
Vlad Paiu
OpenSIPS Developer


/
/
On 03/29/2011 07:25 AM, Brett Nemeroff wrote:

All,
on dialog db_mode 2 - DELAYED, does it *also* write at shutdown? Or 
*only* on timer events?


Thanks,
Brett


/
/


___
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] db_mysql segfault

2011-03-29 Thread Vlad Paiu

Hello Mark,

If you still have the core dump, could you please do
gdb /path_to_opensips_binary path_to_core_file

/and reply with the output of
bt full

Thanks.


Regards,

--
Vlad Paiu
OpenSIPS Developer



On 03/29/2011 02:44 AM, Mark Carbonaro wrote:

Hi,

I have an issue when when starting opensips where it immediately 
segfaults in db_mysql.so.  This happens with in Centos 5.5 (plus all 
patches) when running VirtualBox and on a Rackspace cloud server, but 
works fine on an Amazon EC2 server setup in the same way (same config 
file, patches, package versions etc), which I find a little odd.


I was originally running off the opensips-1.6.4-2-tls_src.tar.gz tar 
ball, but due to this issue I thought I would change to the latest 
revision of the 1.6 branch in subversion, but the problem remained.


I build using the following command "make include_modules="db_mysql" 
all".


This config is setup just as a load balancer and does work on one 
server, just segfaults on others.


Please let me know if you need any more information.

Any help would be greatly appreciated

Regards,
Mark

Here is the output from syslog when opensips starts with debug=3:
Mar 28 23:33:18 server opensips: INFO:core:init_tcp: using epoll_lt as 
the TCP io watch method (auto detected)
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
NOTICE:core:main: version: opensips 1.6.4-2-notls (x86_64/linux)
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:core:main: using 32 Mb shared memory
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:core:main: using 1 Mb private memory per process
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
NOTICE:signaling:mod_init: initializing module ...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:sl:mod_init: Initializing StateLess engine
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:tm:mod_init: TM - initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:rr:mod_init: rr - initializing
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:maxfwd:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:usrloc:ul_init_locks: locks array size 512
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:registrar:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:textops:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:acc:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:dialog:mod_init: Dialog module - initializing
Mar 28 23:33:18 server kernel: [38083.726989] opensips[27923]: 
segfault at 0 ip 7f0c1167ee57 sp 7fffd03f7050 error 4 in 
db_mysql.so[7f0c11676000+e000]


And just in case it helps with debug=6 (just the last part):
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_connect: opening 
connection: mysql://:@localhost/opensips
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_connect: connection type 
is Localhost via UNIX socket
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_connect: protocol 
version is 10
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_connect: server version 
is 5.1.56
Mar 28 23:35:39 [27944] DBG:core:db_do_init: connection 0x796340 
inserted in pool as 0x796430
Mar 28 23:35:39 [27944] DBG:core:db_new_result: allocate 48 bytes for 
result set at 0x796490
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: 1 columns 
returned from the query
Mar 28 23:35:39 [27944] DBG:core:db_allocate_columns: allocate 28 
bytes for result columns at 0x7964d8
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: 
RES_NAMES(0x7964e0)[0]=[table_version]
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: use DB_INT 
result type
Mar 28 23:35:39 [27944] DBG:core:db_allocate_rows: allocate 48 bytes 
for result rows and values at 0x796510

Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_str2val: converting INT [4]
Mar 28 23:35:39 [27944] DBG:core:db_free_columns: freeing result 
columns at 0x7964d8

Mar 28 23:35:39 [27944] DBG:core:db_free_rows: freeing 1 rows
Mar 28 23:35:39 [27944] DBG:core:db_free_row: freeing row values at 
0x796520

Mar 28 23:35:39 [27944] DBG:core:db_free_rows: freeing rows at 0x796510
Mar 28 23:35:39 [27944] DBG:core:db_free_result: freeing result set at 
0x796490
Mar 28 23:35:39 [27944] DBG:core:db_new_result: allocate 48 bytes for 
result set at 0x796490
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: 21 columns 
returned from the query
Mar 28 23:35:39 [27944] DBG:core:db_allocate_columns: allocate 588 
bytes for result columns at 0x79e448
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: 
RES_NAMES(0x79e4f0)[0]=[hash_entry]
Mar 28 23:35:39 [27944] DBG:db_mysql:db_mysql_get_columns: use DB_INT 
result type

Segmentation fault (core dumped)


Finally here is my config down to the route section, this is the same 
config that works on the EC2 server.

debug=3
log_stderror=no
log_faci

Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread nick



Because of media-relay running in openvz virtual container it inherit
kernel modules like ip_table, ip_conntrack, nfnetlink from host node, 
so

yesm ip_tables module like others loade before media-relay start.
Below is a list of running modules.

Unfortunately it is very hard to migrate to python > 2.4, because 
CentOS < 6.0

don't support other versions and hard depend on python 2.4.

Now I'm trying install Scientific Linux 6.0 in openvz virtual 
environment

to test python 2.6.

I have a question regarding which python version are recommended to run
media-proxy (python 2.6, 2.7, 3.2) ?

Full list of loaded modules:
# lsmod
Module  Size  Used by
vzethdev   47392  0
vznetdev   57488  3
simfs  39576  3
exportfs   39040  1 simfs
vzrst 203536  0
vzcpt 155832  0
nfs   299480  2 vzrst,vzcpt
lockd 105872  2 vzrst,nfs
nfs_acl36608  1 nfs
vzmon  84248  6 vznetdev,vzrst,vzcpt
ip6t_REJECT38660  0
ip6table_mangle38016  3
ip6table_filter37760  3
ip6_tables 50880  2 ip6table_mangle,ip6table_filter
xt_tcpudp  36224  0
ipt_LOG39808  0
ipt_TOS35200  0
ipt_REDIRECT   34944  0
ip_nat_irc 36352  0
ip_nat_ftp 37376  2
xt_helper  35584  0
xt_state   35200  0
xt_conntrack   36352  0
ip_conntrack_irc   41168  2
ip_conntrack_ftp   42192  2
iptable_nat43276  6
ip_nat 53392  5 
vzrst,ipt_REDIRECT,ip_nat_irc,ip_nat_ftp,iptable_nat
ip_conntrack  101524  14 
vzrst,vzcpt,ip_nat_irc,ip_nat_ftp,xt_helper,xt_state,xt_conntrack,ip_conntrack_irc,ip_conntrack_ftp,iptable_nat,ip_nat

nfnetlink  40392  3 ip_nat,ip_conntrack
xt_length  34944  0
ipt_ttl34816  0
xt_tcpmss  35328  0
ipt_TCPMSS 37248  0
iptable_mangle 37888  3
iptable_filter 37760  3
xt_multiport   36224  0
xt_limit   36352  0
ipt_tos34560  0
ipt_REJECT 39684  0
ip_tables  57440  3 
iptable_nat,iptable_mangle,iptable_filter
x_tables   52744  19 
ip6t_REJECT,ip6_tables,xt_tcpudp,ipt_LOG,ipt_TOS,ipt_REDIRECT,xt_helper,xt_state,xt_conntrack,iptable_nat,xt_length,ipt_ttl,xt_tcpmss,ipt_TCPMSS,xt_multiport,xt_limit,ipt_tos,ipt_REJECT,ip_tables

vzdquota   79864  4 simfs,[permanent]
vzevent37136  1
autofs464520  3
sunrpc207808  9 vzrst,nfs,lockd,nfs_acl
cpufreq_ondemand   42000  2
acpi_cpufreq   47360  0
freq_table 38912  2 cpufreq_ondemand,acpi_cpufreq
mperf  35072  1 acpi_cpufreq
vzdev  36872  4 vzethdev,vznetdev,vzmon,vzdquota
ipv6  464188  39 ip6t_REJECT,ip6table_mangle
xfrm_nalgo 43268  1 ipv6
crypto_api 42880  1 xfrm_nalgo
loop   48528  0
dm_multipath   56856  0
scsi_dh42112  1 dm_multipath
video  53004  0
backlight  39808  1 video
sbs49856  0
power_meter46860  0
hwmon  36488  1 power_meter
i2c_ec 38528  1 sbs
dell_wmi   37408  0
wmi41920  1 dell_wmi
button 40480  0
battery43784  0
asus_acpi  50724  0
acpi_memhotplug40452  0
ac 38664  0
parport_pc 62248  0
lp 47056  0
parport73740  2 parport_pc,lp
sg 70456  0
i2c_i801   41876  0
pcspkr 36224  0
shpchp 70828  0
tg3   161672  0
i2c_core   57472  2 i2c_ec,i2c_i801
dm_raid45  99464  0
dm_message 36096  1 dm_raid45
dm_region_hash 46208  1 dm_raid45
dm_mem_cache   38912  1 dm_raid45
dm_snapshot52168  0
dm_zero35200  0
dm_mirror  54672  0
dm_log 44928  3 dm_raid45,dm_region_hash,dm_mirror
dm_mod101456  11 
dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log

ahci   73228  6
libata208784  1 ahci
sd_mod 56448  8
scsi_mod  199576  4 scsi_dh,sg,libata,sd_mod
raid1  55936  3
ext3  169872  2
jbd   103152  1 ext3
uhci_hcd   57240  0
ohci_hcd   55988  0
ehci_hcd   65932  0



On Tue, 29 Mar 2011 09:16:27 +0200, Saúl Ibarra Corretgé wrote:


On 29/3/11 6:21 AM, n...@uni-petrol.com [1] wrote:

Yes, ip_tables loaded: ip_tables 57440 3
iptable_nat,iptable_mangle,iptable_filter But media-relay exception
still present on every calls.

Was it loaded before or after starti

Re: [OpenSIPS-Users] db_mysql segfault

2011-03-29 Thread Mark Carbonaro

Hi Vlad,

Thanks for the reply, below is the output of "bt full".

Mark

#0  0x7fb9cd8cde57 in db_mysql_get_columns (_h=,
_r=0x796490) at res.c:71
col = 1
fields = 
__FUNCTION__ = "db_mysql_get_columns"
#1  0x7fb9cd8c7e36 in db_mysql_fetch_result (_h=0x7962c8,
_r=0x7fff2a4a3e68, nrows=128) at dbase.c:849
rows = 
i = 
__FUNCTION__ = "db_mysql_fetch_result"
#2  0x7fb9cbf94889 in select_entire_dialog_table (
dlg_hash_size=) at dlg_db_handler.c:232
__FUNCTION__ = "select_entire_dialog_table"
#3  load_dialog_info_from_db (dlg_hash_size=)
at dlg_db_handler.c:385
res = 0x796490
values = 
rows = 
i = 
nr_rows = 
dlg = 
callid = {s = 0x3c , len = -870573728}
from_uri = {s = 0xb , len = 5153101}
---Type  to continue, or q  to quit---
to_uri = {s = 0x1000 , len = 1}
from_tag = {s = 0x4 , len = -870574432}
to_tag = {s = 0x7fb9cc1c1960 "\264S\005\315\271\177", len = 
-870574432}

cseq1 = {s = 0x7fff2a4a3dc0 "\270*S", len = -846407113}
cseq2 = {s = 0x7fff2a4a3db0 "\303*S", len = -870577568}
contact1 = {s = 0x7962c8 "\240\026\034??\177", len = 7955600}
contact2 = {s = 0x532ac9 "version", len = 7}
rroute1 = {s = 0x532ab8 "table_name", len = 10}
rroute2 = {s = 0x532ac3 "table_version", len = 13}
next_id = 
__FUNCTION__ = "load_dialog_info_from_db"
#4  0x7fb9cbf961a8 in init_dlg_db (db_url=,
dlg_hash_size=4096, db_update_period=60) at dlg_db_handler.c:182
__FUNCTION__ = "init_dlg_db"
#5  0x7fb9cbf9046e in mod_init () at dialog.c:696
__FUNCTION__ = "mod_init"
#6  0x0047b242 in init_mod (m=0x797788) at sr_module.c:457
__FUNCTION__ = "init_mod"
#7  0x0047b1bf in init_mod (m=0x797ac8) at sr_module.c:452
__FUNCTION__ = "init_mod"
#8  0x0047b1bf in init_mod (m=0x797b98) at sr_module.c:452
__FUNCTION__ = "init_mod"
#9  0x0042b0c1 in main (argc=,
---Type  to continue, or q  to quit---
argv=0x7fff2a4a4168) at main.c:1356
cfg_log_stderr = 0
cfg_stream = 0x1a09010
c = 
r = 
tmp = 0x50bd87 "H\215\005.\365#"
tmp_len = 
port = 
proto = 
ret = 
seed = 4201309582
rfd = 
__FUNCTION__ = "main"


On 03/29/11 20:39, Vlad Paiu wrote:

Hello Mark,

If you still have the core dump, could you please do
gdb /path_to_opensips_binary path_to_core_file

/and reply with the output of
bt full

Thanks.


Regards,
--
Vlad Paiu
OpenSIPS Developer


On 03/29/2011 02:44 AM, Mark Carbonaro wrote:

Hi,

I have an issue when when starting opensips where it immediately 
segfaults in db_mysql.so.  This happens with in Centos 5.5 (plus all 
patches) when running VirtualBox and on a Rackspace cloud server, but 
works fine on an Amazon EC2 server setup in the same way (same config 
file, patches, package versions etc), which I find a little odd.


I was originally running off the opensips-1.6.4-2-tls_src.tar.gz tar 
ball, but due to this issue I thought I would change to the latest 
revision of the 1.6 branch in subversion, but the problem remained.


I build using the following command "make include_modules="db_mysql" 
all".


This config is setup just as a load balancer and does work on one 
server, just segfaults on others.


Please let me know if you need any more information.

Any help would be greatly appreciated

Regards,
Mark

Here is the output from syslog when opensips starts with debug=3:
Mar 28 23:33:18 server opensips: INFO:core:init_tcp: using epoll_lt 
as the TCP io watch method (auto detected)
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
NOTICE:core:main: version: opensips 1.6.4-2-notls (x86_64/linux)
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:core:main: using 32 Mb shared memory
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:core:main: using 1 Mb private memory per process
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
NOTICE:signaling:mod_init: initializing module ...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:sl:mod_init: Initializing StateLess engine
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:tm:mod_init: TM - initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:rr:mod_init: rr - initializing
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:maxfwd:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:usrloc:ul_init_locks: locks array size 512
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:registrar:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:textops:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/opensips[27923]: 
INFO:acc:mod_init: initializing...
Mar 28 23:33:18 server /usr/local/sbin/o

[OpenSIPS-Users] Reversed behaviour when setting up opensips with rtpproxy

2011-03-29 Thread Boris Ratner
Hi all!

Please tell me know if this behaviour is intentional:
Problem with proxying rtp:
UAC receives ip in the UAS' subnet while UAS receives the ip of UAC's
subnet of rtp proxy by default.


IP-Phone is on 10.200.10.195.

Network configuration:

ast1.local  <--->  opensips+rtpproxy <-> ast2.local
192.168.56.3   192.168.56.2/192.168.58.2   192.168.58.3
10.200.10.something
for ip phone.

SIP:
ast1 configured with outboundproxy .56.2
ast2 configured with outboundproxy .58.2
no ip routing is done on the ALG

OpenSIPS 1.6.4:
configured to rtpproxy_offer(); on INVITE
and to rtpproxy_answer(); on reply to it.

rtpproxy 1.2.1:
in bridge mode 192.168.56.2/192.168.58.2

SIP works fine:

Reliably Transmitting (no NAT) to 192.168.56.2:5060:
OPTIONS sip:ast2.local SIP/2.0
Via: SIP/2.0/UDP 192.168.56.3:5060;branch=z9hG4bK2a985f57;rport
From: "asterisk" ;tag=as7d368e85
To: 
Contact: 
Call-ID: 1a0cd5082af8bd525e2071c10edf2920@192.168.56.3
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 07 Mar 2011 21:54:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


<--- Transmitting (no NAT) to 192.168.58.2:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.58.2;branch=z9hG4bK5054.135a9ff1.0;received=192.168.58.2
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK2a985f57;rport=5060
Record-Route: 
Record-Route: 
From: "asterisk" ;tag=as7d368e85
To: ;tag=as63b00332
Call-ID: 1a0cd5082af8bd525e2071c10edf2920@192.168.56.3
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: 
Accept: application/sdp
Content-Length: 0

THE CALL: from ast1 to ast2


<>
-- Executing [565656@incoming:1] Dial("SIP/bratner-00a9",
"SIP/ast2/565656") in new stack
Audio is at 192.168.56.3 port 18922
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.56.2:5060:
INVITE sip:565656@ast2.local SIP/2.0
Via: SIP/2.0/UDP 192.168.56.3:5060;branch=z9hG4bK391f49a8;rport
From: "Extension 1001" ;tag=as6826385c
To: 
Contact: 
Call-ID: 2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 07 Mar 2011 21:58:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 287

v=0
o=root 19589 19589 IN IP4 192.168.56.3
s=session
c=IN IP4 192.168.56.3
t=0 0
m=audio 18922 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv



DBUG:handle_command: received command "U
2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3 192.168.56.3 18922
as6826385c;1"
INFO:handle_command: new session
2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3, tag as6826385c;1
requested, type strong
INFO:handle_command: BRAT: given remote address 192.168.56.3
INFO:create_twinlistener: BINDING TO 0.0.0.0
INFO:create_twinlistener: BINDING TO 0.0.0.0
INFO:handle_command: new session on a port 50026 created, tag as6826385c;1
INFO:handle_command: pre-filling caller's address with 192.168.56.3:18922
DBUG:doreply: sending reply "50026"




<--- SIP read from 192.168.58.2:5060 --->
INVITE sip:565656@ast2.local SIP/2.0
Record-Route: 
Record-Route: 
Via: SIP/2.0/UDP 192.168.58.2;branch=z9hG4bKc05.3917bd94.0
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK391f49a8;rport=5060
From: "Extension 1001" ;tag=as6826385c
To: 
Contact: 
Call-ID: 2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 69
Date: Mon, 07 Mar 2011 21:58:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 305
P-hint: thehelldoiknow

v=0
o=root 19589 19589 IN IP4 192.168.56.3
s=session
c=IN IP4 192.168.56.2
t=0 0
m=audio 50026 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=nortpproxy:yes


<--- Reliably Transmitting (no NAT) to 192.168.58.2:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.58.2;branch=z9hG4bKc05.3917bd94.0;received=192.168.58.2
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK391f49a8;rport=5060
Record-Route: 
Record-Route: 
From: "Extension 1001" ;tag=as6826385c
To: ;tag=as112d0057
Call-ID: 2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: 
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 4755 4755 IN IP4 192.168.58.3
s=session
c=IN IP4 192.168.

Re: [OpenSIPS-Users] SIP Over TLS using OpenSIPS

2011-03-29 Thread Anca Vamanu

Hi David,

Have you configured OpenSIPS to check clients certificate (have you set 
tls_require_client_certificate = 1) ? Then you have to configure the 
accepted certificates:  
http://www.opensips.org/html/docs/tutorials/tls-1.4.x.html#AEN264.


Regards,

--
Anca Vamanu
OpenSIPS Developer



On 03/29/2011 09:54 AM, David Chedid wrote:

Dears,

Any one can help on this?

Thanks,

BR,


Dears,

I am trying to use OpenSIPS with TLS but didn't work till now :(

I am getting the following error:

Mar 25 14:09:49 [16855] DBG:core:print_ip: tcpconn_new: new tcp connection
to: 192.168.20.19
Mar 25 14:09:49 [16855] DBG:core:tcpconn_new: on port 4034, type 3
Mar 25 14:09:49 [16855] DBG:core:tls_tcpconn_init: entered: Creating a whole
new ssl connection
Mar 25 14:09:49 [16855] DBG:core:tls_tcpconn_init: looking up socket based
TLS server domain [192.168.168.28:5061]
Mar 25 14:09:49 [16855] DBG:core:tls_find_server_domain: virtual TLS server
domain found
Mar 25 14:09:49 [16855] DBG:core:tls_tcpconn_init: found socket based TLS
server domain [192.168.168.28:5061]
Mar 25 14:09:49 [16855] DBG:core:tls_tcpconn_init: Setting in ACCEPT mode
(server)
Mar 25 14:09:49 [16855] DBG:core:tcpconn_add: hashes: 770, 1
Mar 25 14:09:49 [16855] DBG:core:handle_new_connect: new connection:
0xafc4f7c8 25 flags: 0002
Mar 25 14:09:49 [16855] DBG:core:send2child: to tcp child 0 0(16847),
0xafc4f7c8
Mar 25 14:09:49 [16847] DBG:core:handle_io: received n=4 con=0xafc4f7c8,
fd=12
Mar 25 14:09:49 [16847] DBG:core:io_watch_add: io_watch_add(0x81b6ec0, 12,
2, 0xafc4f7c8), fd_no=1
Mar 25 14:09:49 [16847] DBG:core:tls_update_fd: New fd is 12
Mar 25 14:09:49 [16847] DBG:core:tls_update_fd: New fd is 12
Mar 25 14:09:49 [16847] ERROR:core:tls_accept: some error in SSL (ret=0,
err=1, errno=0/Success):
Mar 25 14:09:49 [16847] ERROR:core:tls_print_errstack: error:14094418:SSL
routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
Mar 25 14:09:49 [16847] DBG:core:io_watch_del: io_watch_del (0x81b6ec0, 12,
-1, 0x10) fd_no=2 called
Mar 25 14:09:49 [16847] DBG:core:release_tcpconn:  releasing con 0xafc4f7c8,
state -2, fd=12, id=1
Mar 25 14:09:49 [16847] DBG:core:release_tcpconn:  extra_data 0xafc5f8e4
Mar 25 14:09:49 [16855] DBG:core:handle_tcp_child: reader response=
afc4f7c8, -2 from 0
Mar 25 14:09:49 [16855] DBG:core:tcpconn_destroy: destroying connection
0xafc4f7c8, flags 0002
Mar 25 14:09:49 [16855] DBG:core:tls_close: closing SSL connection
Mar 25 14:09:49 [16855] DBG:core:tls_update_fd: New fd is 25
Mar 25 14:09:49 [16855] DBG:core:tls_shutdown: shutdown successful
Mar 25 14:09:49 [16855] DBG:core:tls_tcpconn_clean: entered


Below the configuration file for the debug and TLS Section:

debug=4
fork=yes
log_stderror=yes
check_via=no
dns=no
rev_dns=no

tls_client_domain_avp=0
disable_tls = no
listen = tls:192.168.168.28:5061
tls_verify_server = 1
tls_verify_client = 1
tls_require_client_certificate = 1
tls_handshake_timeout=30
tls_send_timeout=30
tls_method = TLSv1
tls_ciphers_list="NULL"
tls_certificate = "/usr/local/etc/opensips//tls/user/user-cert.pem"
tls_private_key = "/usr/local/etc/opensips//tls/user/user-privkey.pem"
tls_ca_list = "/usr/local/etc/opensips//tls/user/user-calist.pem"
tls_server_domain [192.168.168.28:5061]
{
tls_certificate = "/usr/local/etc/opensips//tls/user/user-cert.pem"
tls_private_key = "/usr/local/etc/opensips//tls/user/user-privkey.pem"
tls_ca_list = "/usr/local/etc/opensips/tls//user/user-calist.pem"
tls_method = TLSv1
}

Below you can find also info regarding my OpenSIPS server

version: opensips 1.6.4-2-tls (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST,
SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: unknown
@(#) $Id: main.c 7530 2010-12-13 19:07:53Z bogdan_iancu $
main.c compiled on 13:57:04 Jan 31 2011 with gcc 4.2.4

Linux 2.6.24-23-server #1 SMP Thu Nov 27 19:19:15 UTC 2008 i686 GNU/Linux

Ubuntu 8.04.4 LTS \n \l

Inform me if how can I fix this issue, and if you need more info don't
hesitate to contact me.

BR,


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


Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread Saúl Ibarra Corretgé

On 29/3/11 11:42 AM, n...@uni-petrol.com wrote:



Because of media-relay running in openvz virtual container it inherit
kernel modules like ip_table, ip_conntrack, nfnetlink from host node, so
yesm ip_tables module like others loade before media-relay start.
Below is a list of running modules.



I haven't tried MediaProxy within a OpenVZ container, so I can't say how 
this could affect MediaProxy, sorry.



Unfortunately it is very hard to migrate to python > 2.4, because CentOS
< 6.0
don't support other versions and hard depend on python 2.4.

Now I'm trying install Scientific Linux 6.0 in openvz virtual environment
to test python 2.6.



We develop, test and deploy MediaProxy on Debian based non virtualized 
systems so chances are that we'll not be able to help you if you run 
into issues we didn't experience because we don't use such scenarios.


Many people are running MediaProxy on CentOS-like systems, but I can't 
recall if anyone is using OpenVZ containers. You may want to test it in 
a standalone machine first, and once you get it working you can put it 
in the container and test again.



I have a question regarding which python version are recommended to run
media-proxy (python 2.6, 2.7, 3.2) ?



Python 2.6 would be the best choice.


Regards,

--
Saúl Ibarra Corretgé
AG Projects

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


Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread nick


OK.

I will try:
1. Install python 2.6 in virtual environment and test it.
2. Run media-relay on host environment with python 2.4.
3. Run media-relay on host environment with python 2.6.

I have new periodic error in logs:
Mar 29 14:22:46 media-relay[1983]: error: Connection with dispatcher at 
x.x.x.x:25060 was lost: A TLS packet with unexpected length was 
received.


Where x.x.x.x is IP of media-dispatcher on another virtual environment.

Is it known error or error in my configuration? Or is it because of I 
use python 2.4?


In [Relay] section on config.ini I have:

[Relay]
passport = None

On Tue, 29 Mar 2011 12:14:59 +0200, Saúl Ibarra Corretgé wrote:


On 29/3/11 11:42 AM, n...@uni-petrol.com [1] wrote:
Because of media-relay running in openvz virtual container it 
inherit
kernel modules like ip_table, ip_conntrack, nfnetlink from host 
node,

so yesm ip_tables module like others loade before media-relay start.
Below is a list of running modules.

I haven't tried MediaProxy within a OpenVZ container, so I can't say
how this could affect MediaProxy, sorry.


Unfortunately it is very hard to migrate to python > 2.4, because
CentOS < 6.0 don't support other versions and hard depend on python
2.4. Now I'm trying install Scientific Linux 6.0 in openvz virtual
environment to test python 2.6.
We develop, test and deploy MediaProxy on Debian based non 
virtualized

systems so chances are that we'll not be able to help you if you run

into

issues we didn't experience because we don't use such scenarios. Many
people are running MediaProxy on CentOS-like systems, but I can't 
recall

if anyone is using OpenVZ containers. You may want to test it in a
standalone machine first, and once you get it working you can put it 
in

the container and test again.

e>I have a question regarding which python version are recommended 
to

run media-proxy (python 2.6, 2.7, 3.2) ?

e> Python 2.6 would be the best choice. Regards,



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


Re: [OpenSIPS-Users] drouting module with append_branch() and q-values

2011-03-29 Thread Anca Vamanu

Hi thrillerbe,

I think that if you only want to build the list of selected 
destinations, you can just call use_next_gw and add the uri in RURI to a 
destination string ( because use_next_gw sets the RURI to the 
destination- 
http://www.opensips.org/html/docs/modules/devel/drouting.html#id251519).

It would be something like this:

if (do_routing("1","2"))
{
if ($avp(s:dr_rules_attrs) == "2")
{
xlog("L_INFO","After 1, ds is $ru\n");
$var(x) = 2;
$var(ds) = $ru;

while (use_next_gw())
{
$var(ds) = $var(ds) + "," + $ru;
xlog("L_INFO","After $var(x), ds is $var(ds)\n");
$var(x) = $var(x) + 1;
}
}
xlog("L_INFO","Destination set is $var(ds)\n");
}


Regards,

--
Anca Vamanu
OpenSIPS Developer



On 03/29/2011 01:00 AM, thrillerbee wrote:
I'm trying to get OpenSIPS to act as a REDIRECT server and have run 
into a couple issues. I'm using the drouting module to do lookups. 
Essentially, a dialed number could have potentially several routes, I 
want to return a 300 with these routes in the Contact header. Please 
tell me if this is foolish and/or there are better methods.


I'm running release version 1.6.4-2-notls.

With that, I've configured the following in my script:
if (do_routing("1","2"))
{
if ($avp(s:dr_rules_attrs) == "2")
{
xlog("L_INFO","After 1, ds is $ds\n");
$var(x) = 2;
while (use_next_gw())
{
append_branch();
xlog("L_INFO","After $var(x), ds is $ds\n");
$var(x) = $var(x) + 1;
}
}
xlog("L_INFO","Destination set is $ds\n");
}

My relevant debug output is:
After 1, ds is Contact: sip:15552345678@1.1.1.1 

After 2, ds is Contact: *sip:2215552345678@2.2.2.2 
, sip:2215552345678@2.2.2.2 
*
After 3, ds is Contact: *sip:5552345678@3.3.3.3 
*, sip:2215552345678@2.2.2.2 
, *sip:5552345678@3.3.3.3 
*
After 4, ds is Contact: *sip:15552345678@5.5.5.5 
*, sip:2215552345678@2.2.2.2 
, sip:5552345678@3.3.3.3 
, *sip:15552345678@5.5.5.5 
*
After 5, ds is Contact: *sip:4415552345678@4.4.4.4 
*, sip:2215552345678@2.2.2.2 
, sip:5552345678@3.3.3.3 
, sip:15552345678@5.5.5.5 
, *sip:4415552345678@4.4.4.4 
*


It seems that append_branch() deletes the first entry in the 
destination set before adding the current RURI to the beginning and 
end. Is there an easier or more predictable way to write to the 
destination set?


Also, it seems the append_branch() function will not take variables or 
avps as parameters. Is there a known way of setting different q-values 
as a destination set is generated?  The below obviously doesn't work 
but should explain what I'm looking for:


var(q) = 90;
while (use_next_branch())
{
append_branch("$ru","$var(q)");
$var(q) = $var(q) - 10;
}

Thanks,
Ryan

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


[OpenSIPS-Users] Cannot store Accounting Record into mysql Using Opensips 1.6.4 + CDRTool + Freeradius + mysql

2011-03-29 Thread Simon Shum
Hello,

I have installed opensips 1.6.4 + mediaproxy + cdrtool + freeradius + mysql, 
and I have followed the install guide from 
http://cdrtool.ag-projects.com/wiki/Install. 

I am able to find accounting record in the freeradius server log file at 
/var/log/freeradius/radacct/, but when I trying to look for the accounting 
record in the mysql database. I found the radacct table in radius database is 
empty. I read the /var/log/freeradius/radius.log and found the following logs:

Thu Mar 24 12:09:25 2011 : Error: [sql] Couldn't update SQL accounting ALIVE 
record - You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near ''' 
at line 1
Thu Mar 24 12:09:25 2011 : Error: rlm_sql_mysql: Cannot store result
Thu Mar 24 12:09:25 2011 : Error: rlm_sql_mysql: MySQL error 'You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near ''' at line 1'
Thu Mar 24 12:09:35 2011 : Error: [sql] Couldn't update SQL accounting ALIVE 
record - You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near ''' 
at line 1
Thu Mar 24 12:09:35 2011 : Error: rlm_sql_mysql: Cannot store result
Thu Mar 24 12:09:35 2011 : Error: rlm_sql_mysql: MySQL error 'You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near ''' at line 1'
Thu Mar 24 12:09:45 2011 : Error: [sql] Couldn't update SQL accounting ALIVE 
record - You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near ''' 
at line 1
Thu Mar 24 12:09:45 2011 : Error: rlm_sql_mysql: Cannot store result
Thu Mar 24 12:09:45 2011 : Error: rlm_sql_mysql: MySQL error 'You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near ''' at line 1'
Thu Mar 24 12:11:25 2011 : Info: [sql] stop packet with zero session length. 
[user '301@192.168.11.212', nas '127.0.0.1']


Would anybody tell me is there something wrong with my config ? Thanks

Regards,
Simon

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


[OpenSIPS-Users] [OpenSIPS-Devel] New SylkServer release 1.1.0

2011-03-29 Thread Juha Heinanen
adrian,

thanks for the new version of sylkserver.  i built it myself on debian
squeeze by first getting it from your repo with command

apt-get source sylkserver

build and install went fine, but when i try to start sylkserver, i get
the error below.

any idea what goes wrong?  my python-sipsimple version is 0.18.0.

-- juha

Mar 24 11:39:45 sip sylk-server[3613]: Starting SylkServer 1.1.0, 
config=/etc/sylkserver/config.ini
Mar 24 11:39:47 sip sylk-server[3613]: using set_wakeup_fd
Mar 24 11:39:48 sip sylk-server[3613]: fatal error: failed to create 
SylkServer: /usr/lib/pymodules/python2.6/sipsimple/core/_core.so: undefined 
symbol: pjsip_msg_find_remove_hdr_by_name
Mar 24 11:39:48 sip sylk-server[3613]: Traceback (most recent call last):
Mar 24 11:39:48 sip sylk-server[3613]:   File "/usr/bin/sylk-server", line 86, 
in main
Mar 24 11:39:48 sip sylk-server[3613]: from sylk.server import SylkServer
Mar 24 11:39:48 sip sylk-server[3613]:   File 
"/usr/lib/pymodules/python2.6/sylk/server.py", line 11, in 
Mar 24 11:39:48 sip sylk-server[3613]: from sipsimple.account import 
Account, BonjourAccount, AccountManager
Mar 24 11:39:48 sip sylk-server[3613]:   File 
"/usr/lib/pymodules/python2.6/sipsimple/account.py", line 32, in 
Mar 24 11:39:48 sip sylk-server[3613]: from sipsimple.core import 
ContactHeader, Credentials, Engine, FromHeader, FrozenSIPURI, Registration, 
RouteHeader, SIPURI, Subscription, ToHeader, PJSIPError, SIPCoreError
Mar 24 11:39:48 sip sylk-server[3613]:   File 
"/usr/lib/pymodules/python2.6/sipsimple/core/__init__.py", line 4, in 
Mar 24 11:39:48 sip sylk-server[3613]: from sipsimple.core._core import *
Mar 24 11:39:48 sip sylk-server[3613]: ImportError: 
/usr/lib/pymodules/python2.6/sipsimple/core/_core.so: undefined symbol: 
pjsip_msg_find_remove_hdr_by_name

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


[OpenSIPS-Users] Dedicated Presence Service

2011-03-29 Thread Paris Stamatopoulos
Hello there,

I am trying to create a seperate Presence server to use with my existing 
OpenSIPS proxy. My main proxy/registrar listens at 10.1.1.1 port 5080, while 
the presence server listens to 10.1.1.1 5061.

The registrar/proxy only makes use of pua so as to change the status of 
non-presence capable phones, and forwards everything else to the dedicated 
presence server, so I've added to my configuration:

loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "pua_usrloc.so"
loadmodule "pua_dialoginfo.so"
loadmodule "presence"

modparam("pua", "db_url", "mysql://user:pass@host/db")
modparam("pua_usrloc", "default_domain", "domain.com")
modparam("pua_usrloc", "10.1.1.1", "sip:presence@10.1.1.1:5061")

modparam("pua_dialoginfo", "10.1.1.1", "sip:presence@10.1.1.1:5061")
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "caller_confirmed", 0)

modparam("pua_dialoginfo", "caller_spec_param", "$avp(i:10)")

modparam("presence", "mix_dialog_presence", 1)

...

if (has_totag()) {
if (loose_route()) {
if (is_method("BYE")) {
setflag(1);
setflag(3);
} else if (is_method("INVITE")) {
record_route();
}
route(1);
} else {
if( is_method("SUBSCRIBE") && $rd == "10.1.1.1" ) {
t_relay("udp:10.1.1.1:5061");
exit;
}

if ( is_method("ACK") ) {
if ( t_check_trans() ) {
t_relay();
exit;
} else {
exit;
}
}

sl_send_reply("404","Not here");
}

exit;
}

...

if( is_method("PUBLISH|SUBSCRIBE|NOTIFY") && src_ip != 10.1.1.1 ) {
t_relay("udp:10.1.1.1:5061");
exit;
}

...

if( !search("^User-Agent: X-Lite")) {
pua_set_publish();
}

Presence appears to be partially working, but what seems rather odd (and I 
believe is the reason why I am facing problems) is the following:

I am seeing on the presence opensips:

Mar 28 16:27:38 [25064] DBG:presence:build_dlg_t: CONTACT = 
sip:12345@10.1.1.1:5080;transport=udp
Mar 28 16:27:38 [25064] DBG:tm:t_uac: 
next_hop=
Mar 28 16:27:38 [25064] DBG:core:mk_proxy: doing DNS lookup...
Mar 28 16:27:38 [25064] DBG:tm:dlg2hash: 3372
Mar 28 16:27:38 [25064] DBG:tm:print_request_uri: 
sip:12345@10.1.1.1:5080;transport=udp
Mar 28 16:27:38 [25064] DBG:tm:set_timer: relative timeout is 50
Mar 28 16:27:38 [25064] DBG:tm:insert_timer_unsafe: [4]: 0x7feff60bba28 
(3060)
Mar 28 16:27:38 [25064] DBG:tm:set_timer: relative timeout is 30
Mar 28 16:27:38 [25064] DBG:tm:insert_timer_unsafe: [0]: 0x7feff60bba58 (60)
Mar 28 16:27:38 [25064] INFO:presence:send_notify_request: NOTIFY 
sip:12...@domain.com via sip:10.1.1.1:5080;lr=on;ftag=23294e0b7d1b57e4 on 
behalf of sip:54...@domain.com for event presence
Mar 28 16:27:38 [25064] DBG:tm:t_unref: UNREF_UNSAFE: [0x7feff60c0428] after is 0
Mar 28 16:27:38 [25064] DBG:core:destroy_avp_list: destroying list (nil)
Mar 28 16:27:38 [25064] DBG:core:receive_msg: cleaning up
Mar 28 16:27:38 [25064] DBG:core:parse_msg: SIP Reply  (status):
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  version: 
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  status:  <404>
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  reason:  

As you can see it mentions "NOTIFY sip:12...@domain.com via 
sip:10.1.1.1:5080;". The registrar/proxy on the other side:

Mar 28 16:27:38 [24199] DBG:core:parse_msg: SIP Request:
Mar 28 16:27:38 [24199] DBG:core:parse_msg:  method:  
Mar 28 16:27:38 [24199] DBG:core:parse_msg:  uri: 

Mar 28 16:27:38 [24199] DBG:core:parse_msg:  version: 
Mar 28 16:27:38 [24199] DBG:core:parse_headers: flags=2
Mar 28 16:27:38 [24199] DBG:core:parse_via_param: found param type 232, 
 = ; state=16
Mar 28 16:27:38 [24199] DBG:core:parse_via: end of header reached, state=5
Mar 28 16:27:38 [24199] DBG:core:parse_headers: via found, flags=2
Mar 28 16:27:38 [24199] DBG:core:parse_headers: this is the first via
Mar 28 16:27:38 [24199] DBG:core:receive_msg: After parse_msg...
Mar 28 16:27:38 [24199] DBG:core:receive_msg: preparing to run routing 
scripts...
Mar 28 16:27:38 [24199] DBG:core:parse_headers: flags=100
Mar 28 16:27:38 [24199] DBG:core:parse_to_param: tag=23294e0b7d1b57e4
Mar 28 16:27:38 [24199] DBG:core:parse_to: end of header reached, state=29
Mar 28 16:27:38 [24199] DBG:core:parse_to: display={}, 
ruri={sip:12...@domain.com}
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field:  [54]; 
uri=[sip:12...@domain.com]
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: to body []
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: cseq : <2> 
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: content_length=32

[OpenSIPS-Users] Dedicated Presence Service

2011-03-29 Thread Paris Stamatopoulos
Hello there,

I am trying to create a seperate Presence server to use with my existing 
OpenSIPS proxy. My main proxy/registrar listens at 10.1.1.1 port 5080, while 
the presence server listens to 10.1.1.1 5061.

The registrar/proxy only makes use of pua so as to change the status of 
non-presence capable phones, and forwards everything else to the dedicated 
presence server, so I've added to my configuration:

loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "pua_usrloc.so"
loadmodule "pua_dialoginfo.so"
loadmodule "presence"

modparam("pua", "db_url", "mysql://user:pass@host/db")
modparam("pua_usrloc", "default_domain", "domain.com")
modparam("pua_usrloc", "10.1.1.1", "sip:presence@10.1.1.1:5061")

modparam("pua_dialoginfo", "10.1.1.1", "sip:presence@10.1.1.1:5061")
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "caller_confirmed", 0)

modparam("pua_dialoginfo", "caller_spec_param", "$avp(i:10)")

modparam("presence", "mix_dialog_presence", 1)

...

if (has_totag()) {
if (loose_route()) {
if (is_method("BYE")) {
setflag(1);
setflag(3);
} else if (is_method("INVITE")) {
record_route();
}
route(1);
} else {
if( is_method("SUBSCRIBE") && $rd == "10.1.1.1" ) {
t_relay("udp:10.1.1.1:5061");
exit;
}

if ( is_method("ACK") ) {
if ( t_check_trans() ) {
t_relay();
exit;
} else {
exit;
}
}

sl_send_reply("404","Not here");
}

exit;
}

...

if( is_method("PUBLISH|SUBSCRIBE|NOTIFY") && src_ip != 10.1.1.1 ) {
t_relay("udp:10.1.1.1:5061");
exit;
}

...

if( !search("^User-Agent: X-Lite")) {
pua_set_publish();
}

Presence appears to be partially working, but what seems rather odd (and I 
believe is the reason why I am facing problems) is the following:

I am seeing on the presence opensips:

Mar 28 16:27:38 [25064] DBG:presence:build_dlg_t: CONTACT = 
sip:12345@10.1.1.1:5080;transport=udp
Mar 28 16:27:38 [25064] DBG:tm:t_uac: 
next_hop=
Mar 28 16:27:38 [25064] DBG:core:mk_proxy: doing DNS lookup...
Mar 28 16:27:38 [25064] DBG:tm:dlg2hash: 3372
Mar 28 16:27:38 [25064] DBG:tm:print_request_uri: 
sip:12345@10.1.1.1:5080;transport=udp
Mar 28 16:27:38 [25064] DBG:tm:set_timer: relative timeout is 50
Mar 28 16:27:38 [25064] DBG:tm:insert_timer_unsafe: [4]: 0x7feff60bba28 
(3060)
Mar 28 16:27:38 [25064] DBG:tm:set_timer: relative timeout is 30
Mar 28 16:27:38 [25064] DBG:tm:insert_timer_unsafe: [0]: 0x7feff60bba58 (60)
Mar 28 16:27:38 [25064] INFO:presence:send_notify_request: NOTIFY 
sip:12...@domain.com via sip:10.1.1.1:5080;lr=on;ftag=23294e0b7d1b57e4 on 
behalf of sip:54...@domain.com for event presence
Mar 28 16:27:38 [25064] DBG:tm:t_unref: UNREF_UNSAFE: [0x7feff60c0428] after is 0
Mar 28 16:27:38 [25064] DBG:core:destroy_avp_list: destroying list (nil)
Mar 28 16:27:38 [25064] DBG:core:receive_msg: cleaning up
Mar 28 16:27:38 [25064] DBG:core:parse_msg: SIP Reply  (status):
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  version: 
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  status:  <404>
Mar 28 16:27:38 [25064] DBG:core:parse_msg:  reason:  

As you can see it mentions "NOTIFY sip:12...@domain.com via 
sip:10.1.1.1:5080;". The registrar/proxy on the other side:

Mar 28 16:27:38 [24199] DBG:core:parse_msg: SIP Request:
Mar 28 16:27:38 [24199] DBG:core:parse_msg:  method:  
Mar 28 16:27:38 [24199] DBG:core:parse_msg:  uri: 

Mar 28 16:27:38 [24199] DBG:core:parse_msg:  version: 
Mar 28 16:27:38 [24199] DBG:core:parse_headers: flags=2
Mar 28 16:27:38 [24199] DBG:core:parse_via_param: found param type 232, 
 = ; state=16
Mar 28 16:27:38 [24199] DBG:core:parse_via: end of header reached, state=5
Mar 28 16:27:38 [24199] DBG:core:parse_headers: via found, flags=2
Mar 28 16:27:38 [24199] DBG:core:parse_headers: this is the first via
Mar 28 16:27:38 [24199] DBG:core:receive_msg: After parse_msg...
Mar 28 16:27:38 [24199] DBG:core:receive_msg: preparing to run routing 
scripts...
Mar 28 16:27:38 [24199] DBG:core:parse_headers: flags=100
Mar 28 16:27:38 [24199] DBG:core:parse_to_param: tag=23294e0b7d1b57e4
Mar 28 16:27:38 [24199] DBG:core:parse_to: end of header reached, state=29
Mar 28 16:27:38 [24199] DBG:core:parse_to: display={}, 
ruri={sip:12...@domain.com}
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field:  [54]; 
uri=[sip:12...@domain.com]
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: to body []
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: cseq : <2> 
Mar 28 16:27:38 [24199] DBG:core:get_hdr_field: content_length=32

[OpenSIPS-Users] Dialog module - updating db

2011-03-29 Thread Антон Загорский
Hello.

Sometimes I see in a log following lines:

[89566]: DBG:dialog:dialog_update_db: inserting new dialog 0x80417c568
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x731538
(tail=7530824) MC=0x72e9a8
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new query=|insert into
dialog
(hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_co
ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)|
[89566]: INFO:db_mysql:re_init_statement:  query  is , ptr=0x0
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new statement(0x7317c8) on
connection: (0x731538) 0x72e948


And that causes
[89566]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error
(1048): Column 'to_tag' cannot be null
[89566]: ERROR:dialog:dialog_update_db: could not add another dialog to db


How can all values be '?' ?




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





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


Re: [OpenSIPS-Users] db_mysql segfault

2011-03-29 Thread Vlad Paiu

Hi,

Just took a look at the code and it seems to be a problem somehow 
related with the mysql library on your machine.
At startup, OpenSIPS tries to fetch all dialog info from DB, and it 
first gets the column names and column types from the dialog table. It 
seems that in your case, the mysql library can only succesfully fetch 
the first column name ( hash_entry ), and then returns NULL for the 
second column name, which causes OpenSIPS to crash, because the case 
where a column name is NULL is bogus and should never happen.


Could you maybe try to reinstall your mysql library or double check the 
fact that are no related problems to it ?



Regards,

--
Vlad Paiu
OpenSIPS Developer



On 03/29/2011 12:53 PM, Mark Carbonaro wrote:

Hi Vlad,

Thanks for the reply, below is the output of "bt full".

Mark

#0  0x7fb9cd8cde57 in db_mysql_get_columns (_h=,
_r=0x796490) at res.c:71
col = 1
fields = 
__FUNCTION__ = "db_mysql_get_columns"
#1  0x7fb9cd8c7e36 in db_mysql_fetch_result (_h=0x7962c8,
_r=0x7fff2a4a3e68, nrows=128) at dbase.c:849
rows = 
i = 
__FUNCTION__ = "db_mysql_fetch_result"
#2  0x7fb9cbf94889 in select_entire_dialog_table (
dlg_hash_size=) at dlg_db_handler.c:232
__FUNCTION__ = "select_entire_dialog_table"
#3  load_dialog_info_from_db (dlg_hash_size=)
at dlg_db_handler.c:385
res = 0x796490
values = 
rows = 
i = 
nr_rows = 
dlg = 
callid = {s = 0x3c , len = -870573728}
from_uri = {s = 0xb , len = 5153101}
---Type  to continue, or q  to quit---
to_uri = {s = 0x1000 , len = 1}
from_tag = {s = 0x4 , len = -870574432}
to_tag = {s = 0x7fb9cc1c1960 "\264S\005\315\271\177", len = 
-870574432}

cseq1 = {s = 0x7fff2a4a3dc0 "\270*S", len = -846407113}
cseq2 = {s = 0x7fff2a4a3db0 "\303*S", len = -870577568}
contact1 = {s = 0x7962c8 "\240\026\034??\177", len = 7955600}
contact2 = {s = 0x532ac9 "version", len = 7}
rroute1 = {s = 0x532ab8 "table_name", len = 10}
rroute2 = {s = 0x532ac3 "table_version", len = 13}
next_id = 
__FUNCTION__ = "load_dialog_info_from_db"
#4  0x7fb9cbf961a8 in init_dlg_db (db_url=,
dlg_hash_size=4096, db_update_period=60) at dlg_db_handler.c:182
__FUNCTION__ = "init_dlg_db"
#5  0x7fb9cbf9046e in mod_init () at dialog.c:696
__FUNCTION__ = "mod_init"
#6  0x0047b242 in init_mod (m=0x797788) at sr_module.c:457
__FUNCTION__ = "init_mod"
#7  0x0047b1bf in init_mod (m=0x797ac8) at sr_module.c:452
__FUNCTION__ = "init_mod"
#8  0x0047b1bf in init_mod (m=0x797b98) at sr_module.c:452
__FUNCTION__ = "init_mod"
#9  0x0042b0c1 in main (argc=,
---Type  to continue, or q  to quit---
argv=0x7fff2a4a4168) at main.c:1356
cfg_log_stderr = 0
cfg_stream = 0x1a09010
c = 
r = 
tmp = 0x50bd87 "H\215\005.\365#"
tmp_len = 
port = 
proto = 
ret = 
seed = 4201309582
rfd = 
__FUNCTION__ = "main"


On 03/29/11 20:39, Vlad Paiu wrote:

Hello Mark,

If you still have the core dump, could you please do
gdb /path_to_opensips_binary path_to_core_file

/and reply with the output of
bt full

Thanks.


Regards,
--
Vlad Paiu
OpenSIPS Developer


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


[OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS Project

2011-03-29 Thread ALICOMPUTECH
Hello
  Everyone
   I want to replace the Asterisk (being used as a SIP Server for 
registration, authentication and call routing) with OpenSIPS in OpenBTS 
project, as i am planning to have an Asterisk cluster for dedicated services 
and OpenSIPS will be forwarding the SIP calls to the cluster.

OpenBTS implements GSM Um air interface and emulate the Mobile handsets as the 
SIP endpoint and these handsets can be used as SIP extensions in a SIP-capable 
server.

I need to know the handoff and/or handover support in OpenSIPS as i am a newbie 
to this wonderful open source solution.

If there is any pointer and/or previously handoff/handover work done please 
share, it will then ease my work

thanks in advance

Best Regards

Bye





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


Re: [OpenSIPS-Users] Dialog module - updating db

2011-03-29 Thread Vlad Paiu

Hello,

The '?' sign is just a placeholder in the case of prepared statements. 
When the query will be issued to the DB, all '?' signs will be replaced 
with the appropriate values for the query.


The to_tag column in the dialog database is marked as NOT NULL because 
dialogs are pushed to DB only after the 200 OK is received, so the 
To-Tag value MUST have been learned by the dialog module. In your case 
though, it seems that the To-Tag is empty, which is not valid from SIP 
point of view.
We saw a similar problem with someone who used b2b and dialog together. 
Are you by any change using b2b too ?


Please try to capture the SIP traffic that triggers this OpenSIPS error 
in saving dialog info to the DB back-end and check if the To-Tag is 
present in 200 OK replies for the initial INVITE.


Regards,

--
Vlad Paiu
OpenSIPS Developer



On 03/29/2011 02:17 PM, Антон Загорский wrote:

Hello.

Sometimes I see in a log following lines:

[89566]: DBG:dialog:dialog_update_db: inserting new dialog 0x80417c568
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x731538
(tail=7530824) MC=0x72e9a8
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new query=|insert into
dialog
(hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_co
ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)|
[89566]: INFO:db_mysql:re_init_statement:  query  is, ptr=0x0
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new statement(0x7317c8) on
connection: (0x731538) 0x72e948


And that causes
[89566]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error
(1048): Column 'to_tag' cannot be null
[89566]: ERROR:dialog:dialog_update_db: could not add another dialog to db


How can all values be '?' ?




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





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

   




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


Re: [OpenSIPS-Users] Dialog module - updating db

2011-03-29 Thread Антон Загорский
Hi Vlad,

Yes, I'm using dialog module with B2B top hiding scenario. In case of such 
problem, should I rewrite config to avoid using them together? This will not be 
easy...

Also, in a MySQL log I see exactly that requests with '?'...




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



> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:users-
> boun...@lists.opensips.org] On Behalf Of Vlad Paiu
> Sent: Tuesday, March 29, 2011 3:53 PM
> To: users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] Dialog module - updating db
> 
> Hello,
> 
> The '?' sign is just a placeholder in the case of prepared statements.
> When the query will be issued to the DB, all '?' signs will be replaced with 
> the
> appropriate values for the query.
> 
> The to_tag column in the dialog database is marked as NOT NULL because
> dialogs are pushed to DB only after the 200 OK is received, so the To-Tag
> value MUST have been learned by the dialog module. In your case though, it
> seems that the To-Tag is empty, which is not valid from SIP point of view.
> We saw a similar problem with someone who used b2b and dialog together.
> Are you by any change using b2b too ?
> 
> Please try to capture the SIP traffic that triggers this OpenSIPS error in 
> saving
> dialog info to the DB back-end and check if the To-Tag is present in 200 OK
> replies for the initial INVITE.
> 
> Regards,
> 
> --
> Vlad Paiu
> OpenSIPS Developer
> 
> 
> 
> On 03/29/2011 02:17 PM, Антон Загорский wrote:
> > Hello.
> >
> > Sometimes I see in a log following lines:
> >
> > [89566]: DBG:dialog:dialog_update_db: inserting new dialog 0x80417c568
> > [89566]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x731538
> > (tail=7530824) MC=0x72e9a8
> > [89566]: DBG:db_mysql:db_mysql_do_prepared_query: new
> query=|insert into
> > dialog
> >
> (hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
> >
> e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_c
> o
> > ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
> > values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)|
> > [89566]: INFO:db_mysql:re_init_statement:  query  is >
> (hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
> >
> e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_c
> o
> > ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
> > values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)>, ptr=0x0
> > [89566]: DBG:db_mysql:db_mysql_do_prepared_query: new
> statement(0x7317c8) on
> > connection: (0x731538) 0x72e948
> >
> >
> > And that causes
> > [89566]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver
> error
> > (1048): Column 'to_tag' cannot be null
> > [89566]: ERROR:dialog:dialog_update_db: could not add another dialog to
> db
> >
> >
> > How can all values be '?' ?
> >
> >
> >
> >
> > WBR, Anton Zagorskiy
> > VoIP Developer, Oyster Telecom
> > Phone.: +7 812 601-0666
> > Fax: +7 812 601-0593
> > a.zagors...@oyster-telecom.ru
> > www.oyster-telecom.ru
> >
> >
> >
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> 
> 
> 
> ___
> 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] Dialog module - updating db

2011-03-29 Thread Anca Vamanu

Hi Anton,

Unfortunately, b2b does not work with dialog. The reason is that the 
dialog module was designed to work when OpenSIPS is used as a proxy, 
forwarding the requests, not as an endpoint, when it is used as a B2B. 
We do plan to work on integrating the two and make dialog module work 
also with b2b, but for the moment you have to rewrite the config.


Regards,

--
Anca Vamanu
OpenSIPS Developer



On 03/29/2011 03:07 PM, Антон Загорский wrote:

Hi Vlad,

Yes, I'm using dialog module with B2B top hiding scenario. In case of such 
problem, should I rewrite config to avoid using them together? This will not be 
easy...

Also, in a MySQL log I see exactly that requests with '?'...




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




-Original Message-
From: users-boun...@lists.opensips.org [mailto:users-
boun...@lists.opensips.org] On Behalf Of Vlad Paiu
Sent: Tuesday, March 29, 2011 3:53 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Dialog module - updating db

Hello,

The '?' sign is just a placeholder in the case of prepared statements.
When the query will be issued to the DB, all '?' signs will be replaced with the
appropriate values for the query.

The to_tag column in the dialog database is marked as NOT NULL because
dialogs are pushed to DB only after the 200 OK is received, so the To-Tag
value MUST have been learned by the dialog module. In your case though, it
seems that the To-Tag is empty, which is not valid from SIP point of view.
We saw a similar problem with someone who used b2b and dialog together.
Are you by any change using b2b too ?

Please try to capture the SIP traffic that triggers this OpenSIPS error in 
saving
dialog info to the DB back-end and check if the To-Tag is present in 200 OK
replies for the initial INVITE.

Regards,

--
Vlad Paiu
OpenSIPS Developer



On 03/29/2011 02:17 PM, Антон Загорский wrote:

Hello.

Sometimes I see in a log following lines:

[89566]: DBG:dialog:dialog_update_db: inserting new dialog 0x80417c568
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x731538
(tail=7530824) MC=0x72e9a8
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new

query=|insert into

dialog


(hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_c
o

ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)|
[89566]: INFO:db_mysql:re_init_statement:  query  is
(hash_entry,hash_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,calle
e_sock,start_time,caller_route_set,callee_route_set,caller_contact,callee_c
o

ntact,state,timeout,caller_cseq,callee_cseq,vars,profiles,script_flags )
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)>, ptr=0x0
[89566]: DBG:db_mysql:db_mysql_do_prepared_query: new

statement(0x7317c8) on

connection: (0x731538) 0x72e948


And that causes
[89566]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver

error

(1048): Column 'to_tag' cannot be null
[89566]: ERROR:dialog:dialog_update_db: could not add another dialog to

db


How can all values be '?' ?




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


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


Re: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS Project

2011-03-29 Thread Bogdan-Andrei Iancu

Hi,

First of all OpenSIPS is a sip server so it works only with SIP.

Secondly, by default opensips is SIP proxy, so it cannot do handover. 
But using the Back2Back User agent module, you may be able to play with 
the ongoing calls and move them between different termination points.


I can help you more if you could describe the handover scenario you need.

Regards,
Bogdan

ALICOMPUTECH wrote:

Hello
  Everyone
   I want to replace the Asterisk (being used as a SIP Server for 
registration, authentication and call routing) with OpenSIPS in OpenBTS 
project, as i am planning to have an Asterisk cluster for dedicated services 
and OpenSIPS will be forwarding the SIP calls to the cluster.

OpenBTS implements GSM Um air interface and emulate the Mobile handsets as the 
SIP endpoint and these handsets can be used as SIP extensions in a SIP-capable 
server.

I need to know the handoff and/or handover support in OpenSIPS as i am a newbie 
to this wonderful open source solution.

If there is any pointer and/or previously handoff/handover work done please 
share, it will then ease my work

thanks in advance

Best Regards

Bye





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

  



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] OpenSIPS/SIP over TLS

2011-03-29 Thread Bogdan-Andrei Iancu

Hi David,

David Chedid wrote:


I need to test the SIP over TLS using the OpenSIPS.

 

· I need to know what is the best stable version? so I can 
install it and start testing.



use 1.6.4:
   http://www.opensips.org/Resources/Downloads

· Do I need to generate certificate and install it from the 
client side?


Depends, if you configure opensips to require (at TLS level) a 
certificate from client side.


· Is there any sample of configuration file to use it?


See http://www.opensips.org/html/docs/tutorials/tls-1.4.x.html

Regards,
Bogdan


 

 


Thanks,

 


BR,



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



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 28th February 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS Project

2011-03-29 Thread Erik Dekkers
Probably you're looking for: 
http://www.opensips.org/Resources/DocsTutLoadbalancing
BTW, do you have OpenBTS running in a production environment?

Regards,

Erik

-Oorspronkelijk bericht-
Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Namens ALICOMPUTECH
Verzonden: dinsdag 29 maart 2011 13:35
Aan: users@lists.opensips.org
Onderwerp: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS 
Project

Hello
  Everyone
   I want to replace the Asterisk (being used as a SIP Server for 
registration, authentication and call routing) with OpenSIPS in OpenBTS 
project, as i am planning to have an Asterisk cluster for dedicated services 
and OpenSIPS will be forwarding the SIP calls to the cluster.

OpenBTS implements GSM Um air interface and emulate the Mobile handsets as the 
SIP endpoint and these handsets can be used as SIP extensions in a SIP-capable 
server.

I need to know the handoff and/or handover support in OpenSIPS as i am a newbie 
to this wonderful open source solution.

If there is any pointer and/or previously handoff/handover work done please 
share, it will then ease my work

thanks in advance

Best Regards

Bye





___
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] Reversed behaviour when setting up opensips with rtpproxy

2011-03-29 Thread Bogdan-Andrei Iancu

Hi Boris,

are you sure you properly  did the relation between the two interface in 
RTPproxy and the "i" and "e" flags in nathelper - maybe you simply 
swapped the interfaces (as meaning) between the definition in rtpproxy 
and usage in nathelper.


Regards,
Bogdan

Boris Ratner wrote:

Hi all!

Please tell me know if this behaviour is intentional:
Problem with proxying rtp:
UAC receives ip in the UAS' subnet while UAS receives the ip of UAC's
subnet of rtp proxy by default.


IP-Phone is on 10.200.10.195.

Network configuration:

ast1.local  <--->  opensips+rtpproxy <-> ast2.local
192.168.56.3   192.168.56.2/192.168.58.2   192.168.58.3
10.200.10.something
for ip phone.

SIP:
ast1 configured with outboundproxy .56.2
ast2 configured with outboundproxy .58.2
no ip routing is done on the ALG

OpenSIPS 1.6.4:
configured to rtpproxy_offer(); on INVITE
and to rtpproxy_answer(); on reply to it.

rtpproxy 1.2.1:
in bridge mode 192.168.56.2/192.168.58.2

SIP works fine:

Reliably Transmitting (no NAT) to 192.168.56.2:5060:
OPTIONS sip:ast2.local SIP/2.0
Via: SIP/2.0/UDP 192.168.56.3:5060;branch=z9hG4bK2a985f57;rport
From: "asterisk" ;tag=as7d368e85
To: 
Contact: 
Call-ID: 1a0cd5082af8bd525e2071c10edf2920@192.168.56.3
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 07 Mar 2011 21:54:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


<--- Transmitting (no NAT) to 192.168.58.2:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.58.2;branch=z9hG4bK5054.135a9ff1.0;received=192.168.58.2
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK2a985f57;rport=5060
Record-Route: 
Record-Route: 
From: "asterisk" ;tag=as7d368e85
To: ;tag=as63b00332
Call-ID: 1a0cd5082af8bd525e2071c10edf2920@192.168.56.3
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: 
Accept: application/sdp
Content-Length: 0

THE CALL: from ast1 to ast2


<>
-- Executing [565656@incoming:1] Dial("SIP/bratner-00a9",
"SIP/ast2/565656") in new stack
Audio is at 192.168.56.3 port 18922
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.56.2:5060:
INVITE sip:565656@ast2.local SIP/2.0
Via: SIP/2.0/UDP 192.168.56.3:5060;branch=z9hG4bK391f49a8;rport
From: "Extension 1001" ;tag=as6826385c
To: 
Contact: 
Call-ID: 2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 07 Mar 2011 21:58:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 287

v=0
o=root 19589 19589 IN IP4 192.168.56.3
s=session
c=IN IP4 192.168.56.3
t=0 0
m=audio 18922 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv



DBUG:handle_command: received command "U
2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3 192.168.56.3 18922
as6826385c;1"
INFO:handle_command: new session
2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3, tag as6826385c;1
requested, type strong
INFO:handle_command: BRAT: given remote address 192.168.56.3
INFO:create_twinlistener: BINDING TO 0.0.0.0
INFO:create_twinlistener: BINDING TO 0.0.0.0
INFO:handle_command: new session on a port 50026 created, tag as6826385c;1
INFO:handle_command: pre-filling caller's address with 192.168.56.3:18922
DBUG:doreply: sending reply "50026"




<--- SIP read from 192.168.58.2:5060 --->
INVITE sip:565656@ast2.local SIP/2.0
Record-Route: 
Record-Route: 
Via: SIP/2.0/UDP 192.168.58.2;branch=z9hG4bKc05.3917bd94.0
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK391f49a8;rport=5060
From: "Extension 1001" ;tag=as6826385c
To: 
Contact: 
Call-ID: 2d167b8f4108d4467ff3ea4e1cff7218@192.168.56.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 69
Date: Mon, 07 Mar 2011 21:58:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 305
P-hint: thehelldoiknow

v=0
o=root 19589 19589 IN IP4 192.168.56.3
s=session
c=IN IP4 192.168.56.2
t=0 0
m=audio 50026 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=nortpproxy:yes


<--- Reliably Transmitting (no NAT) to 192.168.58.2:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.58.2;branch=z9hG4bKc05.3917bd94.0;received=192.168.58.2
Via: SIP/2.0/UDP
192.168.56.3:5060;received=192.168.56.3;branch=z9hG4bK391f49a8;rport=5060
Record-Route: 
Record-Route: 
From: "Extension 1001" ;tag=as6826385c
To: ;tag=as112d0057
Call-ID: 2d167b8f4108d4467ff3

Re: [OpenSIPS-Users] drouting module with append_branch() and q-values

2011-03-29 Thread Bogdan-Andrei Iancu

Hi,

Another tricks:

1) you can read the pending destinations directly from AVPs, without 
calling the "use_next_gw()" function. See:

   http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id293166

2) as append_branch() does not accept variables as params, use the 
"$branch" variable to write into:

   http://www.opensips.org/Resources/DocsCoreVar16#toc15
   like:
  $branch = $var(x) ; #add a new SIP URI as extra branch
  $(branch(q)[-1])  =  10 ;  # set Q val for the last added brach


Regards,
Bogdan


Anca Vamanu wrote:

Hi thrillerbe,

I think that if you only want to build the list of selected 
destinations, you can just call use_next_gw and add the uri in RURI to 
a destination string ( because use_next_gw sets the RURI to the 
destination- 
http://www.opensips.org/html/docs/modules/devel/drouting.html#id251519).

It would be something like this:

if (do_routing("1","2")) 
{ 
if ($avp(s:dr_rules_attrs) == "2")

{
xlog("L_INFO","After 1, ds is $ru\n");  
$var(x) = 2;

$var(ds) = $ru;

while (use_next_gw())  
{  
$var(ds) = $var(ds) + "," + $ru;
xlog("L_INFO","After $var(x), ds is $var(ds)\n");   
$var(x) = $var(x) + 1;  
}  
}  
xlog("L_INFO","Destination set is $var(ds)\n"); 
}



Regards,
--
Anca Vamanu
OpenSIPS Developer


On 03/29/2011 01:00 AM, thrillerbee wrote:
I'm trying to get OpenSIPS to act as a REDIRECT server and have run 
into a couple issues. I'm using the drouting module to do lookups. 
Essentially, a dialed number could have potentially several routes, I 
want to return a 300 with these routes in the Contact header. Please 
tell me if this is foolish and/or there are better methods.


I'm running release version 1.6.4-2-notls.

With that, I've configured the following in my script:
if (do_routing("1","2")) 
{  
if ($avp(s:dr_rules_attrs) == "2")

{
xlog("L_INFO","After 1, ds is $ds\n");  
$var(x) = 2;
while (use_next_gw())  
{  
append_branch();
xlog("L_INFO","After $var(x), ds is $ds\n");   
$var(x) = $var(x) + 1;  
}  
}  
xlog("L_INFO","Destination set is $ds\n"); 
}


My relevant debug output is:
After 1, ds is Contact: sip:15552345678@1.1.1.1 
 
After 2, ds is Contact: *sip:2215552345678@2.2.2.2 
, sip:2215552345678@2.2.2.2 
* 
After 3, ds is Contact: *sip:5552345678@3.3.3.3 
*, sip:2215552345678@2.2.2.2 
, *sip:5552345678@3.3.3.3 
* 
After 4, ds is Contact: *sip:15552345678@5.5.5.5 
*, sip:2215552345678@2.2.2.2 
, sip:5552345678@3.3.3.3 
, *sip:15552345678@5.5.5.5 
* 
After 5, ds is Contact: *sip:4415552345678@4.4.4.4 
*, sip:2215552345678@2.2.2.2 
, sip:5552345678@3.3.3.3 
, sip:15552345678@5.5.5.5 
, *sip:4415552345678@4.4.4.4 
* 

It seems that append_branch() deletes the first entry in the 
destination set before adding the current RURI to the beginning and 
end. Is there an easier or more predictable way to write to the 
destination set?


Also, it seems the append_branch() function will not take variables 
or avps as parameters. Is there a known way of setting different 
q-values as a destination set is generated?  The below obviously 
doesn't work but should explain what I'm looking for:


var(q) = 90;
while (use_next_branch())
{
append_branch("$ru","$var(q)");
$var(q) = $var(q) - 10;
}

Thanks,
Ryan




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



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS Project

2011-03-29 Thread ALICOMPUTECH
Hello
 bundle of thanks for the reply,
i am sorry for not explaining the problem in a proper way, actually OpenBTS 
does not support handoff of calls and i want to control it via OpenSIPS
OpenBTS does not offer handoff between base stations during a call. Handoff 
between calls can be done using SIP registrations to a central Asterisk.
So i want to replace the asterisk for scalability and service isolation

""Probably you're looking for: 
http://www.opensips.org/Resources/DocsTutLoadbalancing"";
yes i need to implement loadbalancer  for Asterisk Cluster but i need to 
explore hanoffs of calls

""BTW, do you have OpenBTS running in a production environment""
and finally its a sort of research project and i need to implement it under the 
control of policies

thanks in advance

Best Regards

Bye 

- Original Message -
From: "Erik Dekkers" 
To: "ALICOMPUTECH" , "OpenSIPS users mailling list" 

Sent: Tuesday, March 29, 2011 2:45:28 PM GMT +01:00 Amsterdam / Berlin / Bern / 
Rome / Stockholm / Vienna
Subject: RE: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS 
Project

Probably you're looking for: 
http://www.opensips.org/Resources/DocsTutLoadbalancing
BTW, do you have OpenBTS running in a production environment?

Regards,

Erik

-Oorspronkelijk bericht-
Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Namens ALICOMPUTECH
Verzonden: dinsdag 29 maart 2011 13:35
Aan: users@lists.opensips.org
Onderwerp: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS 
Project

Hello
  Everyone
   I want to replace the Asterisk (being used as a SIP Server for 
registration, authentication and call routing) with OpenSIPS in OpenBTS 
project, as i am planning to have an Asterisk cluster for dedicated services 
and OpenSIPS will be forwarding the SIP calls to the cluster.

OpenBTS implements GSM Um air interface and emulate the Mobile handsets as the 
SIP endpoint and these handsets can be used as SIP extensions in a SIP-capable 
server.

I need to know the handoff and/or handover support in OpenSIPS as i am a newbie 
to this wonderful open source solution.

If there is any pointer and/or previously handoff/handover work done please 
share, it will then ease my work

thanks in advance

Best Regards

Bye





___
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] Wana replace Asterisk with OpenSIPS in OpenBTS Project

2011-03-29 Thread ALICOMPUTECH
Hi
  Bogdan
thanks for the prompt and quick reply
 i will be using Multi Criteria 
Decision Theory (MCDT) to take the handoff decision between base stations 
during a call

the possible scenario might be

e.g. if the Signal strength is not good enough in an OpenBTS cell and there is 
jitter above a predefined threshold value and and some other parameters 
involved (measured via dedicated OpenBTS python scripts) are crossing the 
threshold values then i will use (MCDT) to take the handoff decision. Remember 
that the endpoints are emulated as SIP User Agents(clients) using SIP extensions

sorry in advance if i once again did not describe my problem properly

Best Regards 

Bye

- Original Message -
From: "Bogdan-Andrei Iancu" 
To: "ALICOMPUTECH" , "OpenSIPS users mailling list" 

Sent: Tuesday, March 29, 2011 2:25:50 PM GMT +01:00 Amsterdam / Berlin / Bern / 
Rome / Stockholm / Vienna
Subject: Re: [OpenSIPS-Users] Wana replace Asterisk with OpenSIPS in OpenBTS 
Project

Hi,

First of all OpenSIPS is a sip server so it works only with SIP.

Secondly, by default opensips is SIP proxy, so it cannot do handover. 
But using the Back2Back User agent module, you may be able to play with 
the ongoing calls and move them between different termination points.

I can help you more if you could describe the handover scenario you need.

Regards,
Bogdan

ALICOMPUTECH wrote:
> Hello
>   Everyone
>I want to replace the Asterisk (being used as a SIP Server for 
> registration, authentication and call routing) with OpenSIPS in OpenBTS 
> project, as i am planning to have an Asterisk cluster for dedicated services 
> and OpenSIPS will be forwarding the SIP calls to the cluster.
>
> OpenBTS implements GSM Um air interface and emulate the Mobile handsets as 
> the SIP endpoint and these handsets can be used as SIP extensions in a 
> SIP-capable server.
>
> I need to know the handoff and/or handover support in OpenSIPS as i am a 
> newbie to this wonderful open source solution.
>
> If there is any pointer and/or previously handoff/handover work done please 
> share, it will then ease my work
>
> thanks in advance
>
> Best Regards
>
> Bye
>
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"



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


Re: [OpenSIPS-Users] dialog and accounting problem

2011-03-29 Thread Bogdan-Andrei Iancu

Hi Denis,

Indeed, the SIP capture looks like opensips is not matching the received 
BYE to the dialogThis is why the timeout is fired. But is strange, I 
do no see any obvious reason for the the matching to fail...


If you can reproduce this case, could you enable full debug in opensips 
(debug=4) in order to get more info regarding the BYE 
processing...Assuming that what you say is true - you get all 4 xlogs 
for the BYE.


Regards,
Bogdan


Denis Putyato wrote:


Hello

In SIP trace

1.1.1.1 – callee

2.2.2.2 – Opensips

3.3.3.3 – callee

I have Opensips 1.6.4-2.

….

modparam("dialog", "hash_size", 4096)

modparam("dialog", "log_profile_hash_size", 12)

modparam("dialog", "default_timeout", 1800)

modparam("dialog", "timeout_avp", "$avp(i:995)")

modparam("dialog", "dlg_match_mode", 1)

modparam("dialog", "db_mode", 1)

modparam("dialog", "db_url", "mysql://:@localhost/")

modparam("dialog", "profiles_with_value", 
"client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer")


modparam("dialog", "profiles_no_value", "callin;callout")

….

modparam("acc", "early_media", 0)

modparam("acc", "report_ack", 0)

modparam("acc", "report_cancels", 1)

modparam("acc", "detect_direction", 1)

modparam("acc", "db_flag", 15)

modparam("acc", "db_missed_flag", 16)

modparam("acc", "failed_transaction_flag", 17)

modparam("acc", "db_table_acc", "acc")

modparam("acc", "db_table_missed_calls", "acc")

…

modparam("acc", "cdr_flag", 22)

modparam("acc", "db_url", "mysql://:@localhost/")

modparam("acc", 
"db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si;


src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)")

…..

route {

if (is_method("BYE")) xlog("L_INFO", "….");

if (has_totag()) {

if (is_method("BYE")) xlog("L_INFO", "….");

record_route();

if (loose_route()) {

if (is_method("BYE")) xlog("L_INFO", "….");

if (!$DLG_status == NULL) {

if (is_method("BYE")) {

xlog("L_INFO", "….");

…

}

}

…

}

For accounting purposes I am using cdr_flag.

For the certain call, the SIP trace of which you can see in 
attachment, there is $avp(i:995) = . The call was successful, 
duration is about 50 s (if you see SIP trace). but in acc table I have 
a record with duration 10045. As you can see Opensips tries to finish 
the call by sending BYE to both callee and caller after timeout of 
$avp(i:995) expired although BYE from callee has been received before 
and has been successfully sent by Opensips to caller. And as I suppose 
Opensips for some reason didn’t indicate the end of call when received 
first BYE.


All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of 
Opensips.


Thank you for any help



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



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd May 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] radius_send_auth timeout

2011-03-29 Thread Bogdan-Andrei Iancu

Hi Dani,

See the radiusclient.conf  (conf of the libradiusclient lib) - relevant 
part:




# time to wait for a reply from the RADIUS server
radius_timeout  10

# resend request this many times before trying the next server
radius_retries  3



Regards,
Bogdan

Dani Popa wrote:

Hi all,

How can i change timeout for radius_send_auth ? It is possible ?

Dani

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




--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd May 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] dialog timeout_avp issue

2011-03-29 Thread Bogdan-Andrei Iancu

Hi Chris,

the avp_db_load() loads the value into avp(s:maxtime) as string value 
and you pass it as string to $avp(i:10).


The dialog module expects an integer value in the $avp(i:10) variable, 
so do:


If (is_method(“INVITE”)){

avp_db_load(“$ru”,”$avp(s:maxtime)”);

$avp(i:10)=$(avp(s:maxtime){s.int});

setflag(6);

}

Regards,
Bogdan

Chris Martineau wrote:


Hi,

Using timeout_avp option in dialog module for prepay call termination.

If I do the following it works fine...

If (is_method(“INVITE”)){

$avp(i:10)=120;

setflag(6);

}

Call terminates after 120seconds

If (is_method(“INVITE”)){

$var(a)=120;

$avp(i:10)=$var(a);

setflag(6);

}

Works...

If (is_method(“INVITE”)){

$avp(s:test)=120;

$avp(i:10)=$avp(s:test);

setflag(6);

}

Works...

If (is_method(“INVITE”)){

avp_db_load(“$ru”,”$avp(s:maxtime)”);

$avp(i:10)=$avp(s:maxtime);

setflag(6);

}

Doesn’t work. Maxtime being an attribute set in usr_preferences of type 0.

If I log the values $avp(i:10) and $avp(s:maxtime) the values have all 
been set correctly but the timeout just doesn’t happen. Looking at the 
dialog entry the timeout has just assumed the default_timeout value.


Any ideas?

Many thanks

Chris



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



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd May 2011
OpenSIPS solutions and "know-how"


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


Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread John Khvatov
Hello.

On 29.03.2011, at 14:14, Saúl Ibarra Corretgé wrote:

> On 29/3/11 11:42 AM, n...@uni-petrol.com wrote:
>> 
>> 
>> Because of media-relay running in openvz virtual container it inherit
>> kernel modules like ip_table, ip_conntrack, nfnetlink from host node, so
>> yesm ip_tables module like others loade before media-relay start.
>> Below is a list of running modules.
>> 
> 
> I haven't tried MediaProxy within a OpenVZ container, so I can't say how this 
> could affect MediaProxy, sorry.
> 
>> Unfortunately it is very hard to migrate to python > 2.4, because CentOS
>> < 6.0
>> don't support other versions and hard depend on python 2.4.
>> 
>> Now I'm trying install Scientific Linux 6.0 in openvz virtual environment
>> to test python 2.6.
>> 
> 
> We develop, test and deploy MediaProxy on Debian based non virtualized 
> systems so chances are that we'll not be able to help you if you run into 
> issues we didn't experience because we don't use such scenarios.
> 
> Many people are running MediaProxy on CentOS-like systems, but I can't recall 
> if anyone is using OpenVZ containers. You may want to test it in a standalone 
> machine first, and once you get it working you can put it in the container 
> and test again.

I tried media-relay within a OpenVz container. As far as I can remember, I got 
same exceptions during call establishing:

> mediaproxy.interfaces.system._conntrack.Error: Table does not exist (do you 
> need to insmod?)"


OS: debian/ubuntu (2.6.26-2-openvz-amd64), python: 2.6.

I think that this is openvz-related problem.

I use media-relay on hardware machine now, but it would be nice to have ability 
deploy media-relay in virtual machine.

-- 
WBR, John Khvatov


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


Re: [OpenSIPS-Users] media-relay exception

2011-03-29 Thread Saúl Ibarra Corretgé

Hi,

Thanks for sharing your experience!


I tried media-relay within a OpenVz container. As far as I can remember, I got 
same exceptions during call establishing:


mediaproxy.interfaces.system._conntrack.Error: Table does not exist (do you need to 
insmod?)"



OS: debian/ubuntu (2.6.26-2-openvz-amd64), python: 2.6.

I think that this is openvz-related problem.



IIRC in openvz all virtual machines share the same kernel, so maybe some 
access to kernel stuff is restricted / needs to be done in a different 
way. Depending on how containers are isolated (i don't know how tis is 
done in openvz) you would see all contrack rules (not only the ones 
inserted by you), for example. I guess this is a bit tricky.



I use media-relay on hardware machine now, but it would be nice to have ability 
deploy media-relay in virtual machine.



It should work out of the box if you run it using full-virtualization 
with KVM or Xen :-)



Regards,

--
Saúl Ibarra Corretgé
AG Projects

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


Re: [OpenSIPS-Users] drouting module with append_branch() and q-values

2011-03-29 Thread thrillerbee
Bogdan,

When I configure:
$(branch(uri)[0]) = $ru;
$(branch(q)[0]) = 100;
xlog("L_INFO","branch 0 = $(branch(uri)[0]) with q-value
$(branch(q)[0])\n");

I get this debug:
ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
[0/0]
ERROR:core:do_assign: setting PV failed
ERROR:core:do_assign: error at line: 163
ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
[0/0]
ERROR:core:do_assign: setting PV failed
ERROR:core:do_assign: error at line: 164
branch 0 =  with q-value 

Thanks,
Ryan


On Tue, Mar 29, 2011 at 8:19 AM, Bogdan-Andrei Iancu wrote:

> Hi,
>
> Another tricks:
>
> 1) you can read the pending destinations directly from AVPs, without
> calling the "use_next_gw()" function. See:
>   http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id293166
>
> 2) as append_branch() does not accept variables as params, use the
> "$branch" variable to write into:
>   http://www.opensips.org/Resources/DocsCoreVar16#toc15
>   like:
>  $branch = $var(x) ; #add a new SIP URI as extra branch
>  $(branch(q)[-1])  =  10 ;  # set Q val for the last added brach
>
>
> Regards,
> Bogdan
>
>
> Anca Vamanu wrote:
>
>> Hi thrillerbe,
>>
>> I think that if you only want to build the list of selected destinations,
>> you can just call use_next_gw and add the uri in RURI to a destination
>> string ( because use_next_gw sets the RURI to the destination-
>> http://www.opensips.org/html/docs/modules/devel/drouting.html#id251519).
>> It would be something like this:
>>
>> if (do_routing("1","2")) { if ($avp(s:dr_rules_attrs) == "2")
>>{
>>xlog("L_INFO","After 1, ds is $ru\n");  $var(x) = 2;
>>$var(ds) = $ru;
>>
>>while (use_next_gw())  {  $var(ds) = $var(ds) +
>> "," + $ru;
>>xlog("L_INFO","After $var(x), ds is $var(ds)\n");
>> $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination set
>> is $var(ds)\n"); }
>>
>>
>> Regards,
>> --
>> Anca Vamanu
>> OpenSIPS Developer
>>
>>
>> On 03/29/2011 01:00 AM, thrillerbee wrote:
>>
>>> I'm trying to get OpenSIPS to act as a REDIRECT server and have run into
>>> a couple issues. I'm using the drouting module to do lookups. Essentially, a
>>> dialed number could have potentially several routes, I want to return a 300
>>> with these routes in the Contact header. Please tell me if this is foolish
>>> and/or there are better methods.
>>>
>>> I'm running release version 1.6.4-2-notls.
>>>
>>> With that, I've configured the following in my script:
>>> if (do_routing("1","2")) {  if ($avp(s:dr_rules_attrs) == "2")
>>>{
>>>xlog("L_INFO","After 1, ds is $ds\n");  $var(x) = 2;
>>>while (use_next_gw())  {  append_branch();
>>>xlog("L_INFO","After $var(x), ds is $ds\n");
>>> $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination set
>>> is $ds\n"); }
>>>
>>> My relevant debug output is:
>>> After 1, ds is Contact: sip:15552345678@1.1.1.1 >> sip%3A15552345678@1.1.1.1> After 2, ds is Contact: *
>>> sip:2215552345678@2.2.2.2 ,
>>> sip:2215552345678@2.2.2.2 * After 3,
>>> ds is Contact: *sip:5552345678@3.3.3.3 *,
>>> sip:2215552345678@2.2.2.2 , *
>>> sip:5552345678@3.3.3.3 * After 4, ds is
>>> Contact: *sip:15552345678@5.5.5.5 *,
>>> sip:2215552345678@2.2.2.2 ,
>>> sip:5552345678@3.3.3.3 , *
>>> sip:15552345678@5.5.5.5 * After 5, ds
>>> is Contact: *sip:4415552345678@4.4.4.4 >> sip%3A4415552345678@4.4.4.4>*, sip:2215552345678@2.2.2.2 >> sip%3A2215552345678@2.2.2.2>, sip:5552345678@3.3.3.3 >> sip%3A5552345678@3.3.3.3>, sip:15552345678@5.5.5.5 >> sip%3A15552345678@5.5.5.5>, *sip:4415552345678@4.4.4.4 >> sip%3A4415552345678@4.4.4.4>*
>>> It seems that append_branch() deletes the first entry in the destination
>>> set before adding the current RURI to the beginning and end. Is there an
>>> easier or more predictable way to write to the destination set?
>>>
>>> Also, it seems the append_branch() function will not take variables or
>>> avps as parameters. Is there a known way of setting different q-values as a
>>> destination set is generated?  The below obviously doesn't work but should
>>> explain what I'm looking for:
>>>
>>> var(q) = 90;
>>> while (use_next_branch())
>>> {
>>>append_branch("$ru","$var(q)");
>>>$var(q) = $var(q) - 10;
>>> }
>>>
>>> Thanks,
>>> Ryan
>>>
>>>  
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS eBootcamp - 2n

[OpenSIPS-Users] Proxying Presence?

2011-03-29 Thread Stephen Bowman
Need some guidance on how presence should be configured.

Our setup consists of two SIP registrars with opensips in between them (mainly 
for codec manipulation purposes).

I'm trying to get presence to work.  I see SUBSCRIBE messages coming from both 
SIP registrars, but I don't see that they are "proxied" or "routed" to the 
other SIP registrar.

Example:

foo.com <--> opensips <--> bar.com

In opensips, I'm seeing a SUBSCRIBE from us...@foo.com to us...@bar.com.  But 
opensips doesn't forward it on to bar.com to get a response.

Is this the correct way to approach this?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] drouting module with append_branch() and q-values

2011-03-29 Thread thrillerbee
Bogdan,

Nevermind on that issue; I neglected to notice that I had to create the
branch with append_branch() before setting anything.

Thanks for the help.
Ryan


On Tue, Mar 29, 2011 at 9:52 AM, thrillerbee  wrote:

> Bogdan,
>
> When I configure:
> $(branch(uri)[0]) = $ru;
> $(branch(q)[0]) = 100;
> xlog("L_INFO","branch 0 = $(branch(uri)[0]) with q-value
> $(branch(q)[0])\n");
>
> I get this debug:
> ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
> [0/0]
> ERROR:core:do_assign: setting PV failed
> ERROR:core:do_assign: error at line: 163
> ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
> [0/0]
> ERROR:core:do_assign: setting PV failed
> ERROR:core:do_assign: error at line: 164
> branch 0 =  with q-value 
>
> Thanks,
> Ryan
>
>
> On Tue, Mar 29, 2011 at 8:19 AM, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi,
>>
>> Another tricks:
>>
>> 1) you can read the pending destinations directly from AVPs, without
>> calling the "use_next_gw()" function. See:
>>   http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id293166
>>
>> 2) as append_branch() does not accept variables as params, use the
>> "$branch" variable to write into:
>>   http://www.opensips.org/Resources/DocsCoreVar16#toc15
>>   like:
>>  $branch = $var(x) ; #add a new SIP URI as extra branch
>>  $(branch(q)[-1])  =  10 ;  # set Q val for the last added brach
>>
>>
>> Regards,
>> Bogdan
>>
>>
>> Anca Vamanu wrote:
>>
>>> Hi thrillerbe,
>>>
>>> I think that if you only want to build the list of selected destinations,
>>> you can just call use_next_gw and add the uri in RURI to a destination
>>> string ( because use_next_gw sets the RURI to the destination-
>>> http://www.opensips.org/html/docs/modules/devel/drouting.html#id251519).
>>> It would be something like this:
>>>
>>> if (do_routing("1","2")) { if ($avp(s:dr_rules_attrs) == "2")
>>>{
>>>xlog("L_INFO","After 1, ds is $ru\n");  $var(x) = 2;
>>>$var(ds) = $ru;
>>>
>>>while (use_next_gw())  {  $var(ds) = $var(ds)
>>> + "," + $ru;
>>>xlog("L_INFO","After $var(x), ds is $var(ds)\n");
>>>   $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination
>>> set is $var(ds)\n"); }
>>>
>>>
>>> Regards,
>>> --
>>> Anca Vamanu
>>> OpenSIPS Developer
>>>
>>>
>>> On 03/29/2011 01:00 AM, thrillerbee wrote:
>>>
 I'm trying to get OpenSIPS to act as a REDIRECT server and have run into
 a couple issues. I'm using the drouting module to do lookups. Essentially, 
 a
 dialed number could have potentially several routes, I want to return a 300
 with these routes in the Contact header. Please tell me if this is foolish
 and/or there are better methods.

 I'm running release version 1.6.4-2-notls.

 With that, I've configured the following in my script:
 if (do_routing("1","2")) {  if ($avp(s:dr_rules_attrs) == "2")
{
xlog("L_INFO","After 1, ds is $ds\n");  $var(x) = 2;
while (use_next_gw())  {  append_branch();
xlog("L_INFO","After $var(x), ds is $ds\n");
 $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination 
 set
 is $ds\n"); }

 My relevant debug output is:
 After 1, ds is Contact: sip:15552345678@1.1.1.1 >>> sip%3A15552345678@1.1.1.1> After 2, ds is Contact: *
 sip:2215552345678@2.2.2.2 ,
 sip:2215552345678@2.2.2.2 * After
 3, ds is Contact: *sip:5552345678@3.3.3.3 >>> sip%3A5552345678@3.3.3.3>*, sip:2215552345678@2.2.2.2 >>> sip%3A2215552345678@2.2.2.2>, *sip:5552345678@3.3.3.3 >>> sip%3A5552345678@3.3.3.3>* After 4, ds is Contact: *
 sip:15552345678@5.5.5.5 *,
 sip:2215552345678@2.2.2.2 ,
 sip:5552345678@3.3.3.3 , *
 sip:15552345678@5.5.5.5 * After 5, ds
 is Contact: *sip:4415552345678@4.4.4.4 >>> sip%3A4415552345678@4.4.4.4>*, sip:2215552345678@2.2.2.2 >>> sip%3A2215552345678@2.2.2.2>, sip:5552345678@3.3.3.3 >>> sip%3A5552345678@3.3.3.3>, sip:15552345678@5.5.5.5 >>> sip%3A15552345678@5.5.5.5>, *sip:4415552345678@4.4.4.4 >>> sip%3A4415552345678@4.4.4.4>*
  It seems that append_branch() deletes the first entry in the
 destination set before adding the current RURI to the beginning and end. Is
 there an easier or more predictable way to write to the destination set?

 Also, it seems the append_branch() function will not take variables or
 avps as parameters. Is there a known way of setting different q-values as a
 destination set is generated?  The below obviously doesn't work but should
 explain what I'm looking for:

 var(q) = 90;
 while (use_next_branch())
 {
append_branch("$ru","$var(q)");
$var(q)

Re: [OpenSIPS-Users] drouting module with append_branch() and q-values

2011-03-29 Thread thrillerbee
Hopefully my last question:

Using append_branch() and $branch allows me to add all destinations as
branches with q-values. However, I am unable to remove/edit the initial
entry in $ds as set by do_routing():

Contact: *sip:15552345678@1.1.1.1, *;q=1, <
sip:2215552345678@2.2.2.2>;q=0.9, ;q=0.85, <
sip:15552345678@5.5.5.5>;q=0.8, ;q=0.75

Is there a way to prevent do_routing from adding that entry and/or remove it
after it has been added? OR is there a way to add a q-value to that
instance?

Thanks,
Ryan

On Tue, Mar 29, 2011 at 10:51 AM, thrillerbee  wrote:

> Bogdan,
>
> Nevermind on that issue; I neglected to notice that I had to create the
> branch with append_branch() before setting anything.
>
> Thanks for the help.
> Ryan
>
>
> On Tue, Mar 29, 2011 at 9:52 AM, thrillerbee wrote:
>
>> Bogdan,
>>
>> When I configure:
>> $(branch(uri)[0]) = $ru;
>> $(branch(q)[0]) = 100;
>> xlog("L_INFO","branch 0 = $(branch(uri)[0]) with q-value
>> $(branch(q)[0])\n");
>>
>> I get this debug:
>> ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
>> [0/0]
>> ERROR:core:do_assign: setting PV failed
>> ERROR:core:do_assign: error at line: 163
>> ERROR:core:pv_set_branch_fields: SCRIPT BUG - inexisting branch assigment
>> [0/0]
>> ERROR:core:do_assign: setting PV failed
>> ERROR:core:do_assign: error at line: 164
>> branch 0 =  with q-value 
>>
>> Thanks,
>> Ryan
>>
>>
>> On Tue, Mar 29, 2011 at 8:19 AM, Bogdan-Andrei Iancu > > wrote:
>>
>>> Hi,
>>>
>>> Another tricks:
>>>
>>> 1) you can read the pending destinations directly from AVPs, without
>>> calling the "use_next_gw()" function. See:
>>>   http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id293166
>>>
>>> 2) as append_branch() does not accept variables as params, use the
>>> "$branch" variable to write into:
>>>   http://www.opensips.org/Resources/DocsCoreVar16#toc15
>>>   like:
>>>  $branch = $var(x) ; #add a new SIP URI as extra branch
>>>  $(branch(q)[-1])  =  10 ;  # set Q val for the last added brach
>>>
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> Anca Vamanu wrote:
>>>
 Hi thrillerbe,

 I think that if you only want to build the list of selected
 destinations, you can just call use_next_gw and add the uri in RURI to a
 destination string ( because use_next_gw sets the RURI to the destination-
 http://www.opensips.org/html/docs/modules/devel/drouting.html#id251519
 ).
 It would be something like this:

 if (do_routing("1","2")) { if ($avp(s:dr_rules_attrs) == "2")
{
xlog("L_INFO","After 1, ds is $ru\n");  $var(x) = 2;
$var(ds) = $ru;

while (use_next_gw())  {  $var(ds) = $var(ds)
 + "," + $ru;
xlog("L_INFO","After $var(x), ds is $var(ds)\n");
   $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination
 set is $var(ds)\n"); }


 Regards,
 --
 Anca Vamanu
 OpenSIPS Developer


 On 03/29/2011 01:00 AM, thrillerbee wrote:

> I'm trying to get OpenSIPS to act as a REDIRECT server and have run
> into a couple issues. I'm using the drouting module to do lookups.
> Essentially, a dialed number could have potentially several routes, I want
> to return a 300 with these routes in the Contact header. Please tell me if
> this is foolish and/or there are better methods.
>
> I'm running release version 1.6.4-2-notls.
>
> With that, I've configured the following in my script:
> if (do_routing("1","2")) {  if ($avp(s:dr_rules_attrs) == "2")
>{
>xlog("L_INFO","After 1, ds is $ds\n");  $var(x) = 2;
>while (use_next_gw())  {  append_branch();
>xlog("L_INFO","After $var(x), ds is $ds\n");
> $var(x) = $var(x) + 1;  }  }  xlog("L_INFO","Destination 
> set
> is $ds\n"); }
>
> My relevant debug output is:
> After 1, ds is Contact: sip:15552345678@1.1.1.1  sip%3A15552345678@1.1.1.1> After 2, ds is Contact: *
> sip:2215552345678@2.2.2.2 ,
> sip:2215552345678@2.2.2.2 * After
> 3, ds is Contact: *sip:5552345678@3.3.3.3  sip%3A5552345678@3.3.3.3>*, sip:2215552345678@2.2.2.2  sip%3A2215552345678@2.2.2.2>, *sip:5552345678@3.3.3.3  sip%3A5552345678@3.3.3.3>* After 4, ds is Contact: *
> sip:15552345678@5.5.5.5 *,
> sip:2215552345678@2.2.2.2 ,
> sip:5552345678@3.3.3.3 , *
> sip:15552345678@5.5.5.5 * After 5,
> ds is Contact: *sip:4415552345678@4.4.4.4  sip%3A4415552345678@4.4.4.4>*, sip:2215552345678@2.2.2.2  sip%3A2215552345678@2.2.2.2>, sip:5552345678@3.3.3.3  sip%3A5552345678@3.3.3.3>, sip:15552345678@5.5.5.5  sip%3A155523456

Re: [OpenSIPS-Users] inconsistence nathelper behavior

2011-03-29 Thread Leon Li
Hi Razvan,

 

I've turned on DBUG, although not many output in syslog.

 

Mar 29 22:12:05 /usr/sbin/opensips[9336]: INVITE Received - 
RURI=sip:x

Mar 29 22:12:05 /usr/sbin/opensips[9336]: Alias Found, New 
RURI=

Mar 29 22:12:05 /usr/sbin/opensips[9336]: ERROR:nathelper:force_rtp_proxy: 
Unable to parse body

Mar 29 22:12:05 /usr/sbin/opensips[9336]: new branch at 
sip:xx@192.168.1.112:19463;user=phone

Mar 29 22:12:05 /usr/sbin/opensips[9321]: incoming reply

Mar 29 22:12:05 /usr/sbin/opensips[9325]: incoming reply

Mar 29 22:12:07 /usr/sbin/opensips[9323]: incoming reply

Mar 29 22:12:07 /usr/sbin/opensips[9323]: ERROR:nathelper:force_rtp_proxy_body: 
incorrect port 0 in reply from rtp proxy

Mar 29 22:12:07 rtpproxy[11501]: INFO:handle_command: lookup request failed: 
session 9332ee00-d9215935-5a7d0-22cf9eca@Public IP, tags 
7d81dea5-6b91-4499-b7a2-77dff783a179-43141483;1/1219087299;1 not found

Mar 29 22:12:07 /usr/sbin/opensips[9323]: ACC: transaction answered: 
timestamp=1301436727;method=INVITE;from_tag=7d81dea5-6b91-4499-b7a2-77dff783a179-43141483;to_tag=1219087299;call_id=9332ee00-d9215935-5a7d0-22cf9eca@202.158.207.34;code=200;reason=OK

Mar 29 22:12:07 /usr/sbin/opensips[9336]: Method ACK from NATed UA - 
RURI=sip:xx;user=phone;nat=yes F=sip:xx T=sip:@202.158.196.132 
C=

Mar 29 22:12:07 /usr/sbin/opensips[9336]: ACC: request acknowledged: 
timestamp=1301436727;method=ACK;from_tag=7d81dea5-6b91-4499-b7a2-77dff783a179-43141483;to_tag=1219087299;call_id=9332ee00-d9215935-5a7d0-22cf9eca@202.158.207.34;code=200;reason=OK

Mar 29 22:12:15 /usr/sbin/opensips[9323]: INFO:core:parse_first_line: empty  or 
bad first line

Mar 29 22:12:15 /usr/sbin/opensips[9323]: INFO:core:parse_first_line: bad 
message

Mar 29 22:12:15 /usr/sbin/opensips[9323]: ERROR:core:parse_msg: message=<>

Mar 29 22:12:15 /usr/sbin/opensips[9323]: ERROR:core:receive_msg: parse_msg 
failed

Mar 29 22:12:34 rtpproxy[11501]: INFO:handle_command: delete request failed: 
session 9332ee00-d9215935-5a7d0-22cf9eca@202.158.207.34, tags 
7d81dea5-6b91-4499-b7a2-77dff783a179-43141483/1219087299 not found

 

However, a successful call (i.e. from NATed to public) has much more output, 
like below.

 

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: new session 
825186551-1946...@bjc.bgi.b.bbc, tag 1615321429;1 requested, type strong

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: new session on a port 
64286 created, tag 1615321429;1

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: pre-filling caller's 
address with Public IP of ADSL:45020

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: new session 
825186551-1946...@bjc.bgi.b.bbc, tag 1615321429;2 requested, type strong

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: new session on a port 
37262 created, tag 1615321429;2

Mar 29 22:22:23 rtpproxy[11548]: INFO:handle_command: pre-filling caller's 
address with Public IP of ADSL:23420

 

BTW, I am running opensips v1.6.2 and rtpproxy version 

/usr/bin/rtpproxy -v

Basic version: 20040107

Extension 20050322: Support for multiple RTP streams and MOH

Extension 20060704: Support for extra parameter in the V command

Extension 20071116: Support for RTP re-packetization

Extension 20071218: Support for forking (copying) RTP stream

Extension 20080403: Support for RTP statistics querying

Extension 20081102: Support for setting codecs in the update/lookup command

Extension 20081224: Support for session timeout notifications

 

Thanks,

Leon

 

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Friday, 25 March 2011 8:25 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] inconsistence nathelper behavior

 

Hi Leon,

You should run rtpproxy with '-d DBUG'. You can find the logs in 
/var/log/syslog.

Regards,
Razvan

On 03/25/2011 06:58 AM, Leon Li wrote: 

Thanks Razvan for your reply,

 

Could you kindly instruct me how to turn on debug level for rtpproxy?

 

Regards,

Leon 

 

 

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Friday, 25 March 2011 1:07 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] inconsistence nathelper behavior

 

Hello Leon,

As you can see, OpenSIPS receives an invalid port from RTPProxy, so the problem 
seems to be there. Can you please set a lower debug level for RTPProxy and 
paste me the log for this call?

Regards,
Razvan

On 03/24/2011 02:35 AM, Leon Li wrote: 

Hello all,

 

I've got a problem of one way voice when making a call from a public side to 
private side, where the callee on private side can't hear caller from public 
side. However, if the call is initialled from private side, everything is fine.

 

Here is my topology. 

 

EP1 (public IP) à Cisco CUCM (public IP) à OpenSIPs (public IP with rtpproxy) ß 
Home router (NATed) ß EP2 (private IP).

Re: [OpenSIPS-Users] dialog and accounting problem

2011-03-29 Thread Denis Putyato
Hello Bogdan

I have a lot of calls through Opensips. I found such call accidentally by 
looking another problem calls which has expired dialogs.
I will try to use debug 4 but I want pay your attention to fourth xlog. This 
xlog appear only when condition if (!$DLG_status == NULL) is true.
I see this xlog in log file, so Opensips as I understand, matched BYE to the 
dialog. 


-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, March 29, 2011 6:01 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] dialog and accounting problem

Hi Denis,

Indeed, the SIP capture looks like opensips is not matching the received 
BYE to the dialogThis is why the timeout is fired. But is strange, I 
do no see any obvious reason for the the matching to fail...

If you can reproduce this case, could you enable full debug in opensips 
(debug=4) in order to get more info regarding the BYE 
processing...Assuming that what you say is true - you get all 4 xlogs 
for the BYE.

Regards,
Bogdan


Denis Putyato wrote:
>
> Hello
>
> In SIP trace
>
> 1.1.1.1 – callee
>
> 2.2.2.2 – Opensips
>
> 3.3.3.3 – callee
>
> I have Opensips 1.6.4-2.
>
> ….
>
> modparam("dialog", "hash_size", 4096)
>
> modparam("dialog", "log_profile_hash_size", 12)
>
> modparam("dialog", "default_timeout", 1800)
>
> modparam("dialog", "timeout_avp", "$avp(i:995)")
>
> modparam("dialog", "dlg_match_mode", 1)
>
> modparam("dialog", "db_mode", 1)
>
> modparam("dialog", "db_url", "mysql://:@localhost/")
>
> modparam("dialog", "profiles_with_value", 
> "client;tgrp;tgrpin;tgrpout;answer;outdir;outdiranswer")
>
> modparam("dialog", "profiles_no_value", "callin;callout")
>
> ….
>
> modparam("acc", "early_media", 0)
>
> modparam("acc", "report_ack", 0)
>
> modparam("acc", "report_cancels", 1)
>
> modparam("acc", "detect_direction", 1)
>
> modparam("acc", "db_flag", 15)
>
> modparam("acc", "db_missed_flag", 16)
>
> modparam("acc", "failed_transaction_flag", 17)
>
> modparam("acc", "db_table_acc", "acc")
>
> modparam("acc", "db_table_missed_calls", "acc")
>
> …
>
> modparam("acc", "cdr_flag", 22)
>
> modparam("acc", "db_url", "mysql://:@localhost/")
>
> modparam("acc", 
> "db_extra","src_in=$avp(i:600);src_user=$avp(i:500);src_domain=$si;
>
> src_out=$avp(i:30);dst_in=$avp(s:dstin);dst_user=$avp(s:callee);dst_out=$avp(s:out);dst_domain=$avp(s:domain)")
>
> …..
>
> route {
>
> if (is_method("BYE")) xlog("L_INFO", "….");
>
> if (has_totag()) {
>
> if (is_method("BYE")) xlog("L_INFO", "….");
>
> record_route();
>
> if (loose_route()) {
>
> if (is_method("BYE")) xlog("L_INFO", "….");
>
> if (!$DLG_status == NULL) {
>
> if (is_method("BYE")) {
>
> xlog("L_INFO", "….");
>
> …
>
> }
>
> }
>
> …
>
> }
>
> For accounting purposes I am using cdr_flag.
>
> For the certain call, the SIP trace of which you can see in 
> attachment, there is $avp(i:995) = . The call was successful, 
> duration is about 50 s (if you see SIP trace). but in acc table I have 
> a record with duration 10045. As you can see Opensips tries to finish 
> the call by sending BYE to both callee and caller after timeout of 
> $avp(i:995) expired although BYE from callee has been received before 
> and has been successfully sent by Opensips to caller. And as I suppose 
> Opensips for some reason didn’t indicate the end of call when received 
> first BYE.
>
> All 4 xlog("L_INFO", "…."); for the first BYE I can see in log file of 
> Opensips.
>
> Thank you for any help
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd May 2011
OpenSIPS solutions and "know-how"


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


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


[OpenSIPS-Users] Configure OpenSips to work with Express talk

2011-03-29 Thread Adil Mohamedali
Hi,

Need help to configure express talk to work with opensips.
I have installed opensips on rhel5 and it is running. and also added an user
2000.
But when trying to connect using express talk with the same user and
password, it is not working and shows server did not respond.
Please help.

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