[OpenSIPS-Users] openSips - Asterisk and Session Timers: ACK is sent to 192.168.1.10

2010-10-22 Thread    
Hi,

My setup:
- 11.22.33.44 : openSIPS 1.6.3
- 11.22.33.45 : one of the Asterisk 1.6.2.13 servers
- 88.77.66.55 : my public ip-address
- 192.168.1.10 : my local ip-address (NAT)

All is working well except Session Timers where the Re-Invite originates from 
Asterisk.

I have a SIP trace ( http://pastebin.com/raw.php?i=NRDdaktn ) of a call 
initiated by a softphone on my pc (192.168.1.10).
When Asterisk sends the Re-Invite (line 290) my softphone receives this 
Re-Invite correctly.
The 100 Trying and 200 OK are also handled as it should.
But on line 455 you see openSIPS forwarding the ACK to 192.168.1.10 instead of 
88.77.66.55.

Does anyone know why this isn't working?
Thanks in advance!



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


[OpenSIPS-Users] load_balance debugging

2010-10-22 Thread Alexandr A. Alexandrov
Hi!

I have a strange problem with trying to use avps in load_balance function.

I'm trying to do balancing like this:

 avp_db_query(select phone, resource from phone_resource where 
phone like '%$fU%', $avp(i:111);$avp(i:112));
 avp_print();
 xlog(L_INFO,$fu = $avp(i:111));
 if ($fu=~$avp(i:111)) {
 xlog(L_INFO, AAA detected!\n);
 load_balance(1, $avp(i:112));

Here is what I get in logs:

Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
INFO:avpops:ops_print_avp: #011#011#011id=112
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
INFO:avpops:ops_print_avp: #011#011#011val_str=aaa / 3
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
INFO:avpops:ops_print_avp: p=0x7f73f6b251e8, flags=0x0002
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
INFO:avpops:ops_print_avp: #011#011#011id=111
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
INFO:avpops:ops_print_avp: #011#011#011val_str=1234565677 / 10
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
sip:1234565...@xx.xxx.xxx.xxx;user=phone = 1234565677
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: AAA detected!
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
ERROR:load_balancer:do_load_balance: unknown resource in input string
Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: 
DBG:core:comp_scriptvar: int 26 : -1 / 0

If I write the resource directly, like
 load_balance(1, aaa);
everything works fine.
In the above log you can see that $avp(i:112) contains exactly the same 
resource string.
What is the correct way to do this, or is there a way to debug how load 
balancer searches for resources defined in database?

Thanks in advance,
Alexandr A. Alexandrov

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


[OpenSIPS-Users] Problem creating Registrar database for OpenSIPS with PostgreSQL

2010-10-22 Thread David Santiago
Hello,

I have successfully compiled and installed OpenSIPS 1.6.3 (no tls) with the
PostgreSQL module for an OpenSIPS Registrar testing installation.

I have edited the *opensipsctlrc* file to specify the connection details for
a remote PostgreSQL database server I want to use as the persistence store
for an OpenSIPS Registrar  installation. I have set the hostname, database
name, usernames and passwords.

Nevertheless, when executing the *opensipsdbctl* command, I get the
following error:

-e \E[37;31mERROR: ~./pgpass does not exist, please create this file and
support proper credentials for user postgres.
-e \E[37;31mERROR: Note: you need at least postgresql= 7.3

Any ideas?


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


Re: [OpenSIPS-Users] opensips tm timer core dump

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Kennard,

I suppose the bt is the same ? do you still have the core file ?

Regards,
Bogdan

kennard_wh...@logitech.com wrote:

 Hi Bodgen,

 I replicated the error. Unfortunately the entire insert_timer_unsafe 
 and been in-lined and little is available:

 Program terminated with signal 11, Segmentation fault.
 #0 0x7f8b8356c2c2 in insert_timer_unsafe (new_tl=0x7f8b7a54e310,
 list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at timer.c:731
 731 timer.c: No such file or directory.
 in timer.c
 (gdb) print tl
 $1 = value optimized out
 (gdb) print *tl
 Cannot access memory at address 0x0
 (gdb) print ptr
 $2 = value optimized out
 (gdb) print *ptr
 Cannot access memory at address 0x0
 (gdb) print *new_tl
 No symbol new_tl in current context.
 (gdb) up
 #1 set_1timer (new_tl=0x7f8b7a54e310, list_id=WT_TIMER_LIST,
 ext_timeout=value optimized out) at timer.c:904
 904 in timer.c
 (gdb) print *new_tl
 $3 = {next_tl = 0x0, prev_tl = 0x0, ld_tl = 0x0, time_out = 0,
 timer_list = 0x0, deleted = 0}
 (gdb) print list
 $4 = value optimized out
 (gdb) print timeout
 $5 = 32
 (gdb) print new_tl
 $6 = (struct timer_link *) 0x7f8b7a54e310

 I'll keep the core for a while -- please let me know if there is 
 anything else I can try.

 Thanks,
 Kennard

 Inactive hide details for Bogdan-Andrei Iancu ---10/08/2010 04:40:47 
 AM---Hi Kennard, Ok, keep the core next time :)Bogdan-Andrei Iancu 
 ---10/08/2010 04:40:47 AM---Hi Kennard, Ok, keep the core next time :)

 From: Bogdan-Andrei Iancu bog...@voice-system.ro
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: 10/08/2010 04:40 AM
 Subject: Re: [OpenSIPS-Users] opensips tm timer core dump
 Sent by: users-boun...@lists.opensips.org

 



 Hi Kennard,

 Ok, keep the core next time :)

 Regards,
 Bogdan

 kennard_wh...@logitech.com wrote:
 
  Hi Bogden,
 
  Thanks for explaining the child processes involved -- I misunderstood
  what was happening.
 
  Unfortunately, I don't have the core anymore. My recollection is that
  I couldn't print anything useful due to compiler optimization. That
  said, this should re-create pretty easily, and I'll get more dumps
  next time it happens.
 
  Regards,
  Kennard
 
  Inactive hide details for Bogdan-Andrei Iancu ---10/05/2010 01:41:38
  AM---Hi Kennard, The core was generated by process 22255:Bogdan-Andrei
  Iancu ---10/05/2010 01:41:38 AM---Hi Kennard, The core was generated
  by process 22255:
 
  From: Bogdan-Andrei Iancu bog...@voice-system.ro
  To: OpenSIPS users mailling list users@lists.opensips.org
  Date: 10/05/2010 01:41 AM
  Subject: Re: [OpenSIPS-Users] opensips tm timer core dump
  Sent by: users-boun...@lists.opensips.org
 
  
 
 
 
  Hi Kennard,
 
  The core was generated by process 22255:
 [22238]: INFO:core:handle_sigs: child process 22255 exited by a
  signal 11
 
  and this process also reported mem problems:
 [22255]: ERROR:tm:new_t: out of mem
 
  Can you print the tl or ptr variables in frame 0?
 
  Regards,
  Bogdan
 
  kennard_wh...@logitech.com wrote:
  
   Running against opensips HEAD, I got a segfault in the tm timer code.
   I believe this is triggered by running out of shared memory.
  
  
   The stack trace:
  
   (gdb) where
   #0 0x7fe8f8d96212 in insert_timer_unsafe (new_tl=0x7fe8f66337b0,
   list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at 
 timer.c:731
   #1 set_1timer (new_tl=0x7fe8f66337b0, list_id=WT_TIMER_LIST,
   ext_timeout=value optimized out) at timer.c:904
   #2 0x7fe8f8d78ac8 in t_release_transaction (trans=0x7fe8f6633730)
   at t_funcs.c:122
   #3 0x7fe8f8d808e5 in t_unref (p_msg=value optimized out)
   at t_lookup.c:1152
   #4 0x00483ae5 in exec_post_req_cb ()
   #5 0x0046c1e4 in receive_msg ()
   #6 0x004bc77c in udp_rcv_loop ()
   #7 0x0042de9c in main ()
  
   The offending code (I believe):
   if (tl-time_out==ptr-time_out) {
   tl-ld_tl = ptr-ld_tl
   ptr-ld_tl = 0;
   tl-ld_tl-ld_tl = tl; -- SEG FAULT HERE (according to trace)
   } else {
   tl-ld_tl = tl;
   }
  
   Unfortunately, due to optimization I cannot dump anything useful, and
   I'm not convinced the actual fault is on the line indicated. Note that
   the core dump is not one of the processes that reported out of memory.
   Maybe one of the other processes left the timer list in a corrupt 
 state?
  
   The log file:
   Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22255]:
   ERROR:tm:sip_msg_cloner: no more share memory
   Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22255]:
   ERROR:tm:new_t: out of mem
   Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22255]:
   ERROR:tm:t_newtran: new_t failed
   Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22254]:
   WARNING:core:fm_malloc: Not enough free memory, will atempt
  defragmenation
   Sep 29 11:43:36 

Re: [OpenSIPS-Users] {param.value, field} problem with quoted values

2010-10-22 Thread Anca Vamanu
Hi Jeff,

I have just tried like this with 1.6 and it works:

$var(text)=sip:2165551...@192.168.32.2;rn=+1216621;ocn=9321;carrier=\ATT\;cat=\RBOC\;lata=320;
$avp(s:call_carname) = $(var(text){param.value,carrier});
xlog(carrier = $avp(s:call_carname)\n);

=  carrier = ATT

But if you take it from a header, you don't have the quotes escaped. Do 
you see any error in the log?

Regards,

-- 
Anca Vamanu
www.voice-system.ro




