[OpenSIPS-Users] what is DROP_RATE means?...

2010-10-05 Thread Pavel Eremin
I include RATELIMIT module to my OpenSIPS installation and i have a question: 
What is DROP_RATE when i run rl_stat command...
if DROP_RATE grows is it dangerous?

-- 
Pavel Eremin

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


Re: [OpenSIPS-Users] DRouting - routeid, prefix questions

2010-10-05 Thread Maciej Bylica
Bogdan,

> only digits are accepted. So you can:
>    1) remove the starting * before doing do_routing()
>    2) replace * with a digit (like 0)
>

This is exactly what i am doing now.
I need to find out some examples here to tune up my routeid.

Thanks Bogdan for clearing this up.
Maciej.

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


[OpenSIPS-Users] How to change Contact header

2010-10-05 Thread David Santiago
Hi all,

I need to modify the host part of a contact header. I'm trying something like:

if ( subst('/^Contact: /ig') ) {
xlog("contact modified!");
};

but the resulting Contact header is wrong and cannot be processed.

Having a look at the header with wireshark shows that the "Contact
Binding" entry is missing the ending ">", but the "Contact", "URI" or
"SIP contact address" have the ">" at the end  :L

May be this is not the right way to modify a Contact header...


Thanks in advance,
David

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


Re: [OpenSIPS-Users] OpenSIPS hang - 1.6.3

2010-10-05 Thread James Lamanna
I removed the modules/xlog directory and rebuilt, and now things seem
to be working better.
I'll let you know if I have any more issues

Thanks for your help.

-- James

On Tue, Oct 5, 2010 at 7:12 AM, James Lamanna  wrote:
> Ok it looks like the 1.6 trunk has an error in the build/install process:
> # svn up
> At revision 7247.
>
> # make all (or make install)
>
> .
>
> make[1]: Entering directory `/home/james/opensips_1_6/modules/xlog'
> make[1]: *** No targets specified and no makefile found.  Stop.
> make[1]: Leaving directory `/home/james/opensips_1_6/modules/xlog'
> make: *** [modules] Error 2
>
> -- James
>
> On Tue, Oct 5, 2010 at 4:43 AM, Anca Vamanu  wrote:
>> Hi James,
>>
>> Please describe the problems that you see - there is no one else
>> reporting problems with the new version of pua module so I need to know
>> exactly which is the behavior.  Do you see the opensips process ocupying
>> 100% cpu or what happens?
>>
>> Regards,
>>
>> --
>> Anca Vamanu
>> www.voice-system.ro
>>
>>
>>
>> On 10/05/2010 04:09 AM, James Lamanna wrote:
>>> Unfortunately, I'm still getting a hang of some sort with 1.6 trunk.
>>> It doesn't happen quite as fast, but it still occurs after I try and
>>> make a call.
>>> However, the call still does not complete.
>>> Sometimes it doesn't totally hang, but the registration of my phone is 
>>> dropped.
>>> Opensips then appears to reset and get the registration back.
>>>
>>> -- James
>>>
>>>
>>> On Mon, Oct 4, 2010 at 2:39 AM, Anca Vamanu  wrote:
>>>
 Hi James,

 Please try the svn version, also for 1.6 branch. There was indeed a
 deadlock problem, but it has been in the svn version.

 Regards,

 --
 Anca Vamanu
 www.voice-system.ro


 On 10/03/2010 06:36 PM, James Lamanna wrote:

> On Sun, Oct 3, 2010 at 8:24 AM, James Lamanna    
> wrote:
>
>
>> On Sun, Oct 3, 2010 at 8:17 AM, James Lamanna    
>> wrote:
>>
>>
>>> Btw, this happens whenever I try to place a call.
>>> It also crashes my phone, a Cisco 509G.
>>>
>>>
>> Also, removing all pua/presence function calls enables calls to be made 
>> again.
>> I assume something changed in 1.6.3 that has made my config file 
>> incorrect?
>>
>>
> If I remove the second dialoginfo_set() from the local INVITE (from a
> phone), then the program goes away.
> However, if I need to maintain presence, don't I need to publish this,
> so SUBSCRIBED phones get notified that the phone making the call is in
> use?
>
> -- James
>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>

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


Re: [OpenSIPS-Users] OpenSIPS hang - 1.6.3

2010-10-05 Thread James Lamanna
Ok it looks like the 1.6 trunk has an error in the build/install process:
# svn up
At revision 7247.

# make all (or make install)

.