On 10/21/2010 07:15 AM, Jeff Pyle wrote:
 Hello,

 I'm pulling some data out of a script variable using the {param.value,field} 
 string manipulator.  It works fine, unless the value is in quotes.  For 
 example, $var(ct) is like this:

 sip:2165551...@192.168.32.2;rn=+1216621;ocn=9321;carrier=ATT;cat=RBOC;lata=320

 I can pull out the ocn, lata and rn successfully with functions like this:

  if !($(var(ct){param.value,ocn}) == '') {
  $avp(s:call_ocn) = $(var(lrnct){param.value,ocn});
  }

 But, the following 'if' statement returns false and never sets the AVP:

  if !($(var(ct){param.value,carrier}) == '') {
  $avp(s:call_carname) = 
 $(var(lrnct){param.value,carrier});
  }

 If I skip the 'if' and set the AVP directly, it's empty.

 This is on Opensips 1.5.3.  Obviously it's possible this has already been 
 addressed in more recent versions.  This server is scheduled for an upgrade 
 to 1.6 in the coming weeks, but we're not there yet.  I thought I'd ask 
 anyway.


 - Jeff


 ___
 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] $fU read-only, calling number modification problem

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Maciej,

default value for restore type is auto, which means you do not have to 
do anything for proper fixing of all messages in the dialog.

Some hints:
1) are you using the rr module for doing record_route and 
loose_route ? This is essential for auto restore to work
   
2) in the outbound INVITE, in the RR header, do you see the vsf param ?

3) the replies and ACK for the INVITE are properly restored?

4) for 200 OK ACK , re-INVITEs, BYE requests, do you see the vsf 
param in the received Route header ?

Regards,
Bogdan
   


Maciej Bylica wrote:
 Guys one more question.

 I have some problems to force opensips to restore oryginal uri that
 was previously replaced.

 I do have:
 - no modparams in config
 - route[0] is responsible for basic routing
 - route[5] is for proper call distribution by using lookup(location)
 information. In the same route i have implemented calling number
 modification.
 Just before the end of route i am arming t_relay with failure route
 (in case of busy for instance).
 - failure_route[105] is to do_routing the call to VM service outside
 the opensips. But just before t_relaying here i need to restore the
 original $fU.
 According to http://www.opensips.org/html/docs/modules/1.6.x/uac.html#id292928
 i should use uac_restore_from() command (with default restore_mode
 modparam).
 Unfortunately the calling number once replaced cannot be restored in my case.
 Below you may find a snippet from debug

 Number replacing is generating vsf param
 /sbin/opensips[28268]: DBG:uac:w_replace_from: dsp=0xffd3f38c (len=0)
 , uri=0xffd3f394 (len=29)
 /sbin/opensips[28268]: DBG:uac:replace_uri: removing display [unknown]
 /sbin/opensips[28268]: DBG:uac:replace_uri: uri to replace
 [sip:48222114...@11.22.33.44]
 /sbin/opensips[28268]: DBG:uac:replace_uri: replacement uri is
 [sip:222114...@11.22.33.44]
 /sbin/opensips[28268]: DBG:uac:replace_uri: encode
 is=AAIJAgUMBAEAD3AHeQUXBR8FHwUaCRoKHAsyOQ-- len=44
 /sbin/opensips[28268]: DBG:rr:add_rr_param: adding
 (;vsf=AAIJAgUMBAEAD3AHeQUXBR8FHwUaCRoKHAsyOQ--) 0x81c2828

 then opensips constucts Busy message and in the same time without any
 uac_restore_from() command:
 /sbin/opensips[28795]: DBG:uac:restore_uri_reply: removing
 sip:222114...@11.22.33.44
 /sbin/opensips[28795]: DBG:uac:restore_uri_reply: inserting unknown
 sip:48222114...@11.22.33.44

 then the call failes to failure_route[105] and uac_restore_from() is
 generating following debug
 /sbin/opensips[28797]: DBG:uac:restore_uri: getting 'vsf' Route param
 /sbin/opensips[28797]: DBG:uac:restore_uri: route param 'vsf' not found
 just after that the call is hitting do_routing and t_relay to VM
 server. Of course calling number was not restored to original one.

 Could You please point me where the problem is located?
 Just  one more info - calling number modification part of config is
 located in separated route[10] to be used whenever i wish in my
 script.

 Thx,
 Maciej.

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Multiply location

2010-10-22 Thread Anca Vamanu
Hi Anton,

No, this is not normal and the user agent that you use has a bad SIP 
implementation - a CANCEL cancels the request with the same Via Branch id.
RFC 3261 - section 9.1

A CANCEL constructed by a
client MUST have only a single Via header field value matching the
top Via value in the request being canceled.  Using the same values
for these header fields allows the CANCEL to be matched with the
request it cancels


Regards,

-- 
Anca Vamanu
www.voice-system.ro


On 10/21/2010 11:21 AM, Антон Загорский wrote:
 Hello.

 My UA was registered at openSIPS under same account twice, so in the
 location table there are two records. When openSIPS receive INVITE on that
 UA it forks in two INVITEs with _SAME_ Call-ID (but a different 'branch' in
 the 'via' header). So, after when UA replies OK openSIPS sends CANCEL on
 unanswered INVITE but it CANCEL cancels established session because of both
 sessions have same Call-ID.

 Is this situation normal?






 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] Problem creating Registrar database for OpenSIPS with PostgreSQL

2010-10-22 Thread David Santiago
Installing postgresql-client package and configuring a ./pgpass file
with the following format fixed the problem:

hostname:port:database:username:password


Regards,
David

On Fri, Oct 22, 2010 at 3:26 PM, David Santiago
david.santi...@almiralabs.com wrote:

 Hello,

 I have successfully compiled and installed OpenSIPS 1.6.3 (no tls) with the 
 PostgreSQL module for an OpenSIPS Registrar testing installation.

 I have edited the opensipsctlrc file to specify the connection details for a 
 remote PostgreSQL database server I want to use as the persistence store for 
 an OpenSIPS Registrar  installation. I have set the hostname, database name, 
 usernames and passwords.

 Nevertheless, when executing the opensipsdbctl command, I get the following 
 error:

 -e \E[37;31mERROR: ~./pgpass does not exist, please create this file and 
 support proper credentials for user postgres.
 -e \E[37;31mERROR: Note: you need at least postgresql= 7.3

 Any ideas?


 Thx

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


Re: [OpenSIPS-Users] opensips coredump on stop/restart

2010-10-22 Thread Anca Vamanu

Hi Dave,

The core files do not help as they need to be investigated with your 
binaries. Please run gdb path_to_executable path_to_corefile and then 
run 'bt full' and send the output.


Regards,

--
Anca Vamanu
www.voice-system.ro



On 10/21/2010 10:08 PM, Dave Singer wrote:
On my production servers, both 1.6.2 and 1.6.3 versions of opensips, 
almost every time I restart opensips it creates a core dump. Since I'm 
giving it 2GB shared mem, it takes a little while to write the core to 
disk and start running again.

So a couple questions.
1. Am I giving it more memory than it needs? Judging by how much the 
core dump compressed probably way to much. I'm running about 30 calls 
per sec with up to 1000 active calls. Calls are using mediaproxy with 
engage and thus also dialog. I did run into memory shortage problems 
before I explicitly upped it to 2GB with -m 2000 on the cmd line for 
starting opensips.
2. Can someone look at the core dump(s) or let me know what/how to 
look at them? The 2GB core dumps compressed very small and are 
accessible via http:
opensips-1.6.2-notls.core.gz 6MB 
http://viper.wideideas.net/opensips-1.6.2-notls.core.gz
opensips-1.6.3-tls_1.core.gz 2MB 
http://viper.wideideas.net/opensips-1.6.3-tls_1.core.gz
opensips-1.6.3-tls_2.core.gz 2MB 
http://viper.wideideas.net/opensips-1.6.3-tls_2.core.gz


Thanks for any help or suggestions.
Dave
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] load_balance debugging

2010-10-22 Thread Anca Vamanu
Hi Alexandr,

The second parameter of load_balance() function can not be a 
pseudovariable, but only string.

Regards,

-- 
Anca Vamanu
www.voice-system.ro




On 10/22/2010 03:53 PM, Alexandr A. Alexandrov wrote:
 Hi!

 I have a strange problem with trying to use avps in load_balance function.

 I'm trying to do balancing like this:

   avp_db_query(select phone, resource from phone_resource where
 phone like '%$fU%', $avp(i:111);$avp(i:112));
   avp_print();
   xlog(L_INFO,$fu = $avp(i:111));
   if ($fu=~$avp(i:111)) {
   xlog(L_INFO, AAA detected!\n);
   load_balance(1, $avp(i:112));

 Here is what I get in logs:

 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 INFO:avpops:ops_print_avp: #011#011#011id=112
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 INFO:avpops:ops_print_avp: #011#011#011val_str=aaa / 3
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 INFO:avpops:ops_print_avp: p=0x7f73f6b251e8, flags=0x0002
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 INFO:avpops:ops_print_avp: #011#011#011id=111
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 INFO:avpops:ops_print_avp: #011#011#011val_str=1234565677 / 10
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 sip:1234565...@xx.xxx.xxx.xxx;user=phone = 1234565677
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]: AAA detected!
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 ERROR:load_balancer:do_load_balance: unknown resource in input string
 Oct 22 16:35:44 kzo2 /usr/local/sbin/opensips[8214]:
 DBG:core:comp_scriptvar: int 26 : -1 / 0

 If I write the resource directly, like
   load_balance(1, aaa);
 everything works fine.
 In the above log you can see that $avp(i:112) contains exactly the same
 resource string.
 What is the correct way to do this, or is there a way to debug how load
 balancer searches for resources defined in database?

 Thanks in advance,
 Alexandr A. Alexandrov


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


Re: [OpenSIPS-Users] Core dump in svn head

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Dave,

the crash refers to an invalid dst_uri and I see in your failure route 
you are not using any $du related op Also, I see you add a single 
new branch (via RURI) (no parallel forking)

Also, in branch_route, you do not do any dst_uri or ruri ops - you work 
only on headers ?

Could you print from gdb:

frame 1 :   request-dst_uri

frame 2:   *next_hop

frame 3:   p_msg-dst_uri

Best regards,
Bogdan

Dave May wrote:
 Yes, I do set a branch_route to strip RPID header and strip/set the
 P-Asserted-Identity header.

 I'm using drouting, and that portion of the failure_route is based on
 the code from Flavio's book (with the addition of e164 mangling,
 t_on_branch to handle the header stuff mentioned above, and t_on_failure
 to handle multiple failures):



   if(isflagset(10)){
   if (!t_check_status(408|[56][0-9][0-9])) {
   # this is not a GW failure
   exit;
   }
   
   if (use_next_gw()) {
   xlog($ci\t$C(rc)$si $rm$C(xx)
 $C(xr)failure_route[1]$C(xx)
 $C(xr)use_next_gw()=$C(rg)$ru$C(xx)\n);
   
   ###  Need to duplicate e164 check from original
 do_routing() call
   ###  Want to do this in branch_route, but not
 allowed to use is_uri_user_e164() there
   ###
   #
   # Does the gateway entry request e164 format?
   if ($avp(s:dr_gw_attrs) != ) 
 ($(avp(s:dr_gw_attrs){param.value,format})==e164) {
   
   xlog($ci\t$C(rc)$si $rm$C(xx)
 failure_route[1] Gateway requires e164 format\n);
   
   # Check and fix RURI
   if (is_uri_user_e164($ru)) {
   xlog($ci\t$C(rc)$si $rm$C(xx)
 failure_route[1] $ru is in e164 format\n);
   } else {
   xlog($ci\t$C(rc)$si $rm$C(xx)
 failure_route[1] $ru is not in e164 format\n);
   dp_translate(3);
   }
   }
   
   # Need to ensure that failures on the failure
 are also handled
   t_on_branch(1);
   t_on_failure(1);
   
   xlog($ci\t$C(rc)$si $rm$C(xx)
 failure_route[1] t_relay() next  rU = $rU   fU=$fU
 tU=$tU   du=$du\n);
   setdebug(4);
   t_relay();
   setdebug();
   xlog($ci\t$C(rc)$si $rm$C(xx)
 failure_route[1] t_relay() complete\n);
   exit;
   } else {
   xlog($ci\t$C(rc)$si $rm$C(xx)
 $C(xr)failure_route[1]-$C(xx) isflagset(10) $C(sr)-- use_next_gw()
 FAILED!!!$C(xx)\n);
   
   t_reply(503, Service not available, no more
 gateways);
   exit;
   }

 Dave.

 -Original Message-
 From: users-boun...@lists.opensips.org
 [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei
 Iancu
 Sent: Wednesday, October 13, 2010 4:43 PM
 To: OpenSIPS users mailling list
 Subject: Re: [OpenSIPS-Users] Core dump in svn head

 Hi Dave,

 In failure route, how do you add the new destination/branch ?

 Also, do you have a branch route set ?

 Regards,
 Bogdan

 Dave May wrote:
   
 Over the past couple weeks I have been getting occasional segfaults
 
 just
   
 prior to (or perhaps in the process of) a t_relay() in my
 
 failure_route.
   
 Still haven't gotten to the bottom of the root cause in my config, but
 
 I
   
 was able to find and fix the symptomatic code in the
 pre_print_uac_request() function in t_fwd.c (based on Bogdan's
 
 previous
   
 fix for a similar problem).

 Backtrace:
 #0  0xb763ba55 in memcpy () from /lib/tls/i686/cmov/libc.so.6
 #1  0xb72ede1d in pre_print_uac_request (t=0x972ddf78, branch=1,
 request=0x972cec64) at t_fwd.c:177
 #2  0xb72eeac0 in add_uac (t=0x972ddf78, request=0x7fff,
 uri=0xbf8a250c, next_hop=0xbf8a2514, path=0xb7315100, proxy=0x0) at
 t_fwd.c:401
 #3  0xb72efbc0 in t_forward_nonack (t=0x972ddf78, p_msg=0xb7314de0,
 proxy=0x0) at t_fwd.c:660
 #4  0xb72fbdbf in w_t_relay (p_msg=0xb7314de0, proxy=0x0, flags=value
 optimized out) at tm.c:1116
 #5  0x08057810 in do_action (a=0x819f924, msg=0xb7314de0) at
 action.c:1155
 #6  0x080557ff in run_action_list (a=0x819e7cc, msg=0xb7314de0) at
 action.c:140
 #7  0x0805981e in do_action (a=0x819fed4, msg=0xb7314de0) at
 action.c:821
 #8  0x080557ff in run_action_list (a=0x819e584, msg=0xb7314de0) at
 action.c:140
 #9  0x0805981e in do_action (a=0x81a0390, msg=0xb7314de0) at
 action.c:821
 #10 0x080557ff in 

Re: [OpenSIPS-Users] Dialplan problem ?

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Marcio,

first of all be sure you are using the latest SVN check out from 1.6 branch.

What is really interesting in your case I do not see any err / warning 
message...and the code is generating err/warn messages before destroying 
the rule.

What is happening is that during the DB load, when a new rule is 
processed, it is discarded due some issue, but this issue is not logged 
.

Don't you see any warning as:
failed to build rule - skipping

?


Best regards,
Bogdan

Marcio Veloso Antunes wrote:
 Hi,

   The dialplan still not working...

Should i change for other version than OpenSIPS 1.6.3 ?

   Thanks in advance,

   Marcio

 Em Qua 13 Out 2010, às 18:01:48, Marcio Veloso Antunes escreveu:
   
 Hi Bogdan,

   Thanks for your fast reply...

   The version is 1.6.3. The strange thing is that it was working, but after
 i entered new rules it stopped, and even after emptying the table and
 reinserting just that 2 routes it still not working.

   I've tryed 'opensipsctl dialplan reload' but still not working.

   Silly question: Could this problem be related with 'id' column? I'am
 asking based on the fact that initially it was working...

   Thanks again,
   Marcio

 Em Qua 13 Out 2010, às 17:52:26, Bogdan-Andrei Iancu escreveu:
 
 Hi Marcio,

 The answer is:

 Oct 13 17:05:47 perseu /sbin/opensips[13077]: DBG:dialplan:build_rule:
 references:1 , max:1

 Oct 13 17:05:47 perseu /sbin/opensips[13077]: DBG:dialplan:destroy_rule:
 destroying rule with priority 1


 It looks like opensips rejects the rules while loading them at startup,
 so basically you end up with no rule at runtime.

 what opensips version are you using ?

 Regards,
 Bogdan

 Marcio Veloso Antunes wrote:
   
 Hi guys,

 Sorry to bother you, but i can't find the problem why this is not
 working:

 Actual dialplan:

 r...@perseu:/etc/opensips# opensipsctl dialplan show

 dialplan tables

 id | dpid | pr | match_op | match_exp | match_len | subst_exp |
 repl_exp | attrs

 +--++--+---+---+---
 -- +--+---

 18 | 1 | 0 | 1 | ^00[1-9][0-9]+ | 0 | ^0(0[1-9][0-9]+) | \1 |

 19 | 1 | 1 | 1 | ^00[1-9][1-9][0-9]{8} | 0 | ^0(0[1-9][1-9][0-9]{8}) |
 \1 |

 (2 rows)

 String being tested: '002185392949'


 ---
 -

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

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Services management - question about proper module

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Maciej

Maciej Bylica wrote:
 Hi,

 Have anyone tried to use usr_preferences, AVPops to determine the
 service to be fetched by the script?
   
That is the the proper module for handling generic attribute. Uisng 
AVPops module you can load from db, for a certain user, a certain 
attribute (via avp_db_load ). You may use different attributes (AVPs) 
for different services - like one attreibute to be URI for permanent 
call fwd other for being URI for busy redirect.
 Then i am planning to use switch statement to add different prefixes
 before the called number and t_relay to asterisk server to do the
 rest.
   
keep in mind that certain ops can be done on opensips (like call fwd), 
you do not need asterisk.

Regards,
Bogdan
 Is this proper point of view?

 Thx,
 Maciej.



   
 Hello.

 I am planning to provide opensips with a kind of mechanism to manage
 customer services/features like call-forward/VM/follow-me and so on.
 It should work in following way: If $rU is provided in subscriber
 table then user enabled service name is obtained from some db table.
 On the basis of that value opensips should do the magic :)

 The question is what kind of module is the best to follow. Is it
 AVPops or maybe there is another way to achieve my goal.
 What are pros and cons.

 Thx in advance,
 Maciej.

 

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

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Static Routes in OpenSIPS proxy

2010-10-22 Thread Bogdan-Andrei Iancu
Hello Andrea,

If you check the default opensips.cfg, you can see that there is a step 
where only the initial requests are getting there - starting from that 
point you can implement your static routing using if statements, 
checking the $rU (request username ) and setting new destination 
(writing in $rd)

Regards,
Bogdan

andrea wrote:
 Hi,

 i'm a beginner of OpenSIPS, i've installed 1.6 version using standard
 configuration.
 I would like to know i how add static routes (or SIP trunk) in a proxy
 server based OpenSIPS.
 In particular,  Can you suggest me a modification in the configuration file
 so that this proxy can route the calls incoming from an IP-PABX sip to
 phones registerd to others IP-PABX via SIP trunks?

 Thanks in advance.
 Andrea 
   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] How opensis can manage different ports.

2010-10-22 Thread Bogdan-Andrei Iancu
put more listening definitions:

listen=udp:ip:port1
listen=udp:ip:port2