make[1]: Entering directory `/home/james/opensips_1_6/modules/xlog'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/home/james/opensips_1_6/modules/xlog'
make: *** [modules] Error 2

-- James

On Tue, Oct 5, 2010 at 4:43 AM, Anca Vamanu  wrote:
> Hi James,
>
> Please describe the problems that you see - there is no one else
> reporting problems with the new version of pua module so I need to know
> exactly which is the behavior.  Do you see the opensips process ocupying
> 100% cpu or what happens?
>
> Regards,
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
>
> On 10/05/2010 04:09 AM, James Lamanna wrote:
>> Unfortunately, I'm still getting a hang of some sort with 1.6 trunk.
>> It doesn't happen quite as fast, but it still occurs after I try and
>> make a call.
>> However, the call still does not complete.
>> Sometimes it doesn't totally hang, but the registration of my phone is 
>> dropped.
>> Opensips then appears to reset and get the registration back.
>>
>> -- James
>>
>>
>> On Mon, Oct 4, 2010 at 2:39 AM, Anca Vamanu  wrote:
>>
>>> Hi James,
>>>
>>> Please try the svn version, also for 1.6 branch. There was indeed a
>>> deadlock problem, but it has been in the svn version.
>>>
>>> Regards,
>>>
>>> --
>>> Anca Vamanu
>>> www.voice-system.ro
>>>
>>>
>>> On 10/03/2010 06:36 PM, James Lamanna wrote:
>>>
 On Sun, Oct 3, 2010 at 8:24 AM, James Lamanna    wrote:


> On Sun, Oct 3, 2010 at 8:17 AM, James Lamanna    
> wrote:
>
>
>> Btw, this happens whenever I try to place a call.
>> It also crashes my phone, a Cisco 509G.
>>
>>
> Also, removing all pua/presence function calls enables calls to be made 
> again.
> I assume something changed in 1.6.3 that has made my config file 
> incorrect?
>
>
 If I remove the second dialoginfo_set() from the local INVITE (from a
 phone), then the program goes away.
 However, if I need to maintain presence, don't I need to publish this,
 so SUBSCRIBED phones get notified that the phone making the call is in
 use?

 -- James

>
> ___
> 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] Adding data to a request before relaying it

2010-10-05 Thread Najib Hara




Hi Anca,

Thank you for your quick response. It would be great if you can give me your 
opinion on the routing logic that I made to respond to this type of scenario:

---
loadmodule "tm.so"
loadmodule "textops.so"
...
---
route{
if(is_method("INVITE")) {
t_relay("tcp:server_adress:5060");
t_on_failure("1");
}
}
failure_route[1] {
if(t_check_status("600") {
add_body("$rb)", "Data");
# this function adds a body to a message or replace it if existing, but I'm not 
sure I can use a pseudo-variable as a parameter
$(rb) = $(rb);
# another possibility and again I'm not sure that those are R/W variables
t_relay();
}
}

Date: Tue, 5 Oct 2010 14:28:54 +0300
From: a...@opensips.org
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Adding data to a request before relaying it






  
  Message body


Hi Najib,



>From failure route you can access also the reply - with the context
specification in front of the variable name -
http://www.opensips.org/Resources/DocsCoreVar. By default the message
that you have access to in failure route is the request.

To send the Invite to another destination just set the $du and do
t_relay().



Regards,

-- 
Anca Vamanu
www.voice-system.ro








On 10/05/2010 01:12 PM, Najib Hara wrote:

  Hi,

  

Probably , the best way is to use 302 replies, but I'm still looking
for a way to collect the data from these replies (or from 600 errors).
Is there a function or a module who can handle it ?

I also need to get my INVITEs back so I could insert the collected data
in their bodies.  I know that The TM module can duplicate SIP messages
in memory, but how to deal with 2 messages at the same time ? 

As a memo, here are the steps:

  
send the received INVITE to a server
get a 302 reply from the server with data on the body
collect the data from the 302 reply
insert data on the INVITE
resend it to the initial destination
  
  

Thanks

  

  From: lebron_na...@hotmail.com

To: users@lists.opensips.org

Date: Fri, 1 Oct 2010 13:24:07 +

Subject: Re: [OpenSIPS-Users] Adding data to a request before relaying
it

  

  
  
  
Thank you Anca, I'm working on it and I'll post the specific part of
the routing logic as soon as finished.

  

  From: lebron_na...@hotmail.com

To: users@lists.opensips.org

Subject: Adding data to a request before relaying it

Date: Fri, 1 Oct 2010 08:55:05 +

  

  
Hi everybody,

  

I'm a newer in the OpenSIPS world and I'm trying to learn how to use it
efficiently.

I'm working on a project where I have to modify incoming requests
before relaying them to their first destination.

By modifying, I mean sending those requests to a server which will send
back messages with the additional data to implement in the requests.

The next step is to collect those informations from the responses and
add them to the initial requests which will be relayed to their initial
destination.

My question is: is OpenSIPS capable of doing this ?

  

For more detail, here is a scheme.

  

Thank you in advance for your responses

  

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




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


Re: [OpenSIPS-Users] Serialforking failure, with lcr:pa rse_phostport: too many colons in udp:: 0

2010-10-05 Thread Taisto Qvist (WM)
Hi again, and thanks for your reply! 

Personally I think alternative 2 feels best. It's similar to how 
other functions use the returncode for status indications. 
But either solution works for me, even though the first solution 
is more specific for my requirement, and i suppose that the more 
generic the solution the better.

Regards
Taisto


On Tue, 05 Oct 2010 11:53:40 +0300, Bogdan-Andrei Iancu
 wrote:
> Hi Taisto,
> 
>> Concerning the timer issue, I know about the avp-concept, and with your
>> solution below, I can figure out how to change the timer when serial
>> forking starts.
>> But what I also wanted, was to make sure that the last branch in the
>> fork was given a normal timer C.
>> In other words, as long as there are available branches, I will
>> "rollOver" to the next branch fairly quickly, but once i start the
>> last branch, normal timer C would apply.
>> (in other words, what the "fr_inv_timer_next"  did in lcr)
>> So I would need, I think, to figure out in a failure_route(), that
>> the branches I am starting with next_branches() are the last ones.
>> But how can I know that? I cant find a way to count remaining branches?
> I see, I was not aware of this functionality of lcr functions. This can 
> be fixed in several ways:
> 1) next_branches() get a new extra optional param - the rollover 
>timeout - it will be set only if other branches are still
available. If 
>not, the default timeout can be used
> 2) next_branches() can return (1) if a next branch was set and other

>branches are available and (2) if a next branch was set and NO
other 
>branches are available; and you can do from script all your
timeout logic.
> 3) add a new function "still_has_branches()" to use after 
>next_branches().
> 
> Which approach you think is the simplest to use and also flexible enough

> to cover all cases ?
> 
> Regards,
> Bogdan
>>
>> Btw, my "hack" was never intended as a real fix. I was just grasping
>> at straws during troubleshooting. Also, it didnt solve the scenario
>> of when there is only ONE contact in the target set.
>> Then it fails again since there are no branches, just a req-uri.
>>
>> Thanks again,
>> Taisto Qvist
>>
>> Bogdan-Andrei Iancu skrev 2010-09-29 09:45:
>>> Hi Taisto,
>>>
>>> These new functions do replicate the behaviour of the old lcr 
>>> functions..the idea was to make this serialize mechanism globally 
>>> available for all modules.
>>>
>>> Now, if all contacts have the same Q, there is nothing to 
>>> serialize.Probably it will be more logical to return "false" to 
>>> script in such a case (if no serialization was done)But you can do

>>> something like:
>>>
>>> --
>>> lookup("location", "m");
>>> switch ($retcode)
>>> {
>>> case 1:
>>> log(2, "(lab2) - Contact found in location server, rerouting.\n");
>>> if ( serialize_branches(0) && next_branches())
>>> {
>>>   log(1, "(lab2) - serial forking in progress\n");
>>>   setflag(NN);  # remember to resume serial forking in failure
route
>>> }
>>> xlog("sending to RURI=$ru ; branches=$(branch(uri)[*])\n");
>>> return(1);
>>> ---
>>>
>>>
>>> Regarding the timer stuff, see my prev email.
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Taisto Qvist wrote:
>>> 
 It seems like I cried "yay" to soon.

 Serialforking does work even though I cant figure out(trying the 
 rtfm-concept)
 how I can reduce the "timer C" for only the serial-forking scenario,
 which
 I was capable of doing with the lcr modulebut now Parallell 
 forking doesnt
 work anymore :-(

 I changed my script to:
 --
 lookup("location", "m");
 switch ($retcode)
 {
 case 1:
 log(2, "(lab2) - Contact found in location server,
rerouting.\n");
 if (!serialize_branches(0))
 {
   log(1, "(lab2) - Unable to load contacts for serial
forking\n");
   t_reply("500", "Server Internal Error (Serial fork)");
   exit;
 }
 if ( !next_branches() )
 {
   t_reply("509", "Serial fork error");
   exit;
 }
 return(1);
 ---

 But when my to UA's register with the SAME q-value, I get failure in 
 next_branches().

 ---
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Its a valid

 local user
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: 
 DBG:core:comp_scriptvar: int 20 : 0 / 0
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Stateful LS

 lookup()
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]:
DBG:registrar:lookup: 
 setting as ruri 
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]:
DBG:registrar:lookup: 
 looking for branches
 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]:
DBG:registrar:lookup: 
 setting branch 
 Sep 28 20:

Re: [OpenSIPS-Users] OpenSIPS hang - 1.6.3

2010-10-05 Thread Anca Vamanu
Hi James,

Please describe the problems that you see - there is no one else 
reporting problems with the new version of pua module so I need to know 
exactly which is the behavior.  Do you see the opensips process ocupying 
100% cpu or what happens?

Regards,

-- 
Anca Vamanu
www.voice-system.ro



On 10/05/2010 04:09 AM, James Lamanna wrote:
> Unfortunately, I'm still getting a hang of some sort with 1.6 trunk.
> It doesn't happen quite as fast, but it still occurs after I try and
> make a call.
> However, the call still does not complete.
> Sometimes it doesn't totally hang, but the registration of my phone is 
> dropped.
> Opensips then appears to reset and get the registration back.
>
> -- James
>
>
> On Mon, Oct 4, 2010 at 2:39 AM, Anca Vamanu  wrote:
>
>> Hi James,
>>
>> Please try the svn version, also for 1.6 branch. There was indeed a
>> deadlock problem, but it has been in the svn version.
>>
>> Regards,
>>
>> --
>> Anca Vamanu
>> www.voice-system.ro
>>
>>
>> On 10/03/2010 06:36 PM, James Lamanna wrote:
>>  
>>> On Sun, Oct 3, 2010 at 8:24 AM, James Lamannawrote:
>>>
>>>
 On Sun, Oct 3, 2010 at 8:17 AM, James Lamannawrote:

  
> Btw, this happens whenever I try to place a call.
> It also crashes my phone, a Cisco 509G.
>
>
 Also, removing all pua/presence function calls enables calls to be made 
 again.
 I assume something changed in 1.6.3 that has made my config file incorrect?

  
>>> If I remove the second dialoginfo_set() from the local INVITE (from a
>>> phone), then the program goes away.
>>> However, if I need to maintain presence, don't I need to publish this,
>>> so SUBSCRIBED phones get notified that the phone making the call is in
>>> use?
>>>
>>> -- James
>>>

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


Re: [OpenSIPS-Users] DRouting - routeid, prefix questions

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

only digits are accepted. So you can:
1) remove the starting * before doing do_routing()
2) replace * with a digit (like 0)

Regards,
Bogdan

Maciej Bylica wrote:
> Hi Bogdan,
>
>   
>>> 3) prefix is char(64), could I use * char there?
>>>
>>>   
>> only numerical prefixes are accepted . If you want to define a rule to
>> match all prefixes (wildcard), simpy use a an empty string prefix.
>>
>> 
> I meant, how to define a star char '*'?
> Entry '*3 ' for dialed *3999 is not working.
>
> Thanks for the rest info.
>
> Regards,
> 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] Components required to use it as Class4 & Class5 Softswitch

2010-10-05 Thread Anca Vamanu

Hi Abid,

Yes, you can have topology hiding functionality with b2b_entities and 
b2b_logic modules - see
http://www.opensips.org/Resources/B2buaTutorial#toc12 and a 
configuration file example 
http://www.opensips.org/Resources/B2bConfigExample.


Regards,

--
Anca Vamanu
www.voice-system.ro


On 10/05/2010 02:11 PM, Abid Saleem wrote:

Dear Max,

Thank you for your response. What about the SBC functionality in 
OpenSIPS? Can it also provide Topology Hiding function?


Regard

Abid Saleem
Sr. Product Manager
Terminus Technologies


Date: Mon, 4 Oct 2010 16:35:48 +0200
From: m...@42com.com
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Components required to use it as Class4 
& Class5 Softswitch


Hi,

Opensips offers a modular setup, where the core provides just SIP 
routing/registrar functions and you can add additional features by 
loading modules for the purpose you mentioned. e.g. using b2bua module 
for b2bua functionality.


Mediaproxy/mediaserver/Class5 PBX features would need another instance 
for example asterisk or any other SIP media gateways not opensips 
(pure proxy/routing server).



Best Regards

Max M.


Am 04.10.2010 15:49, schrieb Abid Saleem:

Hi All,

I am totally new to OpenSIPS and we want to use OpenSIPS as a
development platform to develop Class 4 & Class 5 SOftswitch
system. Could someone please help to understand what are the
components required and what functions are provided by OpenSIPS
itself. For Example if we require SIP Proxy Server, SBC B2BUA,
Media Server or Media Proxy, Class 5 PBX and Routing Server etc etc.

Regards
-
Abid Saleem
Sr. Product Manager
Terminus Technologies


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




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



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


Re: [OpenSIPS-Users] Adding data to a request before relaying it

2010-10-05 Thread Anca Vamanu

Hi Najib,

From failure route you can access also the reply - with the context 
specification in front of the variable name - 
http://www.opensips.org/Resources/DocsCoreVar. By default the message 
that you have access to in failure route is the request.

To send the Invite to another destination just set the $du and do t_relay().

Regards,

--
Anca Vamanu
www.voice-system.ro





On 10/05/2010 01:12 PM, Najib Hara wrote:

Hi,

Probably , the best way is to use 302 replies, but I'm still looking 
for a way to collect the data from these replies (or from 600 errors). 
Is there a function or a module who can handle it ?
I also need to get my INVITEs back so I could insert the collected 
data in their bodies.  I know that The TM module can duplicate SIP 
messages in memory, but how to deal with 2 messages at the same time ?

As a memo, here are the steps:

* send the received INVITE to a server
* get a 302 reply from the server with data on the body
* collect the data from the 302 reply
* insert data on the INVITE
* resend it to the initial destination


Thanks


From: lebron_na...@hotmail.com
To: users@lists.opensips.org
Date: Fri, 1 Oct 2010 13:24:07 +
Subject: Re: [OpenSIPS-Users] Adding data to a request before relaying it

Thank you Anca, I'm working on it and I'll post the specific part of 
the routing logic as soon as finished.



From: lebron_na...@hotmail.com
To: users@lists.opensips.org
Subject: Adding data to a request before relaying it
Date: Fri, 1 Oct 2010 08:55:05 +

Hi everybody,

I'm a newer in the OpenSIPS world and I'm trying to learn how to use 
it efficiently.
I'm working on a project where I have to modify incoming requests 
before relaying them to their first destination.
By modifying, I mean sending those requests to a server which will 
send back messages with the additional data to implement in the requests.
The next step is to collect those informations from the responses and 
add them to the initial requests which will be relayed to their 
initial destination.

My question is: is OpenSIPS capable of doing this ?

For more detail, here is a scheme.

Thank you in advance for your responses

___ 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] Components required to use it as Class4 & Class5 Softswitch

2010-10-05 Thread Abid Saleem

Dear Max,
Thank you for your response. What about the SBC functionality in OpenSIPS? Can 
it also provide Topology Hiding function?
RegardAbid SaleemSr. Product ManagerTerminus Technologies

Date: Mon, 4 Oct 2010 16:35:48 +0200
From: m...@42com.com
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Components required to use it as Class4 & Class5 
Softswitch



  



  
  
Hi,



Opensips offers a modular setup, where the core provides just SIP
routing/registrar functions and you can add additional features by
loading modules for the purpose you mentioned. e.g. using b2bua
module for b2bua functionality. 



Mediaproxy/mediaserver/Class5 PBX features would need another
instance for example asterisk or any other SIP media gateways not
opensips (pure proxy/routing server).





Best Regards



Max M.





Am 04.10.2010 15:49, schrieb Abid Saleem:

  
  Hi All,
  

  
  I am totally new to OpenSIPS and we want to use OpenSIPS as a
development platform to develop Class 4 & Class 5 SOftswitch
system. Could someone please help to understand what are the
components required and what functions are provided by OpenSIPS
itself. For Example if we require SIP Proxy Server, SBC B2BUA,
Media Server or Media Proxy, Class 5 PBX and Routing Server etc
etc.
  

  
  Regards
  -
  Abid Saleem
  Sr. Product Manager
  Terminus Technologies
  
___
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] DRouting - routeid, prefix questions

2010-10-05 Thread Maciej Bylica
Hi Bogdan,

>> 3) prefix is char(64), could I use * char there?
>>
> only numerical prefixes are accepted . If you want to define a rule to
> match all prefixes (wildcard), simpy use a an empty string prefix.
>
I meant, how to define a star char '*'?
Entry '*3 ' for dialed *3999 is not working.

Thanks for the rest info.

Regards,
Maciej

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


Re: [OpenSIPS-Users] Adding data to a request before relaying it

2010-10-05 Thread Najib Hara

Hi,

Probably , the best way is to use 302 replies, but I'm still looking for a way 
to collect the data from these replies (or from 600 errors). Is there a 
function or a module who can handle it ?
I also need to get my INVITEs back so I could insert the collected data in 
their bodies.  I know that The TM module can duplicate SIP messages in memory, 
but how to deal with 2 messages at the same time ? 
As a memo, here are the steps:
send the received INVITE to a serverget a 302 reply from the server with data 
on the bodycollect the data from the 302 replyinsert data on the INVITEresend 
it to the initial destination
Thanks

From: lebron_na...@hotmail.com
To: users@lists.opensips.org
Date: Fri, 1 Oct 2010 13:24:07 +
Subject: Re: [OpenSIPS-Users] Adding data to a request before relaying it








Thank you Anca, I'm working on it and I'll post the specific part of the 
routing logic as soon as finished.

From: lebron_na...@hotmail.com
To: users@lists.opensips.org
Subject: Adding data to a request before relaying it
Date: Fri, 1 Oct 2010 08:55:05 +








Hi everybody,

I'm a newer in the OpenSIPS world and I'm trying to learn how to use it 
efficiently.
I'm working on a project where I have to modify incoming requests before 
relaying them to their first destination.
By modifying, I mean sending those requests to a server which will send back 
messages with the additional data to implement in the requests.
The next step is to collect those informations from the responses and add them 
to the initial requests which will be relayed to their initial destination.
My question is: is OpenSIPS capable of doing this ?

For more detail, here is a scheme.

Thank you in advance for your responses
  

___
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] Serialforking failure, with lcr:parse_phostport: too many colons in udp:: 0

2010-10-05 Thread Bogdan-Andrei Iancu
Hi Taisto,

Taisto Qvist wrote:
> Hi Bogdan, and thanks again for the quick replies!
>
> I'll try the suggestion below. The downside of that solution(i think?)
> is that cant know if there was a real failure of the serialize&&next()-
> functions, and return an "serialforking-specific" error response if
> it was.
I do not think this is a problem - doesn't matter if there was nothing 
to serialize or the serialize process failed, you should carry on with 
normal forwarding - there are no other options.
> If something causes the serialize&&next_branches() to fail, that fault
> will be caught during t_relay later, which generates a (general?) failure
> response by TM...but no matter. this is a sip-course setup, so it will do.
the reasons to fail for serialize&branches() are not affecting t_relay() 
at all - the first 2 may fail because of mem issue only, so there is no 
error that you may catch in advance for t_relay.
>
> Concerning the timer issue, I know about the avp-concept, and with your
> solution below, I can figure out how to change the timer when serial
> forking starts.
> But what I also wanted, was to make sure that the last branch in the
> fork was given a normal timer C.
> In other words, as long as there are available branches, I will
> "rollOver" to the next branch fairly quickly, but once i start the
> last branch, normal timer C would apply.
> (in other words, what the "fr_inv_timer_next"  did in lcr)
> So I would need, I think, to figure out in a failure_route(), that
> the branches I am starting with next_branches() are the last ones.
> But how can I know that? I cant find a way to count remaining branches?
I see, I was not aware of this functionality of lcr functions. This can 
be fixed in several ways:
1) next_branches() get a new extra optional param - the rollover 
timeout - it will be set only if other branches are still available. If 
not, the default timeout can be used
2) next_branches() can return (1) if a next branch was set and other 
branches are available and (2) if a next branch was set and NO other 
branches are available; and you can do from script all your timeout logic.
3) add a new function "still_has_branches()" to use after 
next_branches().

Which approach you think is the simplest to use and also flexible enough 
to cover all cases ?

Regards,
Bogdan
>
> Btw, my "hack" was never intended as a real fix. I was just grasping
> at straws during troubleshooting. Also, it didnt solve the scenario
> of when there is only ONE contact in the target set.
> Then it fails again since there are no branches, just a req-uri.
>
> Thanks again,
> Taisto Qvist
>
> Bogdan-Andrei Iancu skrev 2010-09-29 09:45:
>> Hi Taisto,
>>
>> These new functions do replicate the behaviour of the old lcr 
>> functions..the idea was to make this serialize mechanism globally 
>> available for all modules.
>>
>> Now, if all contacts have the same Q, there is nothing to 
>> serialize.Probably it will be more logical to return "false" to 
>> script in such a case (if no serialization was done)But you can do 
>> something like:
>>
>> --
>> lookup("location", "m");
>> switch ($retcode)
>> {
>> case 1:
>> log(2, "(lab2) - Contact found in location server, rerouting.\n");
>> if ( serialize_branches(0) && next_branches())
>> {
>>   log(1, "(lab2) - serial forking in progress\n");
>>   setflag(NN);  # remember to resume serial forking in failure route
>> }
>> xlog("sending to RURI=$ru ; branches=$(branch(uri)[*])\n");
>> return(1);
>> ---
>>
>>
>> Regarding the timer stuff, see my prev email.
>>
>> Regards,
>> Bogdan
>>
>> Taisto Qvist wrote:
>> 
>>> It seems like I cried "yay" to soon.
>>>
>>> Serialforking does work even though I cant figure out(trying the 
>>> rtfm-concept)
>>> how I can reduce the "timer C" for only the serial-forking scenario, which
>>> I was capable of doing with the lcr modulebut now Parallell 
>>> forking doesnt
>>> work anymore :-(
>>>
>>> I changed my script to:
>>> --
>>> lookup("location", "m");
>>> switch ($retcode)
>>> {
>>> case 1:
>>> log(2, "(lab2) - Contact found in location server, rerouting.\n");
>>> if (!serialize_branches(0))
>>> {
>>>   log(1, "(lab2) - Unable to load contacts for serial forking\n");
>>>   t_reply("500", "Server Internal Error (Serial fork)");
>>>   exit;
>>> }
>>> if ( !next_branches() )
>>> {
>>>   t_reply("509", "Serial fork error");
>>>   exit;
>>> }
>>> return(1);
>>> ---
>>>
>>> But when my to UA's register with the SAME q-value, I get failure in 
>>> next_branches().
>>>
>>> ---
>>> Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Its a valid 
>>> local user
>>> Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: 
>>> DBG:core:comp_scriptvar: int 20 : 0 / 0
>>> Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Statefu

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

2010-10-05 Thread Bogdan-Andrei Iancu
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=) at timer.c:731
> #1 set_1timer (new_tl=0x7fe8f66337b0, list_id=WT_TIMER_LIST,
> ext_timeout=) at timer.c:904
> #2 0x7fe8f8d78ac8 in t_release_transaction (trans=0x7fe8f6633730)
> at t_funcs.c:122
> #3 0x7fe8f8d808e5 in t_unref (p_msg=)
> 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 org-sip01 /var/run/openser/opensips-pres[22254]: 
> ERROR:tm:sip_msg_cloner: no more share memory
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22254]: 
> ERROR:tm:new_t: out of mem
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22254]: 
> ERROR:tm:t_newtran: new_t failed
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22238]: 
> INFO:core:handle_sigs: child process 22255 exited by a signal 11
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22238]: 
> INFO:core:handle_sigs: core was generated
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22238]: 
> INFO:core:handle_sigs: terminating due to SIGCHLD
> Sep 29 11:43:36 org-sip01 /var/run/openser/opensips-pres[22256]: 
> INFO:core:sig_usr: signal 15 received
>
> 
>
> ___
> 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 & Apple Push Notifications Service

2010-10-05 Thread Bogdan-Andrei Iancu
Hi Paul,

Paul Wise wrote:
> Hi all,
>
> We would like to implement support in our server for Apple's Push
> Notifications Service (APNS). The way this will work is that when a call
> comes into OpenSIPS for one user (from another user or another domain)
> and that user is not registered/online, we wake up (or launch) our SIP
> app on the user's iPhone by sending a push notification to Apple, who
> forward the notification to the user's iPhone. Our SIP app then starts
> up, registers to OpenSIPS and receives the call/text. Most of this is
> easy, some quick perl functions to generate APNS packets in OpenSIPS,
> socat to connect to Apple and forward the packets, monit to keep socat
> running, cron+socat to download feedback information for when people
> uninstall our SIP iPhone app, msilo for storing MESSAGE requests before.
>
> The part that I haven't be able to figure out how to do yet is how to
> connect the incoming call to a user when they have registered.
>
> I thought maybe direct the call initially to an asterisk media server
> (for a ringing tone), wait for a timeout, check if the user is now
> online and if so connect them. Then rinse and repeat. This seems a bit
> hacky, I'd prefer for the REGISTER handling to immediately direct the
> call to the right contact to reduce unnecessary delays.
>
> Has any one done this before or have any ideas for implementation?
>   

Unfortunately this is impossible as there is no mechanism to control a 
call from the script in the way of creating new branches for it (like 
during the user registration, to search the INVITE transaction for that 
user - still in ringing - and fork a new branch to the user  location).

What you can do is a kind a busy waiting : send the call to a ringing 
tone in asterisk (without accepting the call, but just keep it in 180 
/183) and after 2 sec timeout -> failure route -> check again if 
registration was done -> if not send again to asterisk and repeat the 
loop; if yes, let the call go to the end device.


Regards,
Bogdan


>   
> 
>
> ___
> 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] Fw: Using same DNS resolved ip

2010-10-05 Thread Bogdan-Andrei Iancu
Hi Nauman,

If indeed the CallCentric is doing DNS-based load-balancing, but they 
are not able to keep auth state between all they servers (for challenge 
purposes), it means (as Jody said) they are really broken.

It is not your fault, or your script fault - what you can do to work 
around they problem is to do a dns query by hand for the CallCentric 
(like in shell "host .com") , select one of the returned IPs and use 
in opensips directly the IP (instead of name), so you will bypass the 
DNS LB...

Regards,
Bogdan

Nauman Sulaiman wrote:
> Just to clarify, i have the following setup
>
> UA  Opensips --- Callcentric Voip Provider(for example)
>
>
> I wish to have the UA register with Callcentric via Opensips as outbound 
> proxy so that all future invites come via it. I have not being able to get 
> any UA ( Bria etc) to register with CallCentric which leads me to think there 
> is a problem with my script. Registering with providers who do not do load 
> balancing is straight forward. It's just with providers such as Callcentric, 
> what happens is as i am just using Opensips as a relay for registration the 
> 407  from Callcentric is passed back to the UA which sends another REGISTER 
> request, this is then sent to a different IP (different callcentric proxy) by 
> Opensips, presumably because it does a fresh look up.
>
> here is my script which deals with register requests:
>
>  if (!uri==myself)
> {
>
> route(1);
> }
>
>
>
> In route[1] 
>
>  if (method=="REGISTER")
>  {
>   if (!t_relay()) {
> sl_reply_error();
> }
>  exit;  
>
>  }
>
> This works with most providers but not those doing load balancing.
>
> Thanks
>
> --- On Fri, 1/10/10, Nauman Sulaiman  wrote:
>
>   
>> From: Nauman Sulaiman 
>> Subject: [OpenSIPS-Users] Fw:  Using same DNS resolved ip
>> To: users@lists.opensips.org
>> Date: Friday, 1 October, 2010, 17:17
>> Hi Anca
>>
>> I've tried 2 different User Agent behind Opensips issuing
>> the REGISTER, Opensips is just proxying the request. The
>> problem is each time it sends to a different IP.So
>> Callcentric returns 407 with stale = true
>>
>> Regards
>>
>> --- On Thu, 30/9/10, Nauman Sulaiman 
>> wrote:
>>
>> 
>>> From: Nauman Sulaiman 
>>> Subject: [OpenSIPS-Users] Using same DNS resolved ip
>>> To: users@lists.opensips.org
>>> Date: Thursday, 30 September, 2010, 22:34
>>> Hi, using Opensips 1.6.2. We were
>>> wondering if it was possible to force Opensips to use
>>>   
>> the
>> 
>>> same IP address when issuing REGISTER request to
>>>   
>> certain
>> 
>>> VoIP providers such as CallCentric which do load
>>>   
>> balancing
>> 
>>> on their servers. Currently we are using Opensips as
>>> outboundproxy each time it issues a REGISTER request
>>>   
>> it does
>> 
>>> a round robin of all DNS address got from an SRV
>>>   
>> lookup.
>> 
>>> Because i think there is a bug in CallCentric and
>>>   
>> others
>> 
>>> that if it receives a REGISTER with auth info at a
>>>   
>> different
>> 
>>> ip that issued the challenge it sends another 407
>>>   
>> challenge.
>> 
>>> Is there anyway to force Opensips to use the same ip?
>>>
>>> Thanks
>>>
>>>
>>>   
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>   
>>   
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> 
>
>
>   
>
> ___
> 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 hang - 1.6.3

2010-10-05 Thread Bogdan-Andrei Iancu
what revision are you running ? try "opensips -V"  ...just to be sure 
you have the right code.

Regards,
Bogdan

James Lamanna wrote:
> Unfortunately, I'm still getting a hang of some sort with 1.6 trunk.
> It doesn't happen quite as fast, but it still occurs after I try and
> make a call.
> However, the call still does not complete.
> Sometimes it doesn't totally hang, but the registration of my phone is 
> dropped.
> Opensips then appears to reset and get the registration back.
>
> -- James
>
>
> On Mon, Oct 4, 2010 at 2:39 AM, Anca Vamanu  wrote:
>   
>> Hi James,
>>
>> Please try the svn version, also for 1.6 branch. There was indeed a
>> deadlock problem, but it has been in the svn version.
>>
>> Regards,
>>
>> --
>> Anca Vamanu
>> www.voice-system.ro
>>
>>
>> On 10/03/2010 06:36 PM, James Lamanna wrote:
>> 
>>> On Sun, Oct 3, 2010 at 8:24 AM, James Lamanna  wrote:
>>>
>>>   
 On Sun, Oct 3, 2010 at 8:17 AM, James Lamanna  wrote:

 
> Btw, this happens whenever I try to place a call.
> It also crashes my phone, a Cisco 509G.
>
>   
 Also, removing all pua/presence function calls enables calls to be made 
 again.
 I assume something changed in 1.6.3 that has made my config file incorrect?

 
>>> If I remove the second dialoginfo_set() from the local INVITE (from a
>>> phone), then the program goes away.
>>> However, if I need to maintain presence, don't I need to publish this,
>>> so SUBSCRIBED phones get notified that the phone making the call is in
>>> use?
>>>
>>> -- James
>>>   
>> ___
>> 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
>
>   


-- 
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] DRouting - routeid, prefix questions

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

Maciej Bylica wrote:
> Hello,
>
> I am playing around with DRouting module plus my opensips 1.6.3-notls.
> The wiki is quite nice written, but i have some doubts here.
> My config is pretty simple.
>
> if ($rU=~"^"){
> ...
> ...
> route(1) }
>
> if ($rU=~"^"){
> ...
> ...
> route(2) }
> ...
>
> route[1] {
> if (!do_routing("1")) {
> sl_reply_error();
> exit;
> };
> t_on_failure("10");
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
>
> route[2] {
> if (!do_routing("2")) {
> sl_reply_error();
> exit;
> };
> t_on_failure("11");
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
> and it works fine, but...
> 1) there is routeid column associated with dr_rules table. Frankly i
> have no idea what's that and how to use it?
>   
see 
http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#GEN-DB-DR-RULES
> >From time to time I am receiving
> WARNING:drouting:dr_load_routing_info: route <120> does not exist
> 2) prefix is very limitted, because in many cases there is a need to
> use regex to simplify all routes selection. Is it possible to use it
> here?
>   
Dynamic Routing module is designed & used for prefix based routing and 
not for regexp based routing. The module uses internal prefix trees for 
fast prefix lookup - something like this is not possible with regexp.
It is not a limitation, it is the usage case it was built for - if you 
need regexp based ops, see the dialplan module.

> 3) prefix is char(64), could I use * char there?
>   
only numerical prefixes are accepted . If you want to define a rule to 
match all prefixes (wildcard), simpy use a an empty string prefix.

Regards,
Bogdan
> Thanks 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