Regards,
Bogdan


Marcella wrote:

 KINGSSQUEEN





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

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


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

2010-10-22 Thread Bogdan-Andrei Iancu
bla, emailing via subject :DI wonder what the email body is good 
for in this case :P

Check the dialplan rules - your opensips is not recognizing the local 
subscribers - the rules in DP must match the local subscribers

Regards,
Bogdan

Marcella wrote:

 KINGSSQUEEN





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

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] opensips tm timer core dump

2010-10-22 Thread Kennard_White

Yes to both. Bt is below. I'll recompile with with optimization and
reproduce the problem today.

(gdb) where
#0  0x7f8b8356c2c2 in insert_timer_unsafe (new_tl=0x7f8b7a54e310,
list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at
timer.c:731
#1  set_1timer (new_tl=0x7f8b7a54e310, list_id=WT_TIMER_LIST,
ext_timeout=value optimized out) at timer.c:904
#2  0x7f8b8354eb18 in t_release_transaction (trans=0x7f8b7a54e290)
at t_funcs.c:122
#3  0x7f8b83556959 in t_unref (p_msg=value optimized out)
at t_lookup.c:1152
#4  0x00483b85 in exec_post_cb (msg=0x7ab158) at script_cb.c:198
#5  exec_post_req_cb (msg=0x7ab158) at script_cb.c:216
#6  0x0046c284 in receive_msg (
buf=0x775f00 PUBLISH sip:kwlt-b000...@sip.sightspeed.org SIP/2.0\r
\nRecord-Route: sip:74.217.68.83;r2=dn;lr=on\r\nRecord-Route:
sip:74.217.68.83;r2=up;lr=on\r\nVia: SIP/2.0/UDP
74.217.68.83;branch=z9hG4bK-d8754z-d29..., len=722,
rcv_info=0x7fff20f62330) at receive.c:165
#7  0x004bc81c in udp_rcv_loop () at udp_server.c:492
#8  0x0042deb5 in main_loop (argc=value optimized out,
argv=value optimized out) at main.c:823
#9  main (argc=value optimized out, argv=value optimized out)
at main.c:1388
(gdb)  bt full
#0  0x7f8b8356c2c2 in insert_timer_unsafe (new_tl=0x7f8b7a54e310,
list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at
timer.c:731
ptr = value optimized out
#1  set_1timer (new_tl=0x7f8b7a54e310, list_id=WT_TIMER_LIST,
ext_timeout=value optimized out) at timer.c:904
timeout = 32
__FUNCTION__ = set_1timer
#2  0x7f8b8354eb18 in t_release_transaction (trans=0x7f8b7a54e290)
at t_funcs.c:122
No locals.
#3  0x7f8b83556959 in t_unref (p_msg=value optimized out)
at t_lookup.c:1152
kr = 0
__FUNCTION__ = t_unref
#4  0x00483b85 in exec_post_cb (msg=0x7ab158) at script_cb.c:198
No locals.
#5  exec_post_req_cb (msg=0x7ab158) at script_cb.c:216
No locals.
#6  0x0046c284 in receive_msg (
buf=0x775f00 PUBLISH sip:kwlt-b000...@sip.sightspeed.org SIP/2.0\r
\nRecord-Route: sip:74.217.68.83;r2=dn;lr=on\r\nRecord-Route:
sip:74.217.68.83;r2=up;lr=on\r\nVia: SIP/2.0/UDP
74.217.68.83;branch=z9hG4bK-d8754z-d29..., len=722,
rcv_info=0x7fff20f62330) at receive.c:165



From:   Bogdan-Andrei Iancu bog...@voice-system.ro
To: OpenSIPS users mailling list users@lists.opensips.org
Date:   10/22/2010 07:02 AM
Subject:Re: [OpenSIPS-Users] opensips tm timer core dump
Sent by:users-boun...@lists.opensips.org



Hi Kennard,

I suppose the bt is the same ? do you still have the core file ?

Regards,
Bogdan

kennard_wh...@logitech.com wrote:

 Hi Bodgen,

 I replicated the error. Unfortunately the entire insert_timer_unsafe
 and been in-lined and little is available:

 Program terminated with signal 11, Segmentation fault.
 #0 0x7f8b8356c2c2 in insert_timer_unsafe (new_tl=0x7f8b7a54e310,
 list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at timer.c:731
 731 timer.c: No such file or directory.
 in timer.c
 (gdb) print tl
 $1 = value optimized out
 (gdb) print *tl
 Cannot access memory at address 0x0
 (gdb) print ptr
 $2 = value optimized out
 (gdb) print *ptr
 Cannot access memory at address 0x0
 (gdb) print *new_tl
 No symbol new_tl in current context.
 (gdb) up
 #1 set_1timer (new_tl=0x7f8b7a54e310, list_id=WT_TIMER_LIST,
 ext_timeout=value optimized out) at timer.c:904
 904 in timer.c
 (gdb) print *new_tl
 $3 = {next_tl = 0x0, prev_tl = 0x0, ld_tl = 0x0, time_out = 0,
 timer_list = 0x0, deleted = 0}
 (gdb) print list
 $4 = value optimized out
 (gdb) print timeout
 $5 = 32
 (gdb) print new_tl
 $6 = (struct timer_link *) 0x7f8b7a54e310

 I'll keep the core for a while -- please let me know if there is
 anything else I can try.

 Thanks,
 Kennard

 Inactive hide details for Bogdan-Andrei Iancu ---10/08/2010 04:40:47
 AM---Hi Kennard, Ok, keep the core next time :)Bogdan-Andrei Iancu
 ---10/08/2010 04:40:47 AM---Hi Kennard, Ok, keep the core next time :)

 From: Bogdan-Andrei Iancu bog...@voice-system.ro
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: 10/08/2010 04:40 AM
 Subject: Re: [OpenSIPS-Users] opensips tm timer core dump
 Sent by: users-boun...@lists.opensips.org

 



 Hi Kennard,

 Ok, keep the core next time :)

 Regards,
 Bogdan

 kennard_wh...@logitech.com wrote:
 
  Hi Bogden,
 
  Thanks for explaining the child processes involved -- I misunderstood
  what was happening.
 
  Unfortunately, I don't have the core anymore. My recollection is that
  I couldn't print anything useful due to compiler optimization. That
  said, this should re-create pretty easily, and I'll get more dumps
  next time it happens.
 
  Regards,
  Kennard
 
  Inactive hide details for Bogdan-Andrei Iancu ---10/05/2010 01:41:38
  AM---Hi Kennard, The core was generated by process 22255:Bogdan-Andrei
  Iancu 

Re: [OpenSIPS-Users] How to t_relay() from two send socket?

2010-10-22 Thread Bogdan-Andrei Iancu
Hi CheeWii,

Do you want to received the a INVITE request and to send it to two 
destinations , one on private interface and one on public interface? Did 
I get it right ?

Regards,
Bogdan

CheeWii wrote:
 Hi,
  My OpenSIPS server has two network cards. One is public ip 
 address such as 202.102.XX.XX,and the other is private ip address,such 
 as 10.0.1.5.
 
  Now ,I want to forward INVITE ,BYE,CANCEL from 10.0.1.5 to 
 10.0.1.6,while forward MESSAGE and REGISTER from 202.102.XX.XX to 
 202.102.YY.YY.
  
  I have test use force_send_socket to control the send sockets to 
 different kinds of messages,but it seems to unuseful. It just send 
 message from one socket. How can we accomplish this demo? Thanks a lot.
  
 CheeWii

 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] OpenSIPS core dumps

2010-10-22 Thread Bogdan-Andrei Iancu
Any chance with the backtraces ?

Regards,
Bogdan

Anca Vamanu wrote:
 Hi,

 You need to inspect them with gdb, run: gdb 
 path_to_opensips_executable path_to_corefile, and then run 'bt full' 
 and send the output.

 Regards,
 -- 
 Anca Vamanu
 www.voice-system.ro


 On 10/14/2010 10:12 PM, thrillerbee wrote:
 I have this info from dmesg:

 [1985853.285221] opensips[30865]: segfault at 10 ip 7f43899ce21f sp 
 7fff8de1cf40 error 4 in db_flatstore.so[7f43899cb000+5000]
 [1985856.379671] opensips[30858]: segfault at 10 ip 7f43899ce21f sp 
 7fff8de1cf40 error 4 in db_flatstore.so[7f43899cb000+5000]
 [1985896.961279] opensips[30868]: segfault at 10 ip 7f43899ce21f sp 
 7fff8de1cf40 error 4 in db_flatstore.so[7f43899cb000+5000]

 [2000131.245512] opensips[17672]: segfault at 10 ip 7fd0f21fb21f sp 
 7fff3a3b4f00 error 4 in db_flatstore.so[7fd0f21f8000+5000]
 [2000161.735962] opensips[17668]: segfault at 10 ip 7fd0f21fb21f sp 
 7fff3a3b4e40 error 4 in db_flatstore.so[7fd0f21f8000+5000]
 [2000167.299402] opensips[17670]: segfault at 10 ip 7fd0f21fb21f sp 
 7fff3a3b4f00 error 4 in db_flatstore.so[7fd0f21f8000+5000]

 On Thu, Oct 14, 2010 at 1:57 PM, thrillerbee thriller...@gmail.com 
 mailto:thriller...@gmail.com wrote:

 When OpenSIPS crashes, three corefiles are generated that are
 2.1GB in size.  How do I use these files to understand what's
 causing the crash?

 Thanks.


 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] generate CDRs using sermyadmin

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Leon,

maybe you should consider using OpenSIPS Control Panel and the CDR 
procedure provided by this tool...

Of course, you can use only the CDR procedure (it is only at mysql 
level). See:
   http://opensips-cp.sourceforge.net/htmldoc/cdrviewer.html
   
http://opensips-cp.svn.sourceforge.net/viewvc/opensips-cp/branches/4.0/config/tools/system/cdrviewer/

Regards,
Bogdan

Leon Li wrote:

 I found the right procedure is opensips.opensips. however the 
 generate-cdrs.sh ran without creating any cdrs. How do I troubleshoot 
 this?

  

 Regards,

 Leon

  

 *From:* users-boun...@lists.opensips.org 
 [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Leon Li
 *Sent:* Friday, 15 October 2010 12:07 PM
 *To:* OpenSIPS users mailling list
 *Subject:* [OpenSIPS-Users] generate CDRs using sermyadmin

  

 Hi,

  

 I knew sermyadmin is discontinue any more sadly. But the question is 
 how to generate CDRs using the generate-cdrs.sh in sermyadmin? I got 
 an error.

  

 ERROR 1305 (42000) at line 1: PROCEDURE opensips.sermyadmin does not exist

  

 But the mentioned procedure is not included in sermyadmin package?

  

 Any assistance?

  

 Cheers

 Leon

  

 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


[OpenSIPS-Users] Problem creating tables for OpenSIPS with PostgreSQL

2010-10-22 Thread David Santiago
The call to opensipsdbctl create is asking me for the password on
every single table created. But the real problem is that after several
tables have been created the following error happens:

...
...
-e Creating core table: drouting
Password for user almira:
NOTICE:  CREATE TABLE will create implicit sequence
dr_gateways_gwid_seq for serial column dr_gateways.gwid
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
dr_gateways_pkey for table dr_gateways
NOTICE:  CREATE TABLE will create implicit sequence
dr_rules_ruleid_seq for serial column dr_rules.ruleid
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
dr_rules_pkey for table dr_rules
NOTICE:  CREATE TABLE will create implicit sequence
dr_gw_lists_id_seq for serial column dr_gw_lists.id
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
dr_gw_lists_pkey for table dr_gw_lists
NOTICE:  CREATE TABLE will create implicit sequence dr_groups_id_seq
for serial column dr_groups.id
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
dr_groups_pkey for table dr_groups
-e Creating core table: load_balancer
Password for user almira:
NOTICE:  CREATE TABLE will create implicit sequence
load_balancer_id_seq for serial column load_balancer.id
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
load_balancer_pkey for table load_balancer
Password for user almira:
ERROR:  permission denied to create role
-e \E[37;32mWARNING: Create user in database failed, perhaps they
already exist? Try to continue..
Password for user almira:
Password for user almira:
Password for user almira:
Password for user almira:
[: 300: acc: unexpected operator
[: 300: acc: unexpected operator

Any hint about where to have a look in order to fix this?


Regards,
David

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


[OpenSIPS-Users] fr_timer fr_inv_timer

2010-10-22 Thread Jesse Cloutier

Hi all,

I setup opensips with the tm module for call forward on timeout. It 
works great but I would like to perform different actions depending on 
if it is the fr_timer or the fr_inv_timer, and I can find no way of 
telling from the script which timer was hit.


How could I gain access to this information?

I am running 1.6.2

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


Re: [OpenSIPS-Users] Request Time out problem

2010-10-22 Thread Bogdan-Andrei Iancu
Hi James,

As I see, the INVITE has in URI sip:ja...@198.168.0.1

INVITE sip:ja...@198.162.0.1 SIP/2.0

 without any port indication, so the default 5060 is assumed.  The proxy 
cannot automatically discover what's the right port on the next hop if 
not instructed by RURI or if not discovered via DNS SRV (not your case 
as you use IPs).

So, the dialling party is the faulty one (198.162.0.1:9013 ) as it does 
not provide a correct location of callee.

Regards,
Bogdan

James Mbuthia wrote:
 Hi guys,

 Hope you can help me out. I have a situation where my Opensips box is
 acting as a proxy/registration and location server. I have also
 changed my listening port from 5060 to 5059.
 The registration process works fine and my UAS gets a 200 response,
 its IP is 198.162.0.1:1167.

 However am getting a Request Timeout problem because once the proxy
 successfuly authenticates the UAC its forwading the INVITE request to
 my ip:5060. Since opensips is not configured on that port it gets a
 408 Request Time out. Below is a snapshot of the headers from a sip
 trace.


 udp:198.162.0.1:5059 - udp:198.162.0.1:7013

 SIP/2.0 407 Proxy Authentication Required
 Via: SIP/2.0/UDP 198.162.0.1:1167;rport=7013;branch=z9hG4bKynybt
 From:sip:j...@198.162.0.1;tag=2325231
 To:sip:ja...@198.162.0.1 ;tag=5594793ec2abca4d36972b7e2bfde24c.9363
 Call-ID:ysu...@198.162.0.1
 CSeq: 1 INVITE
 Proxy-Authenticate: Digest realm=198.162.0.1,
 nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830
 Server: OpenSIPS (1.6.2-notls (i386/linux))
 Content-Length: 0


 udp:198.162.0.1:9013 - udp:198.162.0.1:5059

 INVITE sip:ja...@198.162.0.1 SIP/2.0
 Via: SIP/2.0/UDP 198.162.0.1:1167;rport=1645;branch=z9hG4bKynybt
 From:sip:j...@198.162.0.1;tag=2325231
 To:sip:ja...@198.162.0.1
 Call-ID:ysu...@198.162.0.1
 CSeq: 3 INVITE
 Contact: sip:ja...@198.162.0.1
 Proxy-Authorization: Digest username=jm21, realm=198.162.0.1,
 nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830,
 uri=sip:ja...@198.162.0.1,
 response=53a86a6afd0d9fc9a118cb4a304f75d6, algorithm=MD5
 Content-type: application/sdp
 Max-Forwards: 69
 Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE


 udp:198.162.0.1:5059 - udp:198.162.0.1:5060

 INVITE sip:ja...@198.162.0.1 SIP/2.0
 Record-Route: sip:198.162.0.1:5059;lr=on
 Via: SIP/2.0/UDP 198.162.0.1:5059;branch=z9hG4bKa8e9.181ea9f5.0
 Via: SIP/2.0/UDP
 198.162.0.1:1167;received=198.162.0.1;rport=9013;branch=z9hG4bKynybt
 From:sip:j...@198.162.0.1;tag=2325231
 To:sip:ja...@198.162.0.1
 Call-ID:ysu...@198.162.0.1
 CSeq: 3 INVITE
 Contact: sip:ja...@198.162.0.1
 Content-type: application/sdp
 Max-Forwards: 69
 Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE


 udp:198.162.0.1:5059 - udp:198.162.0.1:9013
 SIP/2.0 408 Request Timeout
 Via: SIP/2.0/UDP 198.162.0.1:1167;rport=9013;branch=z9hG4bKynybt
 From:sip:j...@198.162.0.1;tag=2325231
 To:sip:ja...@198.162.0.1 ;tag=a2fc028f8d02e78ceae2b814452c9bc4-9363
 Call-ID:ysu...@198.162.0.1
 CSeq: 3 INVITE
 Server: OpenSIPS (1.6.2-notls (i386/linux))
 Content-Length: 0


 My question is, why is the proxy routing the request to
 198.162.0.1:5060 even after Opensips is not listening on that port? Is
 it possible to get it to route the request to the UAS i.e
 198.162.0.1:1167?

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

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Static Routes in OpenSIPS proxy

2010-10-22 Thread Duane Larson
Couldn't the dynamic routing module also be used depending on the prefixes
at each individal remote pbx system?

On Oct 22, 2010 12:29 PM, Bogdan-Andrei Iancu bog...@voice-system.ro
wrote:

Hello Andrea,

If you check the default opensips.cfg, you can see that there is a step
where only the initial requests are getting there - starting from that
point you can implement your static routing using if statements,
checking the $rU (request username ) and setting new destination
(writing in $rd)

Regards,
Bogdan


andrea wrote:
 Hi,

 i'm a beginner of OpenSIPS, i've installed 1.6 version using standard
 con...
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro



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


Re: [OpenSIPS-Users] Dispatcher failover re-enabling with probing

2010-10-22 Thread Bogdan-Andrei Iancu
Hi,

what group are you using for your destination (in dispatcher) ? if 0, 
use another one :D...there is an issue there...

Regards,
Bogdan

thrillerbee wrote:
 I could still use some help on understanding what I'm missing that is 
 preventing gws from transitioning back into the 'active' state from 
 'probing'.  Currently, I have to babysit this OpenSIPS instance.

 Again, to summarize, when dispatcher detects a failure, it puts the gw 
 into 'probing' state  begins sending OPTIONS messages to the failed 
 gw.  Even though the gateway begins replying with 200s, dispatcher 
 never returns it to an 'active' state.  I have to restart OpenSIPS to 
 return it to an 'active' state.

 Here are the relevant pieces of my config script:
 # - dispatcher params -
 modparam(dispatcher, flags, 2)
 modparam(dispatcher, dst_avp, $avp(i:271))
 modparam(dispatcher, attrs_avp, $avp(i:272))
 modparam(dispatcher, grp_avp, $avp(i:273))
 modparam(dispatcher, cnt_avp, $avp(i:274))
 modparam(dispatcher, ds_ping_interval, 1)
 modparam(dispatcher, ds_probing_threshhold, 32)
 modparam(dispatcher, ds_probing_mode, 0)
 modparam(dispatcher, options_reply_codes, 501, 403, 200)

 failure_route[1]
 {
 if (t_was_cancelled()) {
 exit;
 }
 if ((t_check_status(408))  (t_local_replied(last)))
 {
 xlog(L_ERR,Gateway Failure! $ci\n);
 ds_mark_dst(p);
 t_on_failure(1);
 t_relay();
 }
 }

 Again, any assistance would be greatly appreciated.

 Thanks.



 On Mon, Oct 18, 2010 at 7:31 AM, thrillerbee thriller...@gmail.com 
 mailto:thriller...@gmail.com wrote:

 Anca,

 I have configured the ds_probing_threshold parameter which allows
 me to adjust when I gw goes from active to probing.

 However, my issue is getting the gw back to active.  For some
 reason, it will never transition back - even with successful 200
 OK responses to the OPTIONS messages that are triggered when a gw
 goes to probing.  The examples below show that I can't even
 force it back to active from probing to active with MI commands -
 I have to restart OpenSIPS.

 Thanks.


 On Mon, Oct 18, 2010 at 5:50 AM, Anca Vamanu a...@opensips.org
 mailto:a...@opensips.org wrote:

 Hi Thrillerbee,

 You can try to adjust the time when a gateway  state is
 changed into probing by setting the ds_probing_threshhold ||
 parameter
 
 (http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id250525).

 Regards,
 -- 

 Anca Vamanu
 www.voice-system.ro http://www.voice-system.ro


 On 10/16/2010 08:01 AM, thrillerbee wrote:
 I have been able to get the dispatcher module to detect a gw
 failure and put it into a probing state  route traffic
 elsewhere.  However, when the gw returns ( begins responding
 to OPTIONS with 200s), dispatcher never puts it back in the
 active state.

 In fact, I cannot even manually put the server back in the
 active state with mi functions.  I can put it in an inactive
 state, but it returns to probing if I try to set it to active:

 ogw1:~# opensipsctl fifo ds_list
 SET_NO:: 1
 SET:: 0
 URI:: sip:12.121.80.38 flag=P
 URI:: sip:12.121.80.39 flag=A
 URI:: sip:12.121.80.40 flag=A
 ogw1:~# opensipsctl fifo ds_set_state i 0 sip:12.121.80.38 
 ogw1:~# opensipsctl fifo ds_list
 SET_NO:: 1
 SET:: 0
 URI:: sip:12.121.80.38 flag=I
 URI:: sip:12.121.80.39 flag=A
 URI:: sip:12.121.80.40 flag=A
 ogw1:~# opensipsctl fifo ds_set_state a 0 sip:12.121.80.38 
 ogw1:~# opensipsctl fifo ds_list
 SET_NO:: 1
 SET:: 0
 URI:: sip:12.121.80.38 flag=P
 URI:: sip:12.121.80.39 flag=A
 URI:: sip:12.121.80.40 flag=A

 Is there some setting that I am missing that allows gateways
 to transition from probing to active?

 Thanks.


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

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



 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro



Re: [OpenSIPS-Users] Request Time out problem

2010-10-22 Thread James Mbuthia
Hi Bogdan,

I figured that out after I went through the SIP rfc in more detail. Thanks
for your help though.

james


On Fri, Oct 22, 2010 at 7:04 PM, Bogdan-Andrei Iancu bog...@voice-system.ro
 wrote:

 Hi James,

 As I see, the INVITE has in URI sip:ja...@198.168.0.1sip%3aja...@198.168.0.1

INVITE sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1 SIP/2.0

  without any port indication, so the default 5060 is assumed.  The proxy
 cannot automatically discover what's the right port on the next hop if
 not instructed by RURI or if not discovered via DNS SRV (not your case
 as you use IPs).

 So, the dialling party is the faulty one (198.162.0.1:9013 ) as it does
 not provide a correct location of callee.

 Regards,
 Bogdan

 James Mbuthia wrote:
  Hi guys,
 
  Hope you can help me out. I have a situation where my Opensips box is
  acting as a proxy/registration and location server. I have also
  changed my listening port from 5060 to 5059.
  The registration process works fine and my UAS gets a 200 response,
  its IP is 198.162.0.1:1167.
 
  However am getting a Request Timeout problem because once the proxy
  successfuly authenticates the UAC its forwading the INVITE request to
  my ip:5060. Since opensips is not configured on that port it gets a
  408 Request Time out. Below is a snapshot of the headers from a sip
  trace.
 
 
  udp:198.162.0.1:5059 - udp:198.162.0.1:7013
 
  SIP/2.0 407 Proxy Authentication Required
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=7013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1 sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
 ;tag=5594793ec2abca4d36972b7e2bfde24c.9363
  Call-ID:ysu...@198.162.0.1 call-id%3aysu...@198.162.0.1
  CSeq: 1 INVITE
  Proxy-Authenticate: Digest realm=198.162.0.1,
  nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830
  Server: OpenSIPS (1.6.2-notls (i386/linux))
  Content-Length: 0
 
 
  udp:198.162.0.1:9013 - udp:198.162.0.1:5059
 
  INVITE sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1 SIP/2.0
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=1645;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1 sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
  Call-ID:ysu...@198.162.0.1 call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Contact: sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
  Proxy-Authorization: Digest username=jm21, realm=198.162.0.1,
  nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830,
  uri=sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1,
  response=53a86a6afd0d9fc9a118cb4a304f75d6, algorithm=MD5
  Content-type: application/sdp
  Max-Forwards: 69
  Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
 
 
  udp:198.162.0.1:5059 - udp:198.162.0.1:5060
 
  INVITE sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1 SIP/2.0
  Record-Route: sip:198.162.0.1:5059;lr=on
  Via: SIP/2.0/UDP 198.162.0.1:5059;branch=z9hG4bKa8e9.181ea9f5.0
  Via: SIP/2.0/UDP
  198.162.0.1:1167;received=198.162.0.1;rport=9013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1 sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
  Call-ID:ysu...@198.162.0.1 call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Contact: sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
  Content-type: application/sdp
  Max-Forwards: 69
  Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
 
 
  udp:198.162.0.1:5059 - udp:198.162.0.1:9013
  SIP/2.0 408 Request Timeout
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=9013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1 sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 sip%3aja...@198.162.0.1
 ;tag=a2fc028f8d02e78ceae2b814452c9bc4-9363
  Call-ID:ysu...@198.162.0.1 call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Server: OpenSIPS (1.6.2-notls (i386/linux))
  Content-Length: 0
 
 
  My question is, why is the proxy routing the request to
  198.162.0.1:5060 even after Opensips is not listening on that port? Is
  it possible to get it to route the request to the UAS i.e
  198.162.0.1:1167?
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 


 --
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 15 - 19 November 2010, Edison, New Jersey, USA
 www.voice-system.ro


 ___
 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] ERROR:tm:t_forward_nonack: no branch for forwarding

2010-10-22 Thread Bogdan-Andrei Iancu
Hi Najib,

I guess you are using an opensips prior to 1.6  (by looking at the error 
messages)...As the message says , the t_relay() has no valid new 
destination where to send the request

Check for prior error - maybe the RURI was not valid, so the destination 
you set was discarded - no valid destination

Regards,
Bogdan

Najib Hara wrote:
 Hi everybody,

 I don't know if this problem is already solved but I can't find any 
 related information. I'm trying to relay requests through OpenSIPS to 
 another OpenSIPS server together on the same machine. And I got this 
 each time:

 Oct 18 11:53:00 Opensips opensips1[17997]:
 ERROR:tm:t_forward_nonack: no branch for forwarding

 Oct 18 11:53:00 Opensips opensips1[17997]: ERROR:tm:w_t_relay:
 t_forward_nonack failed

 ..

 Oct 18 11:53:00 Opensips opensips1[17997]:
 CRITICAL:tm:t_should_relay_response: pick_branch failed
 (lowest==-1) for code 488


 My t_relay function is used on the request route.

 Anyone could help me with this ?


 Thanks in advance

 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Static Routes in OpenSIPS proxy

2010-10-22 Thread Bogdan-Andrei Iancu
Of course it did, but the subject was static routingnot dynamic :)...

Regards,
Bogdan

Duane Larson wrote:

 Couldn't the dynamic routing module also be used depending on the 
 prefixes at each individal remote pbx system?

 On Oct 22, 2010 12:29 PM, Bogdan-Andrei Iancu 
 bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:

 Hello Andrea,

 If you check the default opensips.cfg, you can see that there is a step
 where only the initial requests are getting there - starting from that
 point you can implement your static routing using if statements,
 checking the $rU (request username ) and setting new destination
 (writing in $rd)

 Regards,
 Bogdan


 andrea wrote:
  Hi,
 
  i'm a beginner of OpenSIPS, i've installed 1.6 version using standard
  con...

 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 15 - 19 November 2010, Edison, New Jersey, USA
 www.voice-system.ro http://www.voice-system.ro



 ___
 Users mailing list
 Users@lists.opensips.org mailto:Users@lists.opensips.org
 http:/...

 

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


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


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


Re: [OpenSIPS-Users] Request Time out problem

2010-10-22 Thread Bogdan-Andrei Iancu
OK, cool

James Mbuthia wrote:
 Hi Bogdan,

 I figured that out after I went through the SIP rfc in more detail. 
 Thanks for your help though.

 james


 On Fri, Oct 22, 2010 at 7:04 PM, Bogdan-Andrei Iancu 
 bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:

 Hi James,

 As I see, the INVITE has in URI sip:ja...@198.168.0.1
 mailto:sip%3aja...@198.168.0.1

INVITE sip:ja...@198.162.0.1
 mailto:sip%3aja...@198.162.0.1 SIP/2.0

  without any port indication, so the default 5060 is assumed.  The
 proxy
 cannot automatically discover what's the right port on the next hop if
 not instructed by RURI or if not discovered via DNS SRV (not your case
 as you use IPs).

 So, the dialling party is the faulty one (198.162.0.1:9013
 http://198.162.0.1:9013 ) as it does
 not provide a correct location of callee.

 Regards,
 Bogdan

 James Mbuthia wrote:
  Hi guys,
 
  Hope you can help me out. I have a situation where my Opensips
 box is
  acting as a proxy/registration and location server. I have also
  changed my listening port from 5060 to 5059.
  The registration process works fine and my UAS gets a 200 response,
  its IP is 198.162.0.1:1167 http://198.162.0.1:1167.
 
  However am getting a Request Timeout problem because once the proxy
  successfuly authenticates the UAC its forwading the INVITE
 request to
  my ip:5060. Since opensips is not configured on that port it gets a
  408 Request Time out. Below is a snapshot of the headers from a sip
  trace.
 
 
  udp:198.162.0.1:5059 http://198.162.0.1:5059 -
 udp:198.162.0.1:7013 http://198.162.0.1:7013
 
  SIP/2.0 407 Proxy Authentication Required
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=7013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1
 mailto:sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
 ;tag=5594793ec2abca4d36972b7e2bfde24c.9363
  Call-ID:ysu...@198.162.0.1 mailto:call-id%3aysu...@198.162.0.1
  CSeq: 1 INVITE
  Proxy-Authenticate: Digest realm=198.162.0.1,
  nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830
  Server: OpenSIPS (1.6.2-notls (i386/linux))
  Content-Length: 0
 
 
  udp:198.162.0.1:9013 http://198.162.0.1:9013 -
 udp:198.162.0.1:5059 http://198.162.0.1:5059
 
  INVITE sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
 SIP/2.0
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=1645;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1
 mailto:sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
  Call-ID:ysu...@198.162.0.1 mailto:call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Contact: sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
  Proxy-Authorization: Digest username=jm21, realm=198.162.0.1,
  nonce=4cb83402000547477b91a54ae9e5a553b9b6b633d830,
  uri=sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1,
  response=53a86a6afd0d9fc9a118cb4a304f75d6, algorithm=MD5
  Content-type: application/sdp
  Max-Forwards: 69
  Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
 
 
  udp:198.162.0.1:5059 http://198.162.0.1:5059 -
 udp:198.162.0.1:5060 http://198.162.0.1:5060
 
  INVITE sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
 SIP/2.0
  Record-Route: sip:198.162.0.1:5059;lr=on
  Via: SIP/2.0/UDP 198.162.0.1:5059;branch=z9hG4bKa8e9.181ea9f5.0
  Via: SIP/2.0/UDP
  198.162.0.1:1167;received=198.162.0.1;rport=9013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1
 mailto:sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
  Call-ID:ysu...@198.162.0.1 mailto:call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Contact: sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
  Content-type: application/sdp
  Max-Forwards: 69
  Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
 
 
  udp:198.162.0.1:5059 http://198.162.0.1:5059 -
 udp:198.162.0.1:9013 http://198.162.0.1:9013
  SIP/2.0 408 Request Timeout
  Via: SIP/2.0/UDP 198.162.0.1:1167;rport=9013;branch=z9hG4bKynybt
  From:sip:j...@198.162.0.1
 mailto:sip%3aj...@198.162.0.1;tag=2325231
  To:sip:ja...@198.162.0.1 mailto:sip%3aja...@198.162.0.1
 ;tag=a2fc028f8d02e78ceae2b814452c9bc4-9363
  Call-ID:ysu...@198.162.0.1 mailto:call-id%3aysu...@198.162.0.1
  CSeq: 3 INVITE
  Server: OpenSIPS (1.6.2-notls (i386/linux))
  Content-Length: 0
 
 
  My question is, why is the proxy routing the request to
  198.162.0.1:5060 http://198.162.0.1:5060 even after Opensips
 is not listening on that port? Is
  it possible to get it to route the request to the UAS i.e
  198.162.0.1:1167 http://198.162.0.1:1167?
 
  

Re: [OpenSIPS-Users] Static Routes in OpenSIPS proxy

2010-10-22 Thread Duane Larson
Very true.  You got me there ;)

On Oct 22, 2010 1:12 PM, Bogdan-Andrei Iancu bog...@voice-system.ro
wrote:

Of course it did, but the subject was static routingnot dynamic :)...

Regards,
Bogdan


Duane Larson wrote:

 Couldn't the dynamic routing module also be used depending on the
 prefix...

 bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:

 Hello Andrea,

 If you ...
 www.voice-system.ro http://www.voice-system.ro



 ___
 Users mailing list
 Users@lists.opensips.org mailto:Users@lists.opensips.org
 http:/...

 


 ___
 Users mailing list
 Users@lists.opensips.org

 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--

Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-syste...

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] Dispatcher failover re-enabling with probing

2010-10-22 Thread thrillerbee
Thank you!
I'll give that a shot  report back.

Ryan

On Fri, Oct 22, 2010 at 12:07 PM, Bogdan-Andrei Iancu 
bog...@voice-system.ro wrote:

 Hi,

 what group are you using for your destination (in dispatcher) ? if 0,
 use another one :D...there is an issue there...

 Regards,
 Bogdan

 thrillerbee wrote:
  I could still use some help on understanding what I'm missing that is
  preventing gws from transitioning back into the 'active' state from
  'probing'.  Currently, I have to babysit this OpenSIPS instance.
 
  Again, to summarize, when dispatcher detects a failure, it puts the gw
  into 'probing' state  begins sending OPTIONS messages to the failed
  gw.  Even though the gateway begins replying with 200s, dispatcher
  never returns it to an 'active' state.  I have to restart OpenSIPS to
  return it to an 'active' state.
 
  Here are the relevant pieces of my config script:
  # - dispatcher params -
  modparam(dispatcher, flags, 2)
  modparam(dispatcher, dst_avp, $avp(i:271))
  modparam(dispatcher, attrs_avp, $avp(i:272))
  modparam(dispatcher, grp_avp, $avp(i:273))
  modparam(dispatcher, cnt_avp, $avp(i:274))
  modparam(dispatcher, ds_ping_interval, 1)
  modparam(dispatcher, ds_probing_threshhold, 32)
  modparam(dispatcher, ds_probing_mode, 0)
  modparam(dispatcher, options_reply_codes, 501, 403, 200)
 
  failure_route[1]
  {
  if (t_was_cancelled()) {
  exit;
  }
  if ((t_check_status(408))  (t_local_replied(last)))
  {
  xlog(L_ERR,Gateway Failure! $ci\n);
  ds_mark_dst(p);
  t_on_failure(1);
  t_relay();
  }
  }
 
  Again, any assistance would be greatly appreciated.
 
  Thanks.
 
 
 
  On Mon, Oct 18, 2010 at 7:31 AM, thrillerbee thriller...@gmail.com
  mailto:thriller...@gmail.com wrote:
 
  Anca,
 
  I have configured the ds_probing_threshold parameter which allows
  me to adjust when I gw goes from active to probing.
 
  However, my issue is getting the gw back to active.  For some
  reason, it will never transition back - even with successful 200
  OK responses to the OPTIONS messages that are triggered when a gw
  goes to probing.  The examples below show that I can't even
  force it back to active from probing to active with MI commands -
  I have to restart OpenSIPS.
 
  Thanks.
 
 
  On Mon, Oct 18, 2010 at 5:50 AM, Anca Vamanu a...@opensips.org
  mailto:a...@opensips.org wrote:
 
  Hi Thrillerbee,
 
  You can try to adjust the time when a gateway  state is
  changed into probing by setting the ds_probing_threshhold ||
  parameter
  (
 http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id250525).
 
  Regards,
  --
 
  Anca Vamanu
  www.voice-system.ro http://www.voice-system.ro
 
 
  On 10/16/2010 08:01 AM, thrillerbee wrote:
  I have been able to get the dispatcher module to detect a gw
  failure and put it into a probing state  route traffic
  elsewhere.  However, when the gw returns ( begins responding
  to OPTIONS with 200s), dispatcher never puts it back in the
  active state.
 
  In fact, I cannot even manually put the server back in the
  active state with mi functions.  I can put it in an inactive
  state, but it returns to probing if I try to set it to active:
 
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=P
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
  ogw1:~# opensipsctl fifo ds_set_state i 0 sip:12.121.80.38
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=I
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
  ogw1:~# opensipsctl fifo ds_set_state a 0 sip:12.121.80.38
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=P
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
 
  Is there some setting that I am missing that allows gateways
  to transition from probing to active?
 
  Thanks.
 
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
  
 
  

Re: [OpenSIPS-Users] opensips tm timer core dump

2010-10-22 Thread Kennard_White

Hi Bogdan,

I believe I found the problem. When sip_msg_cloner() within build_cell()
fails due to out-of-mem, and dangling pointer to the cell is left in the
global transaction pointer. Later on the post_cb() code attempts to clean
this up, and resurrects the now-free memory, and in particular puts it on
a wait timer. My guess is that later on this memory is allocated into a new
transaction which eventually uses the same wait timer link, and the two
threads fight it out.

Adding a set_t(0) fixes the problem. While looking, I believe I found a
memory leak in uac creation code that is also triggered by out of memory
conditions. Please see attached patch.

The problem also manifest itself as a core dump with insert_timer_unsafe.
Once I disabled optimization, I saw multiple variations within this
function. The most common was that ptr==tl after the search.  The sequence
of events for this is: new cell created, stored into global T, free'd,
added to wait-list by cleanup code from global T, memory re-allocated into
new cell, timer link zero'd, and then added again to wait list. At least
that is my best guess.

Regards,
Kennard

(See attached file: opensips-tm-cell.patch)



From:   Bogdan-Andrei Iancu bog...@voice-system.ro
To: OpenSIPS users mailling list users@lists.opensips.org
Date:   10/22/2010 07:02 AM
Subject:Re: [OpenSIPS-Users] opensips tm timer core dump
Sent by:users-boun...@lists.opensips.org



Hi Kennard,

I suppose the bt is the same ? do you still have the core file ?

Regards,
Bogdan

kennard_wh...@logitech.com wrote:

 Hi Bodgen,

 I replicated the error. Unfortunately the entire insert_timer_unsafe
 and been in-lined and little is available:

 Program terminated with signal 11, Segmentation fault.
 #0 0x7f8b8356c2c2 in insert_timer_unsafe (new_tl=0x7f8b7a54e310,
 list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at timer.c:731
 731 timer.c: No such file or directory.
 in timer.c
 (gdb) print tl
 $1 = value optimized out
 (gdb) print *tl
 Cannot access memory at address 0x0
 (gdb) print ptr
 $2 = value optimized out
 (gdb) print *ptr
 Cannot access memory at address 0x0
 (gdb) print *new_tl
 No symbol new_tl in current context.
 (gdb) up
 #1 set_1timer (new_tl=0x7f8b7a54e310, list_id=WT_TIMER_LIST,
 ext_timeout=value optimized out) at timer.c:904
 904 in timer.c
 (gdb) print *new_tl
 $3 = {next_tl = 0x0, prev_tl = 0x0, ld_tl = 0x0, time_out = 0,
 timer_list = 0x0, deleted = 0}
 (gdb) print list
 $4 = value optimized out
 (gdb) print timeout
 $5 = 32
 (gdb) print new_tl
 $6 = (struct timer_link *) 0x7f8b7a54e310

 I'll keep the core for a while -- please let me know if there is
 anything else I can try.

 Thanks,
 Kennard

 Inactive hide details for Bogdan-Andrei Iancu ---10/08/2010 04:40:47
 AM---Hi Kennard, Ok, keep the core next time :)Bogdan-Andrei Iancu
 ---10/08/2010 04:40:47 AM---Hi Kennard, Ok, keep the core next time :)

 From: Bogdan-Andrei Iancu bog...@voice-system.ro
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: 10/08/2010 04:40 AM
 Subject: Re: [OpenSIPS-Users] opensips tm timer core dump
 Sent by: users-boun...@lists.opensips.org

 



 Hi Kennard,

 Ok, keep the core next time :)

 Regards,
 Bogdan

 kennard_wh...@logitech.com wrote:
 
  Hi Bogden,
 
  Thanks for explaining the child processes involved -- I misunderstood
  what was happening.
 
  Unfortunately, I don't have the core anymore. My recollection is that
  I couldn't print anything useful due to compiler optimization. That
  said, this should re-create pretty easily, and I'll get more dumps
  next time it happens.
 
  Regards,
  Kennard
 
  Inactive hide details for Bogdan-Andrei Iancu ---10/05/2010 01:41:38
  AM---Hi Kennard, The core was generated by process 22255:Bogdan-Andrei
  Iancu ---10/05/2010 01:41:38 AM---Hi Kennard, The core was generated
  by process 22255:
 
  From: Bogdan-Andrei Iancu bog...@voice-system.ro
  To: OpenSIPS users mailling list users@lists.opensips.org
  Date: 10/05/2010 01:41 AM
  Subject: Re: [OpenSIPS-Users] opensips tm timer core dump
  Sent by: users-boun...@lists.opensips.org
 
 

 
 
 
  Hi Kennard,
 
  The core was generated by process 22255:
 [22238]: INFO:core:handle_sigs: child process 22255 exited by a
  signal 11
 
  and this process also reported mem problems:
 [22255]: ERROR:tm:new_t: out of mem
 
  Can you print the tl or ptr variables in frame 0?
 
  Regards,
  Bogdan
 
  kennard_wh...@logitech.com wrote:
  
   Running against opensips HEAD, I got a segfault in the tm timer code.
   I believe this is triggered by running out of shared memory.
  
  
   The stack trace:
  
   (gdb) where
   #0 0x7fe8f8d96212 in insert_timer_unsafe (new_tl=0x7fe8f66337b0,
   list_id=WT_TIMER_LIST, ext_timeout=value optimized out) at
 timer.c:731
   #1 set_1timer (new_tl=0x7fe8f66337b0, 

Re: [OpenSIPS-Users] Dispatcher failover re-enabling with probing

2010-10-22 Thread thrillerbee
Bogan,

That resolved it.  Thanks for the advice.

Ryan

On Fri, Oct 22, 2010 at 12:32 PM, thrillerbee thriller...@gmail.com wrote:

 Thank you!
 I'll give that a shot  report back.

 Ryan


 On Fri, Oct 22, 2010 at 12:07 PM, Bogdan-Andrei Iancu 
 bog...@voice-system.ro wrote:

 Hi,

 what group are you using for your destination (in dispatcher) ? if 0,
 use another one :D...there is an issue there...

 Regards,
 Bogdan

 thrillerbee wrote:
  I could still use some help on understanding what I'm missing that is
  preventing gws from transitioning back into the 'active' state from
  'probing'.  Currently, I have to babysit this OpenSIPS instance.
 
  Again, to summarize, when dispatcher detects a failure, it puts the gw
  into 'probing' state  begins sending OPTIONS messages to the failed
  gw.  Even though the gateway begins replying with 200s, dispatcher
  never returns it to an 'active' state.  I have to restart OpenSIPS to
  return it to an 'active' state.
 
  Here are the relevant pieces of my config script:
  # - dispatcher params -
  modparam(dispatcher, flags, 2)
  modparam(dispatcher, dst_avp, $avp(i:271))
  modparam(dispatcher, attrs_avp, $avp(i:272))
  modparam(dispatcher, grp_avp, $avp(i:273))
  modparam(dispatcher, cnt_avp, $avp(i:274))
  modparam(dispatcher, ds_ping_interval, 1)
  modparam(dispatcher, ds_probing_threshhold, 32)
  modparam(dispatcher, ds_probing_mode, 0)
  modparam(dispatcher, options_reply_codes, 501, 403, 200)
 
  failure_route[1]
  {
  if (t_was_cancelled()) {
  exit;
  }
  if ((t_check_status(408))  (t_local_replied(last)))
  {
  xlog(L_ERR,Gateway Failure! $ci\n);
  ds_mark_dst(p);
  t_on_failure(1);
  t_relay();
  }
  }
 
  Again, any assistance would be greatly appreciated.
 
  Thanks.
 
 
 
  On Mon, Oct 18, 2010 at 7:31 AM, thrillerbee thriller...@gmail.com
  mailto:thriller...@gmail.com wrote:
 
  Anca,
 
  I have configured the ds_probing_threshold parameter which allows
  me to adjust when I gw goes from active to probing.
 
  However, my issue is getting the gw back to active.  For some
  reason, it will never transition back - even with successful 200
  OK responses to the OPTIONS messages that are triggered when a gw
  goes to probing.  The examples below show that I can't even
  force it back to active from probing to active with MI commands -
  I have to restart OpenSIPS.
 
  Thanks.
 
 
  On Mon, Oct 18, 2010 at 5:50 AM, Anca Vamanu a...@opensips.org
  mailto:a...@opensips.org wrote:
 
  Hi Thrillerbee,
 
  You can try to adjust the time when a gateway  state is
  changed into probing by setting the ds_probing_threshhold ||
  parameter
  (
 http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id250525
 ).
 
  Regards,
  --
 
  Anca Vamanu
  www.voice-system.ro http://www.voice-system.ro
 
 
  On 10/16/2010 08:01 AM, thrillerbee wrote:
  I have been able to get the dispatcher module to detect a gw
  failure and put it into a probing state  route traffic
  elsewhere.  However, when the gw returns ( begins responding
  to OPTIONS with 200s), dispatcher never puts it back in the
  active state.
 
  In fact, I cannot even manually put the server back in the
  active state with mi functions.  I can put it in an inactive
  state, but it returns to probing if I try to set it to active:
 
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=P
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
  ogw1:~# opensipsctl fifo ds_set_state i 0 sip:12.121.80.38
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=I
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
  ogw1:~# opensipsctl fifo ds_set_state a 0 sip:12.121.80.38
  ogw1:~# opensipsctl fifo ds_list
  SET_NO:: 1
  SET:: 0
  URI:: sip:12.121.80.38 flag=P
  URI:: sip:12.121.80.39 flag=A
  URI:: sip:12.121.80.40 flag=A
 
  Is there some setting that I am missing that allows gateways
  to transition from probing to active?
 
  Thanks.
 
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  

Re: [OpenSIPS-Users] How to t_relay() from two send socket?

2010-10-22 Thread CheeWii
Hi,Bogdan
No,I want to received a INVITE request and a MESSAGE request, then I send
MESSAGE on public interface and send INVITE on private interface.How can I
accomplish this?

Regards,
CheeWii

2010/10/23 Bogdan-Andrei Iancu bog...@voice-system.ro

 Hi CheeWii,

 Do you want to received the a INVITE request and to send it to two
 destinations , one on private interface and one on public interface? Did
 I get it right ?

 Regards,
 Bogdan

 CheeWii wrote:
  Hi,
   My OpenSIPS server has two network cards. One is public ip
  address such as 202.102.XX.XX,and the other is private ip address,such
  as 10.0.1.5.
 
   Now ,I want to forward INVITE ,BYE,CANCEL from 10.0.1.5 to
  10.0.1.6,while forward MESSAGE and REGISTER from 202.102.XX.XX to
  202.102.YY.YY.
 
   I have test use force_send_socket to control the send sockets to
  different kinds of messages,but it seems to unuseful. It just send
  message from one socket. How can we accomplish this demo? Thanks a lot.
 
  CheeWii
 
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


 --
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 15 - 19 November 2010, Edison, New Jersey, USA
 www.voice-system.ro


 ___
 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