Re: [OpenSIPS-Users] Does OpenSIPS support Request-Disposition: no-fork in INVITE message?

2023-02-09 Thread Richard Revels via Users
 I'm not looking back to see the old conversation so forgive me if I'm
answering the wrong question here.  So, I think you want to send the call
to a customer, say at their desk.  If they don't answer then send the call
to, for example, their cellphone.  In that case you would want serial
forking rather than parallel forking.


(and im not testing this so may miss something here but in general)


route[0]
{
 $ru = 'sip:me@mydesk.local';
 $ru_q = 990;
 construct_uri("sip", "me", "mycellphone.org", "5060", "transport=udp",
$avp(newuri));
 append_branch();
 $ru = $avp(newuri);
 $ru_q = 980;
 serialize_branches();
 next_branches();
 t_on_failure( "find-me" );
 t_relay();
}

failure_route[find-me]
{
 if( !t_was_cancelled() )
 {
  next_branches();
  t_relay();
 }

}


append_branch
https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc3

$ru https://www.opensips.org/Documentation/Script-CoreVar-3-2#toc79

$ru_q https://www.opensips.org/Documentation/Script-CoreVar-3-2#toc81




On Mon, Feb 6, 2023 at 7:39 PM Bela H  wrote:

> Hi Bogdan-Andrei,
>
>
>
> I know this is an old topic but customer is complaining.
>
> How is it possible to configure the call forwarding no answer without
> forking?
>
>
>
> Cheers,
>
> Bela
>
>
>
> *From: *Bogdan-Andrei Iancu 
> *Sent: *Tuesday, 11 October 2022 01:50
> *To: *OpenSIPS users mailling list ; Bela H
> 
> *Subject: *Re: [OpenSIPS-Users] Does OpenSIPS support
> Request-Disposition: no-fork in INVITE message?
>
>
>
> Hi Bela,
>
> As per prev email, there is nothing to be supported by OpenSIPS, just
> don;t do forking in your cfg, nothing more.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Summit 27-30 Sept 2022, Athens
>
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 9/30/22 12:15 AM, Bela H wrote:
>
> Hello,
>
>
>
> Does OpenSIPS 3.2.6 version support Request-Disposition: no-fork in INVITE
> message?
>
>
>
> Cheers,
>
> Bela
>
>
>
>
>
> ___
>
> 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


[OpenSIPS-Users] nonce password

2022-11-02 Thread Richard Revels via Users
If I set a nonce password on a opensips 3.x proxy and the same one on
opensips 2.x proxy it is expected behaviour that it still wont match if
call starts on opensips 2, is challenged, then INVITE is sent to opensips 3
proxy?



[image: BandwidthMaroon.png]



Richard Revels  •  System Architect II

900 Main Campus Drive, Suite 100, Raleigh, NC 27606



m: 919-578-3421  •  o: 919-727-4614

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


Re: [OpenSIPS-Users] request uri in failure routes

2022-09-21 Thread Richard Revels
Thank You Sir.  I will adjust my config accordingly.

Richard



On Tue, Sep 20, 2022 at 7:58 AM Bogdan-Andrei Iancu 
wrote:

> Hi Richard,
>
> having in failure route the initial RURI is the expected behavior. The
> idea of failure route is to re-take the process of routing and adding new
> branches, totally independent of the branches you tried before (the new
> attempts should start from the same "msg" as the previous branches)
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 9/20/22 12:39 AM, Richard Revels wrote:
>
> It appears to me that if I set the request uri in a route block and then
> use t_relay(,"somedestination proxy") to send the call that when it hits
> the failure route (in opensips 3.2.8) the request uri has been set back to
> the original uri when the call came in to the proxy.
>
> Is this expected behaviour?  Probably should start with is this my
> imagination but it seems to be the case.
>
> The scenario is that i set a request uri in the route block and a route
> header in the branch route and send the call through an outbound proxy and
> then in the failure route i change the route header and simply send
> straight to the domain in the request uri but that has since reverted so my
> INVITE comes back to my proxy on loopback.
>
> I can adjust my config but want to be sure i understand what is happening
> first.
>
> Richard Revels
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] request uri in failure routes

2022-09-20 Thread Richard Revels
It appears to me that if I set the request uri in a route block and then
use t_relay(,"somedestination proxy") to send the call that when it hits
the failure route (in opensips 3.2.8) the request uri has been set back to
the original uri when the call came in to the proxy.

Is this expected behaviour?  Probably should start with is this my
imagination but it seems to be the case.

The scenario is that i set a request uri in the route block and a route
header in the branch route and send the call through an outbound proxy and
then in the failure route i change the route header and simply send
straight to the domain in the request uri but that has since reverted so my
INVITE comes back to my proxy on loopback.

I can adjust my config but want to be sure i understand what is happening
first.

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


Re: [OpenSIPS-Users] CDR rotation

2020-10-06 Thread Richard Revels
https://opensips.org/docs/modules/3.1.x/db_flatstore.html#mi_flat_rotate

1) move CDR files to different directory (opensips continues to write to
them)
2) issue fifo command to cause opensips to write to new files
3) insure an accounting record is written to see that new files in original
directory are indeed created
4) work with old files in different directory





[image: BandwidthMaroon.png]



Richard Revels  •  System Architect II

900 Main Campus Drive, Suite 100, Raleigh, NC 27606



m: 919-578-3421  •  o: 919-727-4614

e: rrev...@bandwidth.com


On Fri, Oct 2, 2020 at 12:53 AM Saint Michael  wrote:

> I need to close the CDR files so I can start processing them.
>
> I want a new file generated every 60 seconds, if there are calls.
> is there any way to have opensips behave this way?
>
>>
>> ___
> 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] avp_insert

2020-06-11 Thread Richard Revels
Ah.  I should have paid more attention.  I meant to paste the link for the
2.4 Docs.

However, your point is well taken.  I need to spend more time getting more
current rather than working in older versions.

Richard



On Thu, Jun 11, 2020 at 10:33 AM Bogdan-Andrei Iancu 
wrote:

> Hey Richard,
>
> Agreed, but nothing we can do about 2.1 - it is old and unmaintained.
>
> Starting 3.0, the all the script functions accept parameters via variables.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>
> On 6/11/20 4:15 PM, Richard Revels wrote:
>
> I feel like this function would be a lot more useful if the last argument
> would accept a variable rather than a static int.
>
> https://opensips.org/html/docs/modules/2.1.x/avpops.html#idp5679392
>
> Richard Revels
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] avp_insert

2020-06-11 Thread Richard Revels
I feel like this function would be a lot more useful if the last argument
would accept a variable rather than a static int.

https://opensips.org/html/docs/modules/2.1.x/avpops.html#idp5679392

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


Re: [OpenSIPS-Users] problem in dialplan

2019-07-11 Thread Richard Revels
We are using dialplan to create some site specific defaults in the startup
route.  If this is only encountered on startup I guess changing to an event
route would work if an event is generated when the rules become available.
Thank you for surfacing this problem.  It may explain an issue I've been
looking at for the last few hours.



[image: BandwidthMaroon.png]



Richard Revels  •  System Architect II

900 Main Campus Drive, Suite 100, Raleigh, NC 27606



m: 919-578-3421  •  o: 919-727-4614

e: rrev...@bandwidth.com


On Thu, Jul 4, 2019 at 4:21 AM johan de clercq  wrote:

> Speaking just for myself.
>
>
>
> As opensips gains traction in production systems, the error when the rules
> are not loaded should be more clear, now it is : “No information available
> for dpid “.
>
> Secondly, this problem/issue is not trivial to find, therefore this should
> be seen in the logs on very low loglevels (0 or 1).
>
>
>
> BR,
>
>
>
> *From:* Users  *On Behalf Of *Liviu
> Chircu
> *Sent:* Thursday, July 4, 2019 10:07 AM
> *To:* users@lists.opensips.org
> *Subject:* Re: [OpenSIPS-Users] problem in dialplan
>
>
>
> The issue was cleared off-list.  After a successful startup, it would
> take a while before the dialplan rules would become available, since child
> process #1, responsible for loading the dialplan rules was stuck in
> a DNS lookup while loading the drouting rules.
>
> This behavior was introduced in OpenSIPS 2.4.
>
> As I see it, an added problem is that script writers must now additionally
> write opensips.cfg code that handles the "rules are not yet available"
> case while processing SIP traffic.  And I do not recall any support for
> distinguishing between "rules not available" and "rule not matched" in any
> of the data matching modules.
>
> The question is: is this "post-startup data unavailability" glitch
> something worth paying attention to, or is it harmless?  Example affected
> modules:  drouting, dialplan
>
> Liviu Chircu
>
> OpenSIPS Developer
>
> http://www.opensips-solutions.com
>
> On 02.07.2019 19:51, johan de clercq wrote:
>
>
>
> ___
>
> 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] problem in dialplan

2019-07-01 Thread Richard Revels
Try enclosing the 1 in quotes

dp_translate("1","$ruri.user/$var(rU)")



[image: BandwidthMaroon.png]



Richard Revels  •  System Architect II

900 Main Campus Drive, Suite 100, Raleigh, NC 27606



m: 919-578-3421  •  o: 919-727-4614

e: rrev...@bandwidth.com


On Mon, Jul 1, 2019 at 5:28 AM johan de clercq  wrote:

> Hi,
>
> Using latest opensips 3.0,  there seems to be a problem in dialplan
>
>
>
>   1 09:23:25 hendrix /data/opensips/sbin/opensips[4197]:
> ERROR:core:get_cmd_fixups: Variable in param [1] is not an integer
>
> Jul  1 09:23:25 hendrix /data/opensips/sbin/opensips[4197]:
> ERROR:core:do_action: Failed to get fixups for command 
>
>
>
> This the code :
>
> if (dp_translate(1,"$ruri.user/$var(rU)"))
>
> {
>
> xlog("callid=$ci: Route[normalizeforinbound]: we dropped 0,00,+
> from $rU, result is var(rU) $var(rU)");
>
> }
>
>
>
> [image: cid:F3100D46-F00D-4610-87ED-3E91DA790A82]
>
> Johan De Clercq, Managing Director
> Democon bvba - Ooigemstraat 41 - 8780 Oostrozebeke
>
> Tel +3256980990 – GSM +32478720104
>
>
> ___
> 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] CANCEL & INVITE

2019-06-19 Thread Richard Revels
I'm going to resurrect this as I've noticed that opensips 2.4.6 sends
CANCEL for branches it never got a provisional response for.  Was this
changed intentionally?

Also, it looks like the discussion I am responding on was about opensips
1.5 but if any testing is needed around fail-over scenarios I expect to be
doing some of that over the next few days.  Just let me know what still
needs to be looked at and I'll try to get it in.


[image: BandwidthMaroon.png]



Richard Revels  •  System Architect II

900 Main Campus Drive, Suite 100, Raleigh, NC 27606



m: 919-578-3421  •  o: 919-727-4614

e: rrev...@bandwidth.com


On Tue, Apr 5, 2011 at 3:33 PM Bogdan-Andrei Iancu 
wrote:

> Hi guys,
>
> Actually it will be great to have that patch tested to know for sure if
> the problem is solved. I never got a 100% confirmation from Andrew, but
> maybe Piotr can test and confirm.
>
> Thanks and regards,
> Bogdan
>
> On 04/05/2011 04:58 PM, Andrew Pogrebennyk wrote:
> > Hi Piotr,
> > This sounds familiar to the problem I experienced some time ago - make
> > sure to check comments here:
> >
> https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2940556&group_id=232389
> >
> > I haven't been able to replicate that setup to confirm that the
> > attached patch works. You are welcome to try it though :) Note RFC
> > states it clearly that if no response has been received from the UAS
> > at all, we should not attempt to send a CANCEL there.
> >
> > But it seems that in your case you received some provisional response
> > so the issue has to do with the order in which CANCEL is fired -
> > exactly what the patch is intended to fix.
> >
> > On 05.04.2011 15:56, Piotr Sobolewski wrote:
> >> I'm having problem with specific gateway to which OpenSIPS sends
> >> INVITE and then another INVITE (CallForward on no Aswer).
> >> The  problem is when after sending first INVITE to gateway (without
> >> getting final response), OpenSIPS hits failure route and then sends
> >> another INVITE (with different RURI) toward gateway before CANCEL is
> >> sent, so the gateway responds to second INVITE with "482 Request
> >> merged" (and gateway does not attempt to make second connection).
> >> Is there a way to send CANCEL before sending second INVITE ?
> >
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS eBootcamp - 2nd of May 2011
> OpenSIPS solutions and "know-how"
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] core dump on startup

2018-08-06 Thread Richard Revels
Yeah, I didn't give you much to go on there.  Sorry about that.

I've put some stuff in a pastebin from the core file.  Perhaps the most
significant thing I left out is that im using the dynamic database module.

https://pastebin.com/raw/fXfJ2F9v



On Fri, Aug 3, 2018 at 3:54 AM Liviu Chircu  wrote:

> Hi Richard,
>
> I tried to reproduce this, but with little success.  Can you please
> extract a backtrace [1] from the corefile?  Thanks!
>
> Best regards,
>
> [1]: https://www.opensips.org/Documentation/TroubleShooting-Crash
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 03.08.2018 03:46, Richard Revels wrote:
>
> I'm using opensips version 2.3 from rpm package on fedora.  I've noticed
> that if I use the wrong auth info for the mysql db and the connection fails
> then opensips does a core dump in db_table_version in both the acc and
> permissions modules.  Probably more, I didn't bother going further down the
> list.
>
> Since this keeps the proxy from starting there is limited damage it can do
> (like dropping calls and all that) but it did have me stumped a lot longer
> than a "db access denied" message or something like that would have.
>
> Richard
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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


[OpenSIPS-Users] core dump on startup

2018-08-02 Thread Richard Revels
I'm using opensips version 2.3 from rpm package on fedora.  I've noticed
that if I use the wrong auth info for the mysql db and the connection fails
then opensips does a core dump in db_table_version in both the acc and
permissions modules.  Probably more, I didn't bother going further down the
list.

Since this keeps the proxy from starting there is limited damage it can do
(like dropping calls and all that) but it did have me stumped a lot longer
than a "db access denied" message or something like that would have.

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


Re: [OpenSIPS-Users] json decode and access?

2018-08-02 Thread Richard Revels
I'm using a webserver response rather than cache_fetch but this may help.

#we got a valid response from the web server.
convert from string to json object
$json(resp-obj) := $avp(router-resp);
if( $avp(ok_log_this) == "true" )
xlog("L_INFO", "the whole object returned
is $json(resp-obj) and the json route first choice is
$json(resp-obj/routes[0]/ruri) \n");

...
if( $json(resp-obj/lang) )
{
$avp(jsonLangPref) :=
$json(resp-obj/lang);
$avp(jsonStatus) :=
$json(resp-obj/status);
$avp(jsonSID) :=
$json(resp-obj/sid);
$avp(jsonDashAddress) :=
$json(resp-obj/caller_id);
...
and so on.




On Thu, Aug 2, 2018 at 6:44 PM J E H A N Z A I B 
wrote:

> Hi team,
>
> I have another application storing the json encoded object in the redis
> cache.
>
> I read we can fetch using cache_fetch by passing the key. This is perfect
> but I cant find a function to decode the json I have since my other
> application is encoding the json object and putting into the redis. I need
> a function to decode it first.
>
> Second question is, after the decode the object is like
>
> Object
> (
> [id] => 161
> [user] => xxx
> [xx] => 
> [] => 
> )
>
> How to access user for example ?
>
> Thank you
>
>
> --
> Regards,
> Jehanzaib
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] switch / case behaviour

2018-04-09 Thread Richard Revels
I am unsure of the expected behaviour in the config switch / case block
when the break is not defined between a defined case and the default case
but what I'm seeing right now is not what I expect.  Wanted to get some
input before opening a bug tracker on it.

--code--
route[testswitch]
{
switch( $avp(testvalue) )
{
case "defined break":
xlog("L_INFO", "log only this line \n");
break;

case "non defined break":
xlog("L_INFO", "log this line and fall through to
also and then to default \n");

case "also non defined":
xlog("L_INFO", "log this line and fall through to
default \n");

default:
xlog("L_ERR", "log default line \n");
}
xlog("L_ERR", "at end of switch block with $avp(testvalue) \n");
}

...

$avp(testvalue) := "defined break";
route(testswitch);
$avp(testvalue) := "non defined break";
route(testswitch);
$avp(testvalue) := "also non defined";
route(testswitch);
$avp(testvalue) := "non defined value";
route(testswitch);

--end code--

--log--

2018-04-09T13:13:28.092141+00:00 pidflo-01 /sbin/opensips[25651]: log only
this line
2018-04-09T13:13:28.092150+00:00 pidflo-01 /sbin/opensips[25651]: at end of
switch block with defined break
2018-04-09T13:13:28.092158+00:00 pidflo-01 /sbin/opensips[25651]: log this
line and fall through to also and then to default
2018-04-09T13:13:28.092161+00:00 pidflo-01 /sbin/opensips[25651]: log this
line and fall through to default
2018-04-09T13:13:28.092164+00:00 pidflo-01 /sbin/opensips[25651]: at end of
switch block with non defined break
2018-04-09T13:13:28.092168+00:00 pidflo-01 /sbin/opensips[25651]: log this
line and fall through to default
2018-04-09T13:13:28.092171+00:00 pidflo-01 /sbin/opensips[25651]: at end of
switch block with also non defined
2018-04-09T13:13:28.092176+00:00 pidflo-01 /sbin/opensips[25651]: log
default line
2018-04-09T13:13:28.092179+00:00 pidflo-01 /sbin/opensips[25651]: at end of
switch block with non defined value

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


Re: [OpenSIPS-Users] need some help in registrar module .

2017-03-29 Thread Richard Revels
http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294862

There are several functions in the registrar module to help you determine
if a Contact is already registered using a given AOR.  After that you can
use flags to the save command to indicate if you want to set a max number
of contacts for an AOR (for example one contact) and if you want to throw
away this registration or over ride the existing one in the event that max
is already met.

http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#id294033

Hope this helps.


On Wed, Mar 29, 2017 at 7:10 AM, Sasmita Panda  wrote:

> Hi ,
>   I am using opensips-2.2.2 . I wanted to override a contact only by
> checking the username if its already registered earlier rather than adding
> another contact of same username .
>
>What should I do ? I am searching for this but I am not getting
> anything which can do this . Please help me if this is possible .
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
> ___
> 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 1.11 permission module problem

2015-11-17 Thread Richard Revels
Are you using subnets in your address table?  How often do you reload the
address table?

There was a package memory leak that was fixed in the development tree that
might explain what you are seeing.

On Wed, Nov 11, 2015 at 4:26 AM, dpa  wrote:

> Hello!
>
>
>
> Is there any assumption about problem?
>
>
>
> *From:* users-boun...@lists.opensips.org [mailto:
> users-boun...@lists.opensips.org] *On Behalf Of *dpa
> *Sent:* Wednesday, October 28, 2015 4:12 PM
> *To:* 'OpenSIPS users mailling list'
> *Subject:* [OpenSIPS-Users] Opensips 1.11 permission module problem
>
>
>
> Hello!
>
>
>
> OpenSIPS (1.11.5-notls (x86_64/linux))
>
>
>
> I have a periodic problem with permissions module.
>
> I could not make opensipsctl address reload (“400 Trusted table reload
> failed” received). In the time I have no problem with dialplan or drouting
> modules.
>
> Opensips reload solve the problem.
>
>
>
>
>
> In attachment log from opensips and statistic.
>
>
>
> Thank you for any help
>
>
>
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] cassandra

2012-08-08 Thread Richard Revels
Cassandra came to my attention a couple days ago.  I've never used it so
thought I would give it a try.  To get it to compile on my centos servers I
had to modify the CXXFLAGS line in modules/cachedb_cassandra/Makefile to:

CXXFLAGS=$(CFLAGS:-Wno-deprecated option=) -DHAVE_NETINET_IN_H

Hope this saves someone some time.

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


Re: [OpenSIPS-Users] using avpops module

2012-05-29 Thread Richard Revels
Here is another example or two.

Set module parameter to grab an extra column (tag) in a dbaliases table:
modparam("avpops", "db_scheme",
"alias_scheme:table=dbaliases;username_col=username;domain_col=domain;value_col=tag;value_type=string")

In the config use the alias scheme (send in the uri of the RURI and store
in avp 120):
avp_db_load( "$ru/uri", "$avp(120)/$alias_scheme" );

Assuming the tag column contains the customer class, use it to load values
from the (default) usr_preferences table:
avp_db_load("$avp(120)", "a");

You can also load avp values based on various headers.  Use request user
from RURI:
avp_db_load("$ru", "a");

The first form will look for rows in usr_preferences where the uuid column
match what is contained in avp 120.  The second form will look for rows in
which the username and domain columns match the username and domain of the
RURI.  If the domain is looked at is a module parameter.  The avp's that
get set are the  attribute column and the value the avp is set to is the
value column.

Here are a couple rows from the usr_preferences table:

| id | uuid | username | domain   | attribute  |
type | value   | last_modified   |

| 37 | 2000 |  |  | no-nat-support |
 0 | Y   | -00-00 00:00:00 |

| 28 |  | 9194397461   | trunking.bsltech.net | userdebug  |
 0 | Y   | 2010-08-25 00:00:00 |

And finally, use those values:

if( is_avp_set("$avp(userdebug)/s") )
{
xlog("L_INFO", "Turning on debug in inbound call due to
user prefs flag for call $ci from $fU \n");
setflag(1);
}

if( !is_avp_set("$avp(no-nat-support)/s") )
{
bm_start_timer("media_proxy_benchmark"); #keep track of how
long it's taking to talk to relays
engage_media_proxy();
more interesting stuff
}


Richard


On Mon, May 28, 2012 at 2:23 PM, Ali Pey  wrote:

> avp_db_query("insert into SIP_REG(TIMESTAMP, SIP_USERNAME, DOMAIN, AGENT,
> CONTACT, EXPIRES, SOURCE, NET_TYPE, SERVER) values ('CURRENT_TIMESTAMP',
> '$fU', '$fd', '$ua', '$ct', '$hdr(Expires)', '$avp(i:42)', 'NATED',
> 'Primary OpenSIPS' )");
>
> Regards,
> Ali
>
> On Sun, May 27, 2012 at 3:07 AM, prasad kelkar  wrote:
>
>> hello,
>> I tried using AVPpops module to connect to table in mysql.
>> I cant acces value
>> Please give me example code.
>> Thank You
>>
>> ___
>> 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] Preparing new major release 1.7.0 - UPDATE

2011-06-24 Thread Richard Revels
Re SST:  Yep, everything you said is true.  I was using SST to verify the 
endpoints were still alive.  At the same time, i wanted to kill the call at 
some specified point regardless if both endpoints were still there.  For 
instance, I want to limit all calls to 15 minutes but at the same time check 
every 45 seconds to insure the endpoints are still on the network.  With the 
addition of the dialog ping I think this problem is solved.  I also can't think 
of a valid reason to want SST module at the proxy outside of this.  I guess the 
answer to your question is "I don't need it - not sure what I was thinking".  : 
>

Richard
 


On Jun 24, 2011, at 9:22 AM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
> 
> On 06/22/2011 04:36 PM, Richard Revels wrote:
>> 
>> Bogdan and all,
>> 
>> Greetings.  I have been using revision 7602 in Production and have found it 
>> quite stable w/ most of the functionality I need.  Everything else aside 
>> though, the support for an Event socket is going to be enough to cause me to 
>> start the update process.
> This is good feedback :)
>> 
>> One thing I would really like to see in a release would be a separation of 
>> the Dialog Timeout timer and the SIP Session Timer.  The Dialog ping will go 
>> a long way toward handling this problem in that there is less need to 
>> support session timers.  However, there are still times when I would like to 
>> set the dialog timeout based on some criteria, like credit or whatever, and 
>> at the same time allow endpoints to make use of the SIP Session Timer.  At 
>> the moment that over-rides the value I place on the Dialog Timeout.  Is the 
>> Dialog Timeout variable able to be modified via the management interface?  I 
>> don't remember.  If not, that would be neat too.
> Maybe I'm missing something, but why using SST module if you are not 
> interested in terminating the dialog when Session Timer is up ? more or less 
> if you want to control the dialog lifetime by your own values, then you have 
> to ignore SST; if you ignore SST, why using ? AFAIK, SST on opensips is just 
> controlling the dialog lifetime and terminates the call if no re-INVITE.
> 
> 
>> 
>> I like the idea of having a beta period for a new release before it is 
>> declared a stable release.  It may help focus a lot of testing and debug 
>> over that 12 day time period that would normally drag out over a 
>> couple of months as people try to make time to deal with issues they had 
>> found "work-arounds" for.
> 
> More or less these were the arguments that made me come to this approach: if 
> it is not released, people are not too eager to use/test ; if it is released, 
> they expect to be fully stable release . So we could not take the advantage 
> of the community testing the code (of course, without risks).
> 
> Regards,
> Bogdan
> 
>> 
>> Richard
>> 
>> On Jun 21, 2011, at 5:20 AM, Bogdan-Andrei Iancu wrote:
>> 
>>> Hi, 
>>> 
>>> coming back with the timing for the new 1.7 major release:
>>> 
>>> 30th of June - SVN freeze - at the time, all new things and known bugs are 
>>> to be committed into SVN and tested ; at this point the testing phase will 
>>> start.
>>> 
>>> 12th of July - release date - the 1.7 beta will be officially release.
>>> 
>>> 
>>> The list of changes for 1.7 will be fully available starting with 30th of 
>>> June, when SVN will be freeze.
>>> 
>>> Best regards,
>>> Bogdan
>>> 
>>> 
>>> On 06/08/2011 08:05 PM, Bogdan-Andrei Iancu wrote:
>>>> 
>>>> Hi all, 
>>>> 
>>>> The plan is to put on the roll the preparing of a new major release for 
>>>> opensips, to incorporate all the new things that were added : 
>>>> - RTP timeout notification in nathlper (via rtpproxy) with dialog 
>>>> termination 
>>>> - better error handling for RTPproxy failover 
>>>> - dialog enhancement (dialog fixing, in-dialog pinging) 
>>>> - Event interface (datagram support) 
>>>> - registrant module 
>>>> - B2B module - internal API and DB persistence for restarts. 
>>>> - presence enhancement 
>>>> 
>>>> We still have on the roll some work (to be finished in the next week) 
>>>> like: 
>>>> - avp auto aliasing (drop the i: and s: naming) 
>>>> - multi-insert in DB ops (for acc, siptrace, location). 
>>>> 
>>>> 
>>>> The new rele

Re: [OpenSIPS-Users] Preparing new major release 1.7.0 - UPDATE

2011-06-22 Thread Richard Revels
Bogdan and all,

Greetings.  I have been using revision 7602 in Production and have found it 
quite stable w/ most of the functionality I need.  Everything else aside 
though, the support for an Event socket is going to be enough to cause me to 
start the update process.

One thing I would really like to see in a release would be a separation of the 
Dialog Timeout timer and the SIP Session Timer.  The Dialog ping will go a long 
way toward handling this problem in that there is less need to support session 
timers.  However, there are still times when I would like to set the dialog 
timeout based on some criteria, like credit or whatever, and at the same time 
allow endpoints to make use of the SIP Session Timer.  At the moment that 
over-rides the value I place on the Dialog Timeout.  Is the Dialog Timeout 
variable able to be modified via the management interface?  I don't remember.  
If not, that would be neat too.

I like the idea of having a beta period for a new release before it is declared 
a stable release.  It may help focus a lot of testing and debug over that 12 
day time period that would normally drag out over a couple of months as people 
try to make time to deal with issues they had found "work-arounds" for.

Richard

On Jun 21, 2011, at 5:20 AM, Bogdan-Andrei Iancu wrote:

> Hi, 
> 
> coming back with the timing for the new 1.7 major release:
> 
> 30th of June - SVN freeze - at the time, all new things and known bugs are to 
> be committed into SVN and tested ; at this point the testing phase will start.
> 
> 12th of July - release date - the 1.7 beta will be officially release.
> 
> 
> The list of changes for 1.7 will be fully available starting with 30th of 
> June, when SVN will be freeze.
> 
> Best regards,
> Bogdan
> 
> 
> On 06/08/2011 08:05 PM, Bogdan-Andrei Iancu wrote:
>> 
>> Hi all, 
>> 
>> The plan is to put on the roll the preparing of a new major release for 
>> opensips, to incorporate all the new things that were added : 
>> - RTP timeout notification in nathlper (via rtpproxy) with dialog 
>> termination 
>> - better error handling for RTPproxy failover 
>> - dialog enhancement (dialog fixing, in-dialog pinging) 
>> - Event interface (datagram support) 
>> - registrant module 
>> - B2B module - internal API and DB persistence for restarts. 
>> - presence enhancement 
>> 
>> We still have on the roll some work (to be finished in the next week) like: 
>> - avp auto aliasing (drop the i: and s: naming) 
>> - multi-insert in DB ops (for acc, siptrace, location). 
>> 
>> 
>> The new release will be generated from trunk and a new branch will be 
>> created for it. In the next days we will compile a detailed and complete 
>> list of new things in opensips 1.7. 
>> 
>> We also want to change a bit the release policy: after first level of 
>> testing, a beta release (release candidate) will be made public ; this code 
>> is intended to be used and tested "as final version" - eventual bugs will be 
>> fixed, opening the way for the final stable release. 
>> This is to improve the quality and stability of the stable release. 
>> 
>> I will be glad to get feedback on : 
>> - what code/functionality is missing and should be in 1.7 
>> - the new release policy. 
>> 
>> Best regards, 
>> Bogdan 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> OpenSIPS eBootcamp - 2nd of May 2011
> OpenSIPS solutions and "know-how"
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


Re: [OpenSIPS-Users] memcach

2011-04-20 Thread Richard Revels
Err, I guess there are varying levels of "sure" as well.  It overwrites least 
used data rather than oldest data.

http://code.google.com/p/memcached/wiki/FAQ#Item_Expiration

Richard

On Apr 20, 2011, at 10:34 AM, Richard Revels wrote:

> I am sure it will overwrite old data if it becomes full.  The other thing I 
> was mis-remembering.  Here is an excerpt from the wiki.
> 
> There isn't a "rule of thumb" when picking an expiration time. Sit back and 
> think about your users, and what your data is. How long can you go without 
> making your users angry? Be honest with yourself, as "THEY ALWAYS NEED FRESH 
> DATA" isn't necessarily true.
> 
> Expiration times can be set from 0, meaning "never expire", to 30 days. Any 
> time higher than 30 days is interpreted as a unix timestamp date. If you want 
> to expire an object on january 1st of next year, this is how you do that.
> 
> 
> And the wiki link.
> 
> http://code.google.com/p/memcached/wiki/NewProgramming#Expiration
> 
> Richard
> 
> On Apr 20, 2011, at 10:14 AM, Brett Nemeroff wrote:
> 
>> On Wed, Apr 20, 2011 at 9:09 AM, Richard Revels  
>> wrote:
>> Forever is a long time.  If memcached fills up it will start booting out old 
>> entries to allow new ones to be stored.  I seem to remember there being a 
>> month time limit on entries as well but that might be only if you are 
>> setting a timeout value.  Too bad I can't used memcache to replace my feeble 
>> memory...
>> 
>> 
>> Richard,
>> Are you sure about that? I don't remember memcache having that problem. I 
>> certainly don't remember any kind of "default" time limit.  
>> ___
>> 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] memcach

2011-04-20 Thread Richard Revels
I am sure it will overwrite old data if it becomes full.  The other thing I was 
mis-remembering.  Here is an excerpt from the wiki.

There isn't a "rule of thumb" when picking an expiration time. Sit back and 
think about your users, and what your data is. How long can you go without 
making your users angry? Be honest with yourself, as "THEY ALWAYS NEED FRESH 
DATA" isn't necessarily true.

Expiration times can be set from 0, meaning "never expire", to 30 days. Any 
time higher than 30 days is interpreted as a unix timestamp date. If you want 
to expire an object on january 1st of next year, this is how you do that.


And the wiki link.

http://code.google.com/p/memcached/wiki/NewProgramming#Expiration

Richard

On Apr 20, 2011, at 10:14 AM, Brett Nemeroff wrote:

> On Wed, Apr 20, 2011 at 9:09 AM, Richard Revels  wrote:
> Forever is a long time.  If memcached fills up it will start booting out old 
> entries to allow new ones to be stored.  I seem to remember there being a 
> month time limit on entries as well but that might be only if you are setting 
> a timeout value.  Too bad I can't used memcache to replace my feeble memory...
> 
> 
> Richard,
> Are you sure about that? I don't remember memcache having that problem. I 
> certainly don't remember any kind of "default" time limit.  
> ___
> 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] memcach

2011-04-20 Thread Richard Revels
Forever is a long time.  If memcached fills up it will start booting out old 
entries to allow new ones to be stored.  I seem to remember there being a month 
time limit on entries as well but that might be only if you are setting a 
timeout value.  Too bad I can't used memcache to replace my feeble memory...

Richard


On Apr 19, 2011, at 9:09 AM, Kamen Petrov wrote:

> Your questions are related more to the memcache rather than the opensips
> 
> anyway, "yes" on both of them :)
> 
> 
> 
> 
> On 19 April 2011 15:12, Denis Putyato  wrote:
> Hello!
> 
>  
> Sorry if my questions already appeared in mail list but
> 
>  
> 1)  If I don`t use timeout in cache_store func. then record in cache will 
> live “forever” ?
> 
> 2)  If I try to cache_store attribute which already has record in cache 
> then this attribute will be  rewritten?
> 
>  
> Thank you for help.
> 
>  
>  
> 
> ___
> 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


[OpenSIPS-Users] groupID avp with do_routing

2011-04-12 Thread Richard Revels
Hope this saves someone time at some point.  The type of value stored in the 
groupID avp (if used) when calling do_routing() must be an int.  There is no 
attempt to convert in the function.  I store everything in usr_preferences as a 
string and then use transforms where needed in the config script.  Took me a 
day to realize I needed one for this.

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


Re: [OpenSIPS-Users] opensips.pid on Red Hat

2011-03-10 Thread Richard Revels
Simply means it's already there.  Should be good to go.

Richard

On Mar 10, 2011, at 5:12 AM, Toyima Dias wrote:

> Just one more thing friends,
> When i try to install MDB2, i got following errors
> 
> /#pear install MDB2
> Skipping package "pear/MDB2", already installed as version 2.4.1
> No valid packages found
> install failed
> The same with "pear install MDB2#mysql" and "pear install log"
> 
>  
> 2011/3/10 Toyima Dias 
> Thanks!
>  
> Now it works.
> Regards
> 
> 2011/3/9 John Khvatov 
> 
> 
> On 09.03.2011, at 21:34, Ovidiu Sas wrote:
> 
> > Run `opensips -h' and check -P option.
> > That should help you out with setting the pid file.
> 
> Yep.
> 
> Toyima, as workaround, add "-P /var/run/opensips.pid" to OPTIONS var in 
> /etc/sysconfig/opensips:
> 
> [root@host ~]# cat /etc/sysconfig/opensips
> # Add extra options here
> OPTIONS="-P /var/run/opensips.pid"
> 
> Then restart opensips service. Pid-file should be created in 
> /var/run/opensips.pid...
> 
> I'll fix fedora/epel init-script later to fix this issue.
> 
> > On Wed, Mar 9, 2011 at 1:19 PM, Toyima Dias  wrote:
> >> Hello,
> >>
> >> I can't find the opensips.pid on Red Hat, it is not in the path:
> >> /var/run/opensips.pid
> >>
> >> Has somebody installed OpenSIPS on Red Hat and be able to find the pid of
> >> the process opensips? i'm trying to monitor the opensips process with
> >> "monit" and i need the full path of the process id...
> >>
> >> Regards!
> >>
> >> ___
> >> 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
> 
> --
> WBR, John Khvatov
> 
> 
> ___
> 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] opensips 1.6.x and media dispatcher

2010-12-31 Thread Richard Revels
I backed off opensips to the same revision I'm using in Production, upgraded 
opensips to latest 7621 revision, installed a new sandbox Python, copied over 
the sandbox directory tree from a Production server, and recompiled everything 
from the ground up numerous times.  Not all at once of course.  These were 
different things I tried.  : >  None of this helped.  I don't know what the 
heck this is but I'm now sure it's something about this particular OS install 
rather than any SIP application.  And that it's a problem for next year.

Thank you for the response.  I remembered seeing a new release of Media Proxy 
within the last couple of months with a comment that a bug was fixed that could 
cause the software to crash under heavy load.  My first thought when I saw this 
was Whoops!  must have been an update to the opensips module too.  : >

I think that revision was between the 1.6.3 release tag and the 1.6.4 release 
by the way.

Richard


On Dec 30, 2010, at 3:05 AM, Saúl Ibarra Corretgé wrote:

> On 28/12/10 7:49 PM, Richard Revels wrote:
>> Are there any known issues with media dispatcher 2.4.2 communicating with 
>> opensips revision 7377?  I am getting errors back to the call to 
>> engage_media_proxy on two attempts from within my script.  This doesn't seem 
>> to occur immediately on start-up most times but does get to the point of 
>> 100% failure eventually.
>> 
>> Turning up log levels on both opensips and the media dispatcher does not 
>> seem to yield any indication of why the function call fails.  Connecting to 
>> the media dispatcher management port and asking for summary or sessions 
>> works fine.
>> 
> 
> Which version is revision 7337 close to? There where some changes in the 
> communication protocol when ICE support was added, but that was between 1.6.1 
> and 1.6.2 releases IIRC.
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


[OpenSIPS-Users] opensips 1.6.x and media dispatcher

2010-12-28 Thread Richard Revels
Are there any known issues with media dispatcher 2.4.2 communicating with 
opensips revision 7377?  I am getting errors back to the call to 
engage_media_proxy on two attempts from within my script.  This doesn't seem to 
occur immediately on start-up most times but does get to the point of 100% 
failure eventually.

Turning up log levels on both opensips and the media dispatcher does not seem 
to yield any indication of why the function call fails.  Connecting to the 
media dispatcher management port and asking for summary or sessions works fine.

Richard


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


Re: [OpenSIPS-Users] b2bua xml files

2010-12-09 Thread Richard Revels
Ok.  Thank you for the clarification on the xml and the responses to my other 
questions.  I have quite a few other call flows where the b2bua is going to 
take care of things for me but I reckon this one is going to need a different 
solution.

I have been holding on to the MediaDispatcher for far end NAT support because I 
really like the elegance of using the Kernel tracking rules to handle media 
forwarding.  In this case though, it looks like being able to use MediaRelay to 
"whisper in" a prompt on one side wins.

Richard

On Dec 8, 2010, at 12:40 PM, Anca Vamanu wrote:

> Hi Richard,
> 
> On 12/04/2010 08:35 PM, Richard Revels wrote:
>> It's possible that the b2bua doesn't yet support what I'm trying to do with 
>> it but I find I have some basic questions about the XML layout as a result 
>> of trying.  If I want to handle two different types of request within a 
>> scenario does it require two  blocks or a single  block 
>> containing the two methods?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> or
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> The first one is the correct way:
> 
>  #and under this all the requests
>  # and under it all the rules for Invite
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> Next, request blocks defined as invite seem to handle reinvite ok but I'm 
>> having trouble getting two  sections to work in the same re 
>> block.  I can see where that would get complicated pretty quick if it was 
>> allowed.  Just wondering if it's possible to send both legs of a call to a 
>> new location.
> No, it is not possible now to have 2 bridging actions in the same leg.. I can 
> see also why this could be useful, but this is not supported.
> 
>> I've also tried having the b2bua send a 200 to the side that originated the 
>> reinvite and bridging the other side to a media prompt.  That works fine 
>> (although I'm wondering how many clients will ACK a 200 with no SDP)
> 200Ok is not without sdp, only the reInvite sent to the party that was 
> already in a call is without sdp.
> 
>> but when the far side comes back from the media prompt (BYE) I am unable to 
>> bridge the two original legs back together with my current layout.
> 
> It's a bit complicated what you are trying to do - you want to leave the 
> dialog to client1 open and when BYE comes from media server to reconnect 
> server1 with client1. The B2BUA was not designed for this case.. it won't 
> work.. you can only bridge one entity that was in a call and an external 
> entity now.
> 
> 
>> The BYE gets passed all the way back to the media peer and the original side 
>> is left hanging.
>> 
>> Finally, is it possible to compare the contents of a message X-header as 
>> part of the  for a block?
>> 
> No, it is not possible to check the content of a header in a condition.
> 
> Regards,
> 
> -- 
> Anca Vamanu
> 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


[OpenSIPS-Users] b2bua xml files

2010-12-04 Thread Richard Revels
It's possible that the b2bua doesn't yet support what I'm trying to do with
it but I find I have some basic questions about the XML layout as a result
of trying.  If I want to handle two different types of request within a
scenario does it require two  blocks or a single  block
containing the two methods?


















or




















Next, request blocks defined as invite seem to handle reinvite ok but I'm
having trouble getting two  sections to work in the same re
block.  I can see where that would get complicated pretty quick if it was
allowed.  Just wondering if it's possible to send both legs of a call to a
new location.  I've also tried having the b2bua send a 200 to the side that
originated the reinvite and bridging the other side to a media prompt.  That
works fine (although I'm wondering how many clients will ACK a 200 with no
SDP) but when the far side comes back from the media prompt (BYE) I am
unable to bridge the two original legs back together with my current layout.
 The BYE gets passed all the way back to the media peer and the original
side is left hanging.

Finally, is it possible to compare the contents of a message X-header as
part of the  for a block?

I've pasted my xml file with that second layout.  Sorry in advance for
whatever format mangling various mail clients may do on this.






server1


client1
message

server1



1






1

client
client1





200
Hang Out For
a While



server1


client2

1



2









client
client2




200
OK




server1


client1


1






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


Re: [OpenSIPS-Users] registration to other SIP proxies?

2010-12-03 Thread Richard Revels
The Opensips website has a section that outlines the process for generating 
registers (and provides the scenario files) via sipp too.

http://www.opensips.org/Resources/PerformanceTests

On Dec 2, 2010, at 7:59 PM, Jeff Pyle wrote:

> I'm embarrassed to say how long I've wished for this capability in
> Opensips, and I never considered this possibility.  Thanks Iñaki!
> 
> 
> - Jeff
> 
> 
> On 12/2/10 7:22 PM, "Iñaki Baz Castillo"  wrote:
> 
>> 2010/12/2 Erik Dekkers :
>>> Would it be possible to run sipak from the opensips.cfg script? I'm
>>> also looking for something like this.
>> 
>> Why do you need it?? Just run sipsak as an external process generating
>> a REGISTER in behalf of your proxy.
>> 
>> -- 
>> Iñaki Baz Castillo
>> 
>> 
>> ___
>> 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] mediaproxy 2.4.2

2010-12-02 Thread Richard Revels
This is interesting.  On one relay the ports are two apart from each other 
between the INVITE and 200 like I am used to seeing, but on the other relay the 
ports are all over the map.  However, I've done some test calls, and verified 
they used the second relay, and the audio set up fine on all of them.  I guess 
sometimes the media relay doesn't use consecutive ports.  Probably going to 
restart that one relay later anyway though.

Here is the tshark command I was using to look at this in my capture files.  
Took me a while to get it right so it might save someone some time later.

tshark -T fields -e frame.time -e ip.src -e ip.dst -e sip.Method -e 
sip.Status-Code -e sip.Call-ID -e sdp.connection_info.address -e sdp.media.port 
-R "(sip.Method == INVITE or (sip.Status-Code == 200 and sip.CSeq.method == 
INVITE)) and sdp.connection_info.address == " -r 


It will probably be tomorrow before I get that full trace to you.

Richard




On Dec 2, 2010, at 1:42 PM, Richard Revels wrote:

> Yeah, I used the function call on both the message and response.  This 
> platform is production and does a lot of traffic each day.   I know this 
> doesn't happen a lot or I would have gotten complaints by now.  I have no 
> obvious error messages on either the dispatcher or relay so I don't have high 
> hopes of troubleshooting this on this particular call.  I was really just 
> wanting to verify that the media relay is expected to pick two ports that are 
> one away from each other.
> 
> One other thing is that the same thing happened on a reinvite in this same 
> call.  The ports were far from each other.
> 
> I do have a complete trace for the call.  Let me obfuscate all the IP 
> addresses and I'll mail it.
> 
> Richard
> 
> On Dec 2, 2010, at 1:16 PM, Saúl Ibarra Corretgé wrote:
> 
>> Hi,
>> 
>> On 12/02/2010 07:04 PM, Richard Revels wrote:
>>> Here is the m line from an INVITE/200 after the messages were modified
>>> by use_media_proxy in each direction. The call happened to be mine and
>>> although it did not stay up long enough for me to be 100% sure, I think
>>> the person on the other end of the line was someone other than the
>>> person who called me. The call dropped due to my fumbling with buttons
>>> and hitting goodbye by mistake.
>>> 
>> 
>> I have never seen this so far. Can you confirm this somehow?
>> 
>>> I have only seen the port be offset by two when using the mediaproxy. Is
>>> that not the expected behavior always?
>>> 
>>> m=audio 52352 RTP/AVP 0 97 18 101.
>>> 
>>> m=audio 58676 RTP/AVP 0 101.
>>> 
>> 
>> Did you call use_media_proxy for *both* the caller and the callee? A SIP 
>> trace would help here.
>> 
>> 
>> Regards,
>> 
>> -- 
>> Saúl Ibarra Corretgé
>> AG Projects
>> 
>> ___
>> 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] mediaproxy 2.4.2

2010-12-02 Thread Richard Revels
Yeah, I used the function call on both the message and response.  This platform 
is production and does a lot of traffic each day.   I know this doesn't happen 
a lot or I would have gotten complaints by now.  I have no obvious error 
messages on either the dispatcher or relay so I don't have high hopes of 
troubleshooting this on this particular call.  I was really just wanting to 
verify that the media relay is expected to pick two ports that are one away 
from each other.

One other thing is that the same thing happened on a reinvite in this same 
call.  The ports were far from each other.

I do have a complete trace for the call.  Let me obfuscate all the IP addresses 
and I'll mail it.

Richard

On Dec 2, 2010, at 1:16 PM, Saúl Ibarra Corretgé wrote:

> Hi,
> 
> On 12/02/2010 07:04 PM, Richard Revels wrote:
>> Here is the m line from an INVITE/200 after the messages were modified
>> by use_media_proxy in each direction. The call happened to be mine and
>> although it did not stay up long enough for me to be 100% sure, I think
>> the person on the other end of the line was someone other than the
>> person who called me. The call dropped due to my fumbling with buttons
>> and hitting goodbye by mistake.
>> 
> 
> I have never seen this so far. Can you confirm this somehow?
> 
>> I have only seen the port be offset by two when using the mediaproxy. Is
>> that not the expected behavior always?
>> 
>> m=audio 52352 RTP/AVP 0 97 18 101.
>> 
>> m=audio 58676 RTP/AVP 0 101.
>> 
> 
> Did you call use_media_proxy for *both* the caller and the callee? A SIP 
> trace would help here.
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


[OpenSIPS-Users] mediaproxy 2.4.2

2010-12-02 Thread Richard Revels
Here is the m line from an INVITE/200 after the messages were modified by 
use_media_proxy in each direction.  The call happened to be mine and although 
it did not stay up long enough for me to be 100% sure, I think the person on 
the other end of the line was someone other than the person who called me.  The 
call dropped due to my fumbling with buttons and hitting goodbye by mistake.

I have only seen the port be offset by two when using the mediaproxy.  Is that 
not the expected behavior always?

m=audio 52352 RTP/AVP 0 97 18 101.
m=audio 58676 RTP/AVP 0 101.
Richard___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] B2BUA "From" Header & Caller-ID Question

2010-10-13 Thread Richard Revels
I'm not sure that process persistence is what Brett was looking for but rather 
Dialog persistence.  I have found that local memcache support is very fast and 
takes care of this type of need quite well.  

Using a unique key, made up perhaps of the SIP call-id and type of value like 
"B2Bwhatever_callerid" and the value you desire it to contain will allow you to 
store, retrieve, and delete the value at will from any point in call 
processing.  Plus you can pass in an expire time so it will be deleted in the 
event something goes wrong with the call.  If you want to get real fancy you 
could even set up a memcached server and do those same functions from 
distributed Proxies.

http://www.opensips.org/Resources/DocsTutMemcache.

There are always a thousand ways to do any one thing in opensips, like storing 
the avp to the database 

case "INVITE" :
avp_db_store("$ci", "$avp(s:epochtime)"); 
#epochtime set in "set variables route" - store it to db with call id as uuid.


and grabbing it back

case "BYE" :
avp_db_load("$ci", "a"); #get all records from db 
stored with this call id as uuid.
#this caused epochtime avp to become multi.
avp_db_delete("$ci", "a"); #get rid of db entries for 
this call


(this example doesn't exactly match your need but you get the idea) but 
memcache is one way to do this job.


Richard

On Oct 13, 2010, at 3:13 AM, Anca Vamanu wrote:

> Hi Brett,
> 
> I think using script variables should work - 
> http://www.opensips.org/Resources/DocsCoreVar#varscript.
> 
> Regards,
> Anca
> 
> On 10/13/2010 01:31 AM, Brett Woollum wrote:
>> 
>> Hi Anca,
>> 
>> I figured out the solution that you were referring to. I added the 
>> local_route section and changed the header in there, and it works.
>> 
>> The only problem now is that the AVP variable I set in route doesn't seem to 
>> be persistent into the new request inside local_route. This is a problem 
>> because I need some way to send the variables to local_route so that I can 
>> put them into the new request. Is there a way to make an AVP variable 
>> persistent into the local_route as well? Or maybe there is a better way to 
>> make these variables accessible from inside local_route?
>> 
>> Here is my working code (with statically set caller id. I need to make this 
>> dynamic):
>> local_route {
>> if (is_method("INVITE")) {
>> remove_hf("From");
>> append_hf("From: \"TEST3\" ;tag=$ft\r\n");
>> #exit;
>> }
>> if (is_method("BYE") ) {
>> acc_log_request("internally generated BYE");
>> }
>> }
>> 
>> Brett Woollum
>> br...@woollum.com
>> 
>> 
>> - Original Message -
>> From: "Anca Vamanu" 
>> To: users@lists.opensips.org
>> Sent: Tuesday, October 12, 2010 2:37:55 AM GMT -08:00 US/Canada Pacific
>> Subject: Re: [OpenSIPS-Users] B2BUA "From" Header & Caller-ID Question
>> 
>> Hi Brett,
>> 
>> The b2bua generates a new request with the info from the received one. The 
>> problem is with the changes upon a request not being visible to the 
>> following functions called from the script. 
>> So you have to change the header on the generated one, in local route.
>> 
>> Regards,
>> Anca
>> 
>> 
>> On 10/12/2010 10:24 AM, Brett Woollum wrote:
>> In addition, the uac_replace_from(display,uri); function does not seem to 
>> work either. I tested this function by putting:
>> 
>> uac_replace_from("TEST", "sip:12...@1.2.3.4");
>> 
>> immediately above the call to B2B_INIT_REQUEST and the outbound "From:" 
>> header remains unchanged (incorrect).
>> 
>> Brett Woollum
>> br...@woollum.com
>> 
>> 
>> - Original Message -
>> From: "Brett Woollum" 
>> To: "users-request" 
>> Sent: Monday, October 11, 2010 11:53:39 PM GMT -08:00 US/Canada Pacific
>> Subject: [OpenSIPS-Users] B2BUA "From" Header & Caller-ID Question
>> 
>> Hello,
>> 
>> I have a working implementation of the B2BUA modules for OpenSIPS. One 
>> problem I am having is that the B2BUA module doesn't seem to respect the 
>> "From:" header that I updated before B2B_INIT was called (at the end of the 
>> script). Before I call B2B_INIT, my script looks up the correct caller-id 
>> from a database and replaces the "From:" header with the new information. 
>> Here is that code:
>> 
>> xlog("This is an external call...");
>> avp_db_query("select id from subscriber where username=\"$fU\" AND 
>> domain=\"1.2.3.4\"", "$avp(s:subscriber_id)");
>> if(is_avp_set("$avp(s:subscriber_id)")){  
>> avp_db_query("select 
>> external_cid_name,external_cid_uri,external_cid_uri_domain from cid where 
>> subscriber_id=\"$avp(s:subscriber_id)\"", 
>> "$avp(s:external_cid_name);$avp(s:external_cid_uri);$avp(s:external_cid_uri_domain)");
>> remove_hf("From");
>> append_hf("From:

Re: [OpenSIPS-Users] Asterisk Cluster Scenario

2010-09-25 Thread Richard Revels
http://www.opensips.org/index.php?n=Resources.DocsTutLoadbalancing


On Sep 25, 2010, at 6:22 AM, Stefano Sasso wrote:

> Hello folks,
>   my company has experience in setting up single asterisk setup, but
> recently one of our customers asked us to set up an asterisk cluster,
> that must be High Availability and Load Balanced.
> So I wrote here to have some hint or advice about the configuration we 
> thought.
> 
> First of all I'll explain you the scenario:
> The asterisk cluster must serve as Call Center "Hub-and-Spoke". There
> are lots of little call-centers (~15 ops), phisically separated, that
> must appears as a single "Big Virtual Call-Center". The call-center is
> inbound and outbound.
> Initially the "Virtual Call-Center" will be composed of 15 small
> call-centers (= ~230 ops), but the prevision is to grow to ~800 ops.
> 
> Asterisk must work as B2BUA, because the customer does not want the
> call-centers contact directly the upstream SIP providers. Asterisk
> server must also record the call and, maybe, do some transcoding.
> 
> The single asterisks instances talk each-other with DUNDi/IAX2 to pass
> the calls from an op to another op registered on another server.
> We'll use a mysql database (NDB cluster) to avoid to have multiple
> sip.conf files with the registration informations (asterisk-rt).
> We must, in any case, use asterisk, because the whole call-center has
> to be integrated with a 3rd part software for predictive calling ad
> power dialing which has been developed for asterisk.
> 
> The SIP servers are behind NAT, because the customer want to use only
> one public IP address; every asterisk server will have a different RTP
> port range to avoid rtp conflicts.
> 
> And, for now, the LB part works manually registering the ops on
> different asterisk servers.
> But now we have to achieve the HA part of the setup.
> 
> We started considering a SIP hardware load balancer, like Radware or
> Brocade, but neither a single nor a couple of this equipments (HA,
> remember?) do not fit in the customer budget.
> So, we started thinking about use OpenSIPS (formerly OpenSER) as a SIP
> load-balancer. (the customer has server hardware that could be used
> for this, and we will use VRRP for redundancy).
> 
> In the OpenSIPS features we read "load balancing with failover", but
> we could not find any useful and complete configuration example.
> Is OpenSIPS able to know if an asterisk server is UP or DOWN, or must
> we use a 3rd part tool, like mon?
> 
> Anyone has experience in use OpenSIPS as SIP load balancer (not to
> work as "real" SIP proxy)?
> 
> Any hint/advice for this part, or for the global setup?
> 
> 
> Thanks in advance for the help!
>   Stefano
> 
> PS: sorry for my weak english
> PS2: sorry for cross posting but, if the general setup is more
> asterisk related, the OpenSIPS part is, obviously, OpenSIP specific.
> 
> -- 
> Stefano Sasso
> http://stefano.dscnet.org/
> 
> ___
> 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] Mediaproxy: closing expired call when one party stops sending RTP

2010-09-19 Thread Richard Revels
Media relay uses linux connection tracking.  The rules are bi-directional.  If 
packets are still coming from the called party side back to the (no longer 
there) calling party side then the packet counters are still incrementing.

I've been looking at the same type of issue with users on sketchy networks 
calling conference bridges.  One way around it, that I'm not liking at the 
moment, is sip session timers.  (SST module in opensips)  One reason I'm not 
fond of this method is I'm already using the dialog timeout for other things 
and SST modifies it based on the session time. It might be better if there were 
two timer values with one devoted to SST.  But I digress.

There might also be a way to poll the conntrack packet count externally and 
compare them against dialogs via the MI interface.  Having a call on hold might 
be difficult to detect this way though.  I'll let you know if I think of an 
easy way to deal with this and you do the same for me.


Richard

On Sep 19, 2010, at 3:59 PM, John Khvatov wrote:

> Hello!
> 
> On Thu, 16 Sep 2010, John Khvatov wrote:
> 
>> Hello all.
>> 
>> I have a problem with RTP timeouts on media relay.
>> 
>> Media relay sends "expired" command only when _both_ parties stop
>> sending RTP. When we have one-directional RTP flow, media relay does not
>> throws timeout.
> 
> I may be poorly explained the problem...
> 
> We have a paid call UA1 <-> UA2. UA1 pays UA2 for the connection. RTP goes in 
> both
> directions though a media relay. Imagine, UA1 crashes (softphone crashed
> or network problem) and does not send a BYE message. Now, the flow goes
> in one direction UA2 -> UA1. UA1 continues to pay the money (until UA2 has
> disconnected).
> 
> Why media relay does not detect this call (connection) as expired? No
> support in the conntrack library?
> 
>> Is it a known behaviour? Any suggestions on how to fix it?
>> 
>> Thanks!
>> -- 
>> WBR, John Khvatov
> 
> -- 
> WBR, John Khvatov
> 
> ___
> 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] One dispatcher mystery solved; Doesn't seem to be "remembering" a gateway is failed however

2010-09-05 Thread Richard Revels
I take that back.  ping_from is different.  ping_sock is either in a newer 
version than I have or doesn't exist.

Richard

On Sep 5, 2010, at 10:25 AM, Richard Revels wrote:

> Another little harmless thing is the 1.6 documentation calls out ds_ping_sock 
> but the param is ds_ping_from.  Didn't see this mentioned on the list so I 
> don't think this has changed in more recent revisions.
> 
> Richard
> 
> On Apr 16, 2010, at 6:48 AM, Bogdan-Andrei Iancu wrote:
> 
>> Hi Jock,
>> 
>> ok, while investigating, I found a small harmless bug in the 
>> ds_next_() functions - they were trying to populate the ATTR avp 
>> even if it was not set - this was the reason for the err message you 
>> were getting.
>> 
>> The bug was fixed, so if you update from SVN it should go away.
>> 
>> Regards,
>> Bogdan
>> 
>> Jock McKechnie wrote:
>>> 
>>> 
>>> On Thu, Apr 15, 2010 at 8:41 AM, Bogdan-Andrei Iancu 
>>> mailto:bog...@voice-system.ro>> wrote:
>>> 
>>>   Jock McKechnie wrote:
>>>> 
>>>> 
>>>> On Tue, Apr 13, 2010 at 5:04 AM, Bogdan-Andrei Iancu
>>>> mailto:bog...@voice-system.ro>
>>>   <mailto:bog...@voice-system.ro <mailto:bog...@voice-system.ro>>>
>>>   wrote:
>>>> 
>>>>   Hi Jock,
>>>> 
>>>>   Jock McKechnie wrote:
>>>>> 
>>>>> On Mon, Apr 12, 2010 at 10:48 AM, Bogdan-Andrei Iancu
>>>>> mailto:bog...@voice-system.ro>
>>>   <mailto:bog...@voice-system.ro <mailto:bog...@voice-system.ro>>
>>>>   <mailto:bog...@voice-system.ro
>>>   <mailto:bog...@voice-system.ro> <mailto:bog...@voice-system.ro
>>>   <mailto:bog...@voice-system.ro>>>>
>>>>   wrote:
>>>>> 
>>>>>   Hi Jock,
>>>>>> I'm wondering if the above error is some kind of AVP
>>>>   storage thing I
>>>>>> haven't set up that is causing it not to properly
>>>   "mark" the
>>>>>   gateway,
>>>>>> or more likely, not remember the mark. But I can't spot
>>>>   anything in
>>>>>> the dispatcher documentation that says as such.
>>>>>   your guess is right - dispatcher module uses AVPs to keep
>>>>   the state
>>>>>   (between sequential tries on the same dialog).
>>>>> 
>>>>>   I guess the ds_mark_dst() fails - can you check this?
>>>>   (this function
>>>>>   search for the dst and grp avps to identify the last tried
>>>>>   destination.).
>>>>> 
>>>>> Greetings Bogdan, and thanks as always;
>>>>> 
>>>>> I tried this:
>>>>>   if( t_check_status("408") ){
>>>>>   xlog( "L_NOTICE", "[$Tf] FR: $ci --
>>>   TIMEOUT for
>>>>> Gateway $rd (marking as bad)\n" );
>>>>>   if (!ds_mark_dst("p")) {
>>>>>   xlog("L_NOTICE", "[$Tf] Panic! Not
>>>>   marked\n");
>>>>>   }
>>>>>   }
>>>>> 
>>>>> No 'Panic' in the logs.
>>>>> 
>>>>> The dst and grp AVPs are set up, as you saw on my original
>>>   post,
>>>>> but... that doesn't mean I'm not missing anything.
>>>>> 
>>>>   So, ds_mark does not fail .
>>>> 
>>>>   Are you 100% sure your script does define the "cnt" "grp"
>>>   "dst" avp
>>>>   params for the dispatcher module 
>>>> 
>>>> Unless somehow I'm doing it wrong, pretty sure:
>>>> 
>>>> # Set up the dispatcher
>>>> modparam("dispatcher", "db_url",
>>>> "mysql://openser:passw...@192.168.0.20/company
>>>   <http://openser:passw...@192.168.0.20/company>
>>>> <http://openser:passw...@192.168.0.20/company>")
>>>> modparam("dispatcher", "table_name", "dispatcher")
>>>> modparam("dispatcher", "flags", 2 )
>>>> 
>>>> modparam("dispatcher", "dst_avp", "$avp(i:271)")
>>>> modparam("dispatcher", "grp_avp", "$avp(i:272)")
&

Re: [OpenSIPS-Users] One dispatcher mystery solved; Doesn't seem to be "remembering" a gateway is failed however

2010-09-05 Thread Richard Revels
Another little harmless thing is the 1.6 documentation calls out ds_ping_sock 
but the param is ds_ping_from.  Didn't see this mentioned on the list so I 
don't think this has changed in more recent revisions.

Richard

On Apr 16, 2010, at 6:48 AM, Bogdan-Andrei Iancu wrote:

> Hi Jock,
> 
> ok, while investigating, I found a small harmless bug in the 
> ds_next_() functions - they were trying to populate the ATTR avp 
> even if it was not set - this was the reason for the err message you 
> were getting.
> 
> The bug was fixed, so if you update from SVN it should go away.
> 
> Regards,
> Bogdan
> 
> Jock McKechnie wrote:
>> 
>> 
>> On Thu, Apr 15, 2010 at 8:41 AM, Bogdan-Andrei Iancu 
>> mailto:bog...@voice-system.ro>> wrote:
>> 
>>Jock McKechnie wrote:
>>> 
>>> 
>>> On Tue, Apr 13, 2010 at 5:04 AM, Bogdan-Andrei Iancu
>>> mailto:bog...@voice-system.ro>
>>>>
>>wrote:
>>> 
>>>Hi Jock,
>>> 
>>>Jock McKechnie wrote:
 
 On Mon, Apr 12, 2010 at 10:48 AM, Bogdan-Andrei Iancu
 mailto:bog...@voice-system.ro>
>>>
>>>> >>>wrote:
 
Hi Jock,
> I'm wondering if the above error is some kind of AVP
>>>storage thing I
> haven't set up that is causing it not to properly
>>"mark" the
gateway,
> or more likely, not remember the mark. But I can't spot
>>>anything in
> the dispatcher documentation that says as such.
your guess is right - dispatcher module uses AVPs to keep
>>>the state
(between sequential tries on the same dialog).
 
I guess the ds_mark_dst() fails - can you check this?
>>>(this function
search for the dst and grp avps to identify the last tried
destination.).
 
 Greetings Bogdan, and thanks as always;
 
 I tried this:
if( t_check_status("408") ){
xlog( "L_NOTICE", "[$Tf] FR: $ci --
>>TIMEOUT for
 Gateway $rd (marking as bad)\n" );
if (!ds_mark_dst("p")) {
xlog("L_NOTICE", "[$Tf] Panic! Not
>>>marked\n");
}
}
 
 No 'Panic' in the logs.
 
 The dst and grp AVPs are set up, as you saw on my original
>>post,
 but... that doesn't mean I'm not missing anything.
 
>>>So, ds_mark does not fail .
>>> 
>>>Are you 100% sure your script does define the "cnt" "grp"
>>"dst" avp
>>>params for the dispatcher module 
>>> 
>>> Unless somehow I'm doing it wrong, pretty sure:
>>> 
>>> # Set up the dispatcher
>>> modparam("dispatcher", "db_url",
>>> "mysql://openser:passw...@192.168.0.20/company
>>
>>> ")
>>> modparam("dispatcher", "table_name", "dispatcher")
>>> modparam("dispatcher", "flags", 2 )
>>> 
>>> modparam("dispatcher", "dst_avp", "$avp(i:271)")
>>> modparam("dispatcher", "grp_avp", "$avp(i:272)")
>>> modparam("dispatcher", "cnt_avp", "$avp(i:273)")
>>> 
>>> modparam("dispatcher", "ds_ping_method", "OPTIONS")
>>> modparam("dispatcher", "ds_ping_interval", 5)
>>> modparam("dispatcher", "ds_ping_from",
>>"sip:+1410...@192.168.0.2
>>
>>> >>")
>>> modparam("dispatcher", "ds_probing_threshhold", 3)
>>> 
>>> As far as I can tell from the documentation and other people's
>>> examples, this should be all that is required to make this
>>function...
>>> 
>>Could you check and be sure the error:
>> 
>>   ERROR:core:search_first_avp: 0 ID or NULL NAME AVP!
>> 
>>comes from the ds_mark_dst() ? - put some logs before and after
>>it. Also eabling full debug (level 4) may also help.
>> 
>> 
>> My apologies, Bogdan, I should have done this better myself. I have 
>> traced the error to the ds_next_domain():
>> 
>> Config section from inside failure_route[]:
>> 
>> xlog("L_NOTICE", "[$Tf] HEREA\n");
>> if (ds_next_domain()) {
>>xlog("L_NOTICE", "[$Tf] HEREB\n");
>>.
>>.
>> 
>> The logs contain:
>> [Thu Apr 15 11:23:06 2010] HEREA
>> ERROR:core:search_first_avp: 0 ID or NULL NAME AVP!
>> DBG:dispatcher:ds_next_dst: using [sip:192.168.0.20:5060 
>> ]
>> [Thu Apr 15 11:23:06 2010] HEREB
>> 
>> 
>> So clearly the ds_next_domain() is producing it. However the function 
>> -is- returning the correct next entry in the dispatcher list, which is 
>> bizarre. I'm not sure, now, how this related to ds_select_domain() 
>> incorrectly choosing "marked" entries, alas.
> 
> -- 
> Bogdan-Andrei Iancu
> www.voice-system.ro
> 
> 
> _

Re: [OpenSIPS-Users] accounting and strange scenarios

2010-09-01 Thread Richard Revels
I'm kind of thinking that if the BYE is not accepted (error response) the 
failed_transaction_flag flag might need to be set at the start of the BYE 
transaction as well in order to pick it up.

  
On Sep 1, 2010, at 10:41 AM, Alex Massover wrote:

> Probably you don't trigger accounting for BYE request from the script (or not 
> to all BYE requests).
> If you want also to account CANCELS there's a flag in the acc module to do it 
> (as far as I remember it doesn't enabled by default). 
> 
> If accounting is triggered for BYE request - it produces ACC STOP regardless 
> if BYE is accepted or not. 
> You supposed to have STOP with code=487 in thirst case and 2 STOPs in second 
> case (one with code=200 and another with code=481).
> 
> -Original Message-
> From: users-boun...@lists.opensips.org 
> [mailto:users-boun...@lists.opensips.org] On Behalf Of Stanis?aw Pitucha
> Sent: Wednesday, September 01, 2010 4:43 PM
> To: OpenSIPS users mailling list
> Subject: [OpenSIPS-Users] accounting and strange scenarios
> 
> Hi all,
> 
> I've got 2 situations where opensips doesn't store the `acc` info
> properly (imo), for some reason.
> The first case is a bit complicated (best viewed with your favourite
> monospace font):
> 
> --->8---
> A   Proxy   B
> INV->
>  <-100-INV
>INV->
>  <-100-INV
>  <-180-INV
>  <-180-INV
>  <-200-INV
>  <-200-INV
> CANCEL->
>  <-200-CAN
> ACK-INV->
> BYE->
>BYE->
>ACK-INV->
>CANCEL->
>  <-200-CAN
>  <-487-BYE
>  <-487-BYE
> --->8---
> 
> So there are are lots of packet reorderings and on top of that, The
> cancel seems to be sent out before 200(INVITE) is received by A-side.
> This leaves me with accepted INVITE and no BYE (because BYE was
> rejected) in the acc table. CANCEL is not accounted at all.
> 
> The second case a bit similar:
> 
> --->8---
> A   Proxy   B
> INV->
>  <-100-INV
>INV->
>  <-100-INV
>  <-180-INV
>  <-180-INV
>  <-200-INV
>  <-200-INV
> ACK-INV->
>ACK-INV->
> BYE->
>  <-BYE
>BYE->
>  <-BYE
> 200-BYE->
>  <-481-BYE
>200-BYE->
> --->8---
> 
> The accepted BYE is not in the `acc` table either for some reason. I'm
> left with INVITE only.
> 
> Are those opensips-acc bugs? Do you know some more clever way to deal
> with accounting in this case?
> 
> Regards,
> Stan
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> This mail was received via Mail-SeCure System.
> 
> 
> 
> This mail was sent via Mail-SeCure System.
> ___
> 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] Removing a Header in INVITE before forwarding

2010-08-11 Thread Richard Revels
I think this also happens (route header on initial invite) when you set an 
outbound proxy on some clients.  My soft phone does this.  I just yank route 
headers with the remove header field command on initial invites as I don't want 
clients deciding how to route.  As TR mentioned, that can be bad'ish.

remove_hf("Route");

Richard

On Aug 10, 2010, at 7:48 PM, Aditya Kumar wrote:

> Thanks tr.
> 
> I tried:
>if (loose_route()) {
> t_relay();
> exit;
>   };
> --
> still it is not working? can you let me know what I am missing
> From: T.R. Missner 
> To: OpenSIPS users mailling list 
> Sent: Tue, August 10, 2010 3:27:27 PM
> Subject: Re: [OpenSIPS-Users] Removing a Header in INVITE before forwarding
> 
> try loose_route
> 
> it will look at the route header and if it matches itself it will be removed 
> and the invite will then be routed based on the RURI
> 
> Note - it's unusual to have a route header in an initial invite - it is 
> possible of course but be careful if you loose_route initial invites, this 
> type of routing is more likely going to exist with re-invites
> 
> -tr
> 
> 
> 
> On Tue, Aug 10, 2010 at 6:18 PM, Aditya Kumar  
> wrote:
> Hi All,
> I am using opensips as a outound Proxy.
> 
> I am using exec_s5 in example script.
> 
> Most of the cases the following script is working based on my requirement:
> route:
>  if (uri==myself) {
> //removed
> };
> # user found, forward to his current uri now
> if (!t_relay()) {
> sl_reply_error();
> };
> 
> 
> Issue:
> when the proxy sees that the RURI is not that of "myself" it is relaying.
> which is what I want.
> 
> But I see that Route Header in INVITE is also getting forwarded.
> Route is that of the opensips IP address.
> 
> Can any one help me in telling /pointing script where in,
> When I see that uri is not myself, Repy the message as it is .
> But remove the Route header?
> 
> pl let me know if I am not clear
> 
> 
> ___
> 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] Mediaproxy not updating with new SDPs

2010-08-02 Thread Richard Revels
No, you aren't overlooking anything.  What you describe is what happens.  User 
B answers with a different port in the 200 but the rtp continues to source from 
the same port.  The media relay just doesn't forward those packets.

I will try to get set back up to make some calls with this ALG device early 
this week and send the traces.

Richard


On Jul 30, 2010, at 4:35 AM, Saúl Ibarra Corretgé wrote:

> Hi Richard,
> 
> On 28/07/10 23:04, Richard Revels wrote:
>> No need to apologize.  I'm intruding on your time.  Just wanted to make sure 
>> I didn't sit in a spam filter for a week or anything.  :>
>> 
>> I found I had the same problem if I used use_media_proxy in the invite and 
>> reinvite.  However, since I am assured of the reinvite on every call from 
>> this source I just set a dialog flag in the invite to indicate I needed 
>> media proxy and waited to turn it on for the first time in the reinvite.  
>> That is doing the job for now.  I suspect most users behind a Belkin home 
>> wifi router will cause this problem.  On the particular model we have been 
>> working with, there seems to be no way to turn off the SIP ALG so it is 
>> particularly irritating.
>> 
> 
> I looked at the SIP trace you sent but I can't see the reason why it 
> fails. User A sends the INVITE and after he sends the reINVITE (which 
> btw has the same media information) and user B answers with a different 
> port in the 200 OK.
> 
> We have code to handle this situation, the stream is reset and the 
> conntrack rule will be re-generated same as it did with the first 
> INVITE, IIRC.
> 
> Am I overlooking something here?
> 
>> Anyway, I have a working solution and if you find something that can fix 
>> this while still using engage_media_proxy() that will be even better.
>> 
> 
> You mentioned some ALG in the middle, can you confirm this doesn't 
> happen if you don't use this ALG device? How does the ALG craft the packets?
> 
> 
> Regards,
> 
> PS: Maybe you can find what the ALG does by capturing packets before and 
> after, just paste the differences. Ngrep is much nices to read btw ;-)
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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] Mediaproxy not updating with new SDPs

2010-07-28 Thread Richard Revels
No need to apologize.  I'm intruding on your time.  Just wanted to make sure I 
didn't sit in a spam filter for a week or anything.  : >

I found I had the same problem if I used use_media_proxy in the invite and 
reinvite.  However, since I am assured of the reinvite on every call from this 
source I just set a dialog flag in the invite to indicate I needed media proxy 
and waited to turn it on for the first time in the reinvite.  That is doing the 
job for now.  I suspect most users behind a Belkin home wifi router will cause 
this problem.  On the particular model we have been working with, there seems 
to be no way to turn off the SIP ALG so it is particularly irritating.

Anyway, I have a working solution and if you find something that can fix this 
while still using engage_media_proxy() that will be even better.

Richard
  
On Jul 28, 2010, at 8:16 AM, Saúl Ibarra Corretgé wrote:

> On 28/07/10 14:01, Richard Revels wrote:
>> Saul,
>> 
>> Could you verify you got the trace file I sent?  I mailed it directly to you 
>> so I wouldn't have to worry about obfuscation on the IP addresses and want 
>> to make sure I didn't get caught in a spam filter or anything.
>> 
> 
> I didn't have time yet, but I got the email, sorry for not ack-ing it :-)
> 
> Will look into it.
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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] troubleshooting memory problems

2010-07-28 Thread Richard Revels
Just a quick follow-up on this.  I was cleaning up this server today (plus the 
couple problems I was having with b2bua - refer scenario were fixed with last 
bug fix) and realized that there are times when I can be pretty dense.

I was somewhat perplexed as to why I didn't get the debug output I was looking 
for with only the DDBG_QM_MALLOC uncommented but Bogdan was pretty firm that 
should be all that is needed.  Commenting them back out today, it finally hit 
home it's a continued line and commenting out one line below another doesn't 
really do anything.  : >  Move DDBG_QM_MALLOC above DDBG_F_MALLOC in the file 
and THEN uncomment DDBG_QM_MALLOC.  

Hopefully this will help someone down the road.  Should be obvious but got past 
me for quite a while.

DOAH!

Richard


On May 27, 2010, at 10:35 AM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
> 
> Richard Revels wrote:
>> In Makefile.defs uncomment
>> 
>> -DDBG_QM_MALLOC \
>> -DDBG_F_MALLOC \
>> 
> use only  DDBG_QM_MALLOC !!
>> In script set 
>> 
>> debug=6
>> memlog=6
>> 
>> 
>> Restart and let run for a while.  Then 
>> 
>> cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | sed 
>> -e 's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: \(.*\)/\1-malloc/' | 
>> sort | uniq -c
>> 
>> Adjust path for wherever you are logging of course.  Your output will have 
>> something like 
>> 
>>   3015 parse_contact(81)-malloc
>>   3015 parse_contact(81)-mfree
>>   3015 parse_contacts(192)-malloc
>>   3015 parse_contacts(192)-mfree
>>  19592 parse_from_header(63)-malloc
>>  19592 parse_from_header(63)-mfree
>> 335368 parse_headers(309)-malloc
>> 335368 parse_headers(309)-mfree
>> 
>> for all the calls that are fine.  Then something like 
>> 
>>  14922 do_parse_rr_body(65)-malloc
>>   8989 do_parse_rr_body(65)-mfree
>> 
>> or 
>> 
>>   9016 sip_msg_cloner(437)-malloc
>>   6003 sip_msg_cloner(437)-mfree
>> 
> That is not relevant as a mem block can be allocated in function X and 
> freed in function Y, so you cannot correlate the numbers.
>> 
>> for calls that need further looking into.  You'll probably want to go grep 
>> out the problem values in the log to get more information about what's 
>> calling them.
>> 
>> I'm chasing a fairly nasty memory leak (shared memory) right now and thought 
>> I would document / share some of the methods we use for this type of thing.
>> 
> 
> See:  http://www.opensips.org/Resources/DocsTsMem - try to get a dump to 
> see if there are leaks.
> 
> Regards,
> Bogdan
>> Richard
>> 
>> 
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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] Mediaproxy not updating with new SDPs

2010-07-28 Thread Richard Revels
Saul,

Could you verify you got the trace file I sent?  I mailed it directly to you so 
I wouldn't have to worry about obfuscation on the IP addresses and want to make 
sure I didn't get caught in a spam filter or anything.

Richard

On Jul 27, 2010, at 7:48 AM, Richard Revels wrote:

> Re RFC4317, yes that is the scenario.  My complaint here has nothing to do 
> with opensips.  I was just venting about the UA sending the reinvite so 
> quickly after the ACK that it sometimes reaches the destination first.  Let's 
> just say that not all endpoints handle this as gracefully as they could.  : >
> 
> Re reinvite, I thought I understood engage_media_proxy would handle reinvites 
> automagically.  Just making sure.  Thank you for verifying that.
> 
> Re UA port, yes it is advertising one port and using another.  A picture is 
> worth a thousand words.  I'll send the trace.
> 
> Richard
> 
> 
> On Jul 27, 2010, at 4:21 AM, Saúl Ibarra Corretgé wrote:
> 
>> Hi Richard,
>> 
>> On 24/07/10 23:05, Richard Revels wrote:
>>> Saul (and everyone) good afternoon.
>>> 
>>> I think I've come across a call flow that Mediaproxy would be expected to 
>>> handle but is not.  Umm, it's like sacrilege I know; but I think Mediaproxy 
>>> may have a bug.
>>> 
>>> 1) The originator sends INVITE with a couple of codec choices.
>>> 2) engage_media proxy is called and the INVITE is forwarded
>>> 3) 200 comes back with a couple of codec choices and m line indicates rtp 
>>> will source from port 35210 (and indeed rtp starts sourcing from there
>>> 4) The ACK comes back and for 10 milliseconds life is good
>>> 
>>> Then the Originator reinvites with only the single codec choice that it 
>>> believes was negotiated.  Standard procedure for this device and allowed 
>>> and all that but really, 10 milliseconds?? Anyway...
>>> 
>> 
>> So, would this be RFC4317 section 2.2? THat is: user A invites user B 
>> with 3 codecs but he only supports one at a time. Then B answers with 2 
>> codecs and A reinvites with a single codec. Is this right?
>> 
>>> 5) reinvite is forwarded without any mediaproxy calls or anything from the 
>>> script
>> 
>> If you are using engage_media_proxy this is done automatically by the 
>> dialog module.
>> 
>>> 6) The destination sends back a 200 but this time claims it will source 
>>> from port 1082.
>>> 7) The destination rtp continues to source from the original port 35210
>>> 
>> 
>> So, the UA said he is using port 1082, but is he actually using it? Or 
>> is he advertising one port and then using a different one?
>> 
>>> So, the result here is that rtp comes from the origination and is 
>>> forwarded, by Mediaproxy, to port 35210 at the destination where it is 
>>> happily accepted.  Media also flows from the destination from port 35210 
>>> but it is not forwarded which results in one way audio on the call.
>>> 
>>> It will be Monday before I am able to request more calls to be made but I'm 
>>> kind of thinking the firewall may be the cause of the port not changing and 
>>> the UA is actually sending from a new port.  Maybe not though.
>>> 
>>> In either case, should the Mediaproxy have waited for a rtp packet on any 
>>> port from the (call) destination IP after the 200 to the reinvite and set a 
>>> new connection track rule after it saw one?
>>> 
>> 
>> Session information is updated with any reinvite that could take place. 
>> Could you provide me with a SIP trace for the whole call?
>> 
>> 
>> Regards,
>> 
>> -- 
>> Saúl Ibarra Corretgé
>> AG Projects
>> 
>> ___
>> 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] Mediaproxy not updating with new SDPs

2010-07-27 Thread Richard Revels
Re RFC4317, yes that is the scenario.  My complaint here has nothing to do with 
opensips.  I was just venting about the UA sending the reinvite so quickly 
after the ACK that it sometimes reaches the destination first.  Let's just say 
that not all endpoints handle this as gracefully as they could.  : >

Re reinvite, I thought I understood engage_media_proxy would handle reinvites 
automagically.  Just making sure.  Thank you for verifying that.

Re UA port, yes it is advertising one port and using another.  A picture is 
worth a thousand words.  I'll send the trace.

Richard


On Jul 27, 2010, at 4:21 AM, Saúl Ibarra Corretgé wrote:

> Hi Richard,
> 
> On 24/07/10 23:05, Richard Revels wrote:
>> Saul (and everyone) good afternoon.
>> 
>> I think I've come across a call flow that Mediaproxy would be expected to 
>> handle but is not.  Umm, it's like sacrilege I know; but I think Mediaproxy 
>> may have a bug.
>> 
>> 1) The originator sends INVITE with a couple of codec choices.
>> 2) engage_media proxy is called and the INVITE is forwarded
>> 3) 200 comes back with a couple of codec choices and m line indicates rtp 
>> will source from port 35210 (and indeed rtp starts sourcing from there
>> 4) The ACK comes back and for 10 milliseconds life is good
>> 
>> Then the Originator reinvites with only the single codec choice that it 
>> believes was negotiated.  Standard procedure for this device and allowed and 
>> all that but really, 10 milliseconds?? Anyway...
>> 
> 
> So, would this be RFC4317 section 2.2? THat is: user A invites user B 
> with 3 codecs but he only supports one at a time. Then B answers with 2 
> codecs and A reinvites with a single codec. Is this right?
> 
>> 5) reinvite is forwarded without any mediaproxy calls or anything from the 
>> script
> 
> If you are using engage_media_proxy this is done automatically by the 
> dialog module.
> 
>> 6) The destination sends back a 200 but this time claims it will source from 
>> port 1082.
>> 7) The destination rtp continues to source from the original port 35210
>> 
> 
> So, the UA said he is using port 1082, but is he actually using it? Or 
> is he advertising one port and then using a different one?
> 
>> So, the result here is that rtp comes from the origination and is forwarded, 
>> by Mediaproxy, to port 35210 at the destination where it is happily 
>> accepted.  Media also flows from the destination from port 35210 but it is 
>> not forwarded which results in one way audio on the call.
>> 
>> It will be Monday before I am able to request more calls to be made but I'm 
>> kind of thinking the firewall may be the cause of the port not changing and 
>> the UA is actually sending from a new port.  Maybe not though.
>> 
>> In either case, should the Mediaproxy have waited for a rtp packet on any 
>> port from the (call) destination IP after the 200 to the reinvite and set a 
>> new connection track rule after it saw one?
>> 
> 
> Session information is updated with any reinvite that could take place. 
> Could you provide me with a SIP trace for the whole call?
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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] Mediaproxy not updating with new SDPs

2010-07-24 Thread Richard Revels
Saul (and everyone) good afternoon.

I think I've come across a call flow that Mediaproxy would be expected to 
handle but is not.  Umm, it's like sacrilege I know; but I think Mediaproxy may 
have a bug.

1) The originator sends INVITE with a couple of codec choices.
2) engage_media proxy is called and the INVITE is forwarded
3) 200 comes back with a couple of codec choices and m line indicates rtp will 
source from port 35210 (and indeed rtp starts sourcing from there
4) The ACK comes back and for 10 milliseconds life is good

Then the Originator reinvites with only the single codec choice that it 
believes was negotiated.  Standard procedure for this device and allowed and 
all that but really, 10 milliseconds?? Anyway...

5) reinvite is forwarded without any mediaproxy calls or anything from the 
script
6) The destination sends back a 200 but this time claims it will source from 
port 1082.
7) The destination rtp continues to source from the original port 35210

So, the result here is that rtp comes from the origination and is forwarded, by 
Mediaproxy, to port 35210 at the destination where it is happily accepted.  
Media also flows from the destination from port 35210 but it is not forwarded 
which results in one way audio on the call.

It will be Monday before I am able to request more calls to be made but I'm 
kind of thinking the firewall may be the cause of the port not changing and the 
UA is actually sending from a new port.  Maybe not though.  

In either case, should the Mediaproxy have waited for a rtp packet on any port 
from the (call) destination IP after the 200 to the reinvite and set a new 
connection track rule after it saw one?

I'm using Mediaproxy 2.4.2.

Richard



On Jul 21, 2010, at 5:14 PM, Saúl Ibarra Corretgé wrote:

> Hi Jeff,
> 
> On 21/07/10 21:50, Jeff Pyle wrote:
>> Hello,
>> 
>> I am using Mediaproxy 2.3.8 with Opensips 1.6 r6702.  I use the 
>> engage_media_proxy() function.  Most things work pretty well except for the 
>> following scenario:
>> 
>> Call comes in from CPE, hits the engage_media_proxy() function, and 
>> t_relay's to the far end.  The far-end sends a 503, but before they do, they 
>> send some media.  I'm working with them now to determine the true source of 
>> this unwanted media.  Anyway, Opensips does a serial fork to the next 
>> carrier, who sends a 183 w/ SDP, and finally a 200 OK.  But the media relay 
>> has already locked down to the media the first carrier sent.  How come the 
>> media relay doesn't learn about the new media information from the SDPs in 
>> the 183 and the 200?
>> 
> 
> MediaProxy uses the information from the SDP from both ends and then it 
> waits to receive a RTP packet from each endpoint. Once this happens it 
> inserts a conntrack rule in the kernel so that the relaying is performed.
> 
> I could judge better with a SIP trace but my guess is that the dialog 
> could get to an inconsistent state, so mediaproxy loses track.
> 
>> I'd like to be able to wait for an SDP to come back on a 18x or a 200 before 
>> starting the relay.  It appears the engage_media_proxy() function is 
>> available only from the REQUEST_ROUTE.  Perhaps it would be smarter in this 
>> case to use the use_media_proxy()/end_media_session() functions in the 
>> REPLY_ROUTE and FAILURE_ROUTEs.
>> 
> 
> You are right. Engage_media_proxy covers most general purpose scenarios 
> but it's not suitable for everyone, so in this case you may want yo call 
> the individual functions manually.
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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] URI PARSING

2010-07-08 Thread Richard Revels
Ha!  Never thought about both being present when I wrote that.  Thank you.


On Jul 8, 2010, at 4:47 PM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
> 
> actually the logic should be the other way around - the "per contact" 
> expire (if present)  has higher priority over the header Expire.
> 
> Regards,
> Bogdan
> 
> Richard Revels wrote:
>>#this next part logs an error if the message has no expires 
>> info (scanner messages sent directly to proxy for instance)
>>if(is_present_hf("Expires"))
>>$avp(i:10) := $hdr(Expires);
>>else
>>$avp(i:10) := $ct.fields(expires);
>>if( $avp(i:10)  == "0" )
>>{
>> ...
>> 
>> 
>> Speaking of this, using a min_expires param to the registrar module 
>> seems to defeat allowing users to unregister by sending a expires of 
>> zero.  I seem to remember it gets bumped to the min value.  If true, I 
>> think there should be a check added in the minimum time check to let 
>> zero sneak through as is and remove the user from userloc table.
>> 
>> Richard
>> 
>> 
>> On Jul 8, 2010, at 5:33 AM, Premalatha Kuppan wrote:
>> 
>>> Hi,
>>> 
>>> How do i check expiration for user, meaning to identify de-registration.
>>> When user is de-registred; then the request comes with expires=0; how 
>>> to get this field and check in opensips.cfg file ?
>>> 
>>> Any help ?
>>> 
>>> Thanks,
>>> Prem
>>> 
>>> 
>>> On Wed, Jul 7, 2010 at 7:42 PM, Premalatha Kuppan 
>>> mailto:premala...@ngintech.com>> wrote:
>>> 
>>>Thanks to all.
>>> 
>>>Its working now using $tu and avp_db_query.
>>> 
>>> $var(x)=$(tu{uri.user});
>>>avp_db_query("INSERT INTO TESTTABLE (xxx,yyy,zzz)
>>>
>>> VALUES('$(var(x){s.select,0,_})','$(var(x){s.select,1,_})','$(var(x){s.select,2,_})')");
>>> 
>>>Now, have to look how to remove these entries during de-registration.
>>> 
>>>Thanks,
>>>Prem
>>> 
>>> 
>>> 
>>>On Wed, Jul 7, 2010 at 5:05 PM, Bogdan-Andrei Iancu
>>>mailto:bog...@voice-system.ro>> wrote:
>>> 
>>>Premalatha Kuppan wrote:
>>>> Thanks. Corrected teh opensips.cfg file
>>>> 
>>>> But the problem was due to this. by default DB URL was
>>>NULL. Now i
>>>> have added the DB URL for avpops.
>>>> # default URL
>>>> modparam("avpops","db_url","mysql://user:pas...@host/database")
>>>> 
>>>> 
>>>> 
>>>> But the value of $rU is NULL..am i placing it in wrong
>>>location?
>>> 
>>>In REGISTER requests, the RURI has only domain part
>>>(sip:opensips.org <http://opensips.org/>)
>>>so it is normal to have $rU NULL. If you need to identity of
>>>the user
>>>who registered, according to SIP, you have to look at the TO
>>>URI - so
>>>use $tu to get TO uri and use the URI transformation if you
>>>want to
>>>split in in username and domain (see
>>>http://www.opensips.org/Resources/DocsCoreTran16#toc17 ).
>>> 
>>> 
>>>Regards,
>>>Bogdan
>>> 
>>>> I want the userpart e.g: sip:userp...@domain is the
>>>request uri; i
>>>> need only userpart . I believe that would be stored in $rU;
>>>but tis
>>>> coming as NULL. Which variable or where should i place this
>>>command
>>>> for registration and de-registration.
>>>> 
>>>> Any Idea ?
>>>> 
>>>> On Wed, Jul 7, 2010 at 4:13 PM, mayamatakeshi
>>>mailto:mayamatake...@gmail.com>
>>>> <mailto:mayamatake...@gmail.com
>>><mailto:mayamatake...@gmail.com>>> wrote:
>>>> 
>>>> 
>>>> 
>>>>On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan
>>>>>><mailto:premala...@ngintech.com>
>>><mailto:premala...@ngintech.com
>>><mailto:premala...@ngintech.com>>> wrote:
>>>> 
>>>>Hi,
>>>> 
>>>>Iam us

Re: [OpenSIPS-Users] URI PARSING

2010-07-08 Thread Richard Revels
#this next part logs an error if the message has no expires info 
(scanner messages sent directly to proxy for instance)
if(is_present_hf("Expires"))
$avp(i:10) := $hdr(Expires);
else
$avp(i:10) := $ct.fields(expires);
if( $avp(i:10)  == "0" )
{
...


Speaking of this, using a min_expires param to the registrar module seems to 
defeat allowing users to unregister by sending a expires of zero.  I seem to 
remember it gets bumped to the min value.  If true, I think there should be a 
check added in the minimum time check to let zero sneak through as is and 
remove the user from userloc table.

Richard


On Jul 8, 2010, at 5:33 AM, Premalatha Kuppan wrote:

> Hi,
> 
> How do i check expiration for user, meaning to identify de-registration.
> When user is de-registred; then the request comes with expires=0; how to get 
> this field and check in opensips.cfg file ?
> 
> Any help ?
> 
> Thanks,
> Prem
> 
> 
> On Wed, Jul 7, 2010 at 7:42 PM, Premalatha Kuppan  
> wrote:
> Thanks to all.
> 
> Its working now using $tu and avp_db_query.
> 
>  $var(x)=$(tu{uri.user});
> avp_db_query("INSERT INTO TESTTABLE (xxx,yyy,zzz) 
> VALUES('$(var(x){s.select,0,_})','$(var(x){s.select,1,_})','$(var(x){s.select,2,_})')");
> 
> Now, have to look how to remove these entries during de-registration.
> 
> Thanks,
> Prem
> 
> 
> 
> On Wed, Jul 7, 2010 at 5:05 PM, Bogdan-Andrei Iancu  
> wrote:
> Premalatha Kuppan wrote:
> > Thanks. Corrected teh opensips.cfg file
> >
> > But the problem was due to this. by default DB URL was NULL. Now i
> > have added the DB URL for avpops.
> > # default URL
> > modparam("avpops","db_url","mysql://user:pas...@host/database")
> >
> >
> >
> > But the value of $rU is NULL..am i placing it in wrong location?
> 
> In REGISTER requests, the RURI has only domain part (sip:opensips.org)
> so it is normal to have $rU NULL. If you need to identity of the user
> who registered, according to SIP, you have to look at the TO URI - so
> use $tu to get TO uri and use the URI transformation if you want to
> split in in username and domain (see
> http://www.opensips.org/Resources/DocsCoreTran16#toc17 ).
> 
> 
> Regards,
> Bogdan
> 
> >  I want the userpart e.g: sip:userp...@domain is the request uri; i
> > need only userpart . I believe that would be stored in $rU; but tis
> > coming as NULL. Which variable or where should i place this command
> > for registration and de-registration.
> >
> > Any Idea ?
> >
> > On Wed, Jul 7, 2010 at 4:13 PM, mayamatakeshi  > > wrote:
> >
> >
> >
> > On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan
> > mailto:premala...@ngintech.com>> wrote:
> >
> > Hi,
> >
> > Iam using avp_db_query, but opensips is dead with following error,
> >
> > During Registration, when the user is registered. I have to
> > parse and store th value in DB. So, included the avp_db_query
> > in this loop. Is this right one to do. I assume the value of
> > rU is NULL over here, probably its failing. Not sure :(
> >
> > Any insight  ?
> >
> > if (is_method("REGISTER"))
> > {
> > # authenticate the REGISTER requests
> > (uncomment to enable auth)
> > if (!www_authorize("10.140.1.110", "subscriber"))
> > {
> > www_challenge("10.140.1.110", "0");
> > exit;
> > }
> >
> >  #  if (!db_check_to())
> >  #  {
> >  #  sl_send_reply("403","Forbidden auth ID");
> >  #  exit;
> >  #  }
> >
> > if (!save("location"))
> > sl_reply_error();
> >
> > $var(x) = $rU ;
> > avp_db_query("INSERT INTO TESTTABLE
> > (xxx,yyy,zzz)
> > 
> > VALUES('$(var(x){s.select,0,_})','$var(x)({s.select,1,_})','$(var(x){s.select,2,_})'");
> > exit;
> > }
> >
> >
> > Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> > ERROR:avpops:fixup_db_query_avp: no db url defined to be used
> > by this function
> > Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> > *ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 351*
> > Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> > ERROR:core:main: failed to fix configuration with err code -6
> >
> >
> > Clearly you misplaced the parenthesis:
> >
> >
> > $(var(x){s.select,0,_})',
> > '$var(x)({s.select,1,_})',
> > '$(var(x){s.select,2,_})'
> >
> >
> >
> >
> > ___
> > Users mailing list
> > Users@lists.o

Re: [OpenSIPS-Users] Convert 183SDP to 180 fr_inv_timer problem

2010-06-30 Thread Richard Revels
Possibly this?

AVPs are persistent per SIP transaction, being available in "route", 
"branch_route" and "failure_route". To make them available in "onreply_route" 
armed via TM module, set "onreply_avp_mode" parameter of TM module (note that 
in the default "onreply_route", the AVPs of the transaction are not available).


On Jun 30, 2010, at 12:43 AM, Brett Nemeroff wrote:

> Hello List,
> Thomas Gelf wrote a nice code snippet that converts a 183 SDP to a 180 in an 
> onreply route. I just tried this out and it works great..
> 
> 
> Only one problem. I reset my $avp(s:fr_inv_timer) right before I call it and 
> the change isn't being honored. I'm wondering if it has to do with a 
> t_function not being called?
> 
> Any suggestions on what to do here?
> 
> What I have is essentially:
> 
> 
> onreply_route[1]
> {
> ...
>$avp(s:fr_inv_timer)=200;
> 
>if(t_check_status("183")) {
> perl_exec("sendReplyAs180");
> drop();
> }
> }
> 
> Thanks,
> Brett
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


Re: [OpenSIPS-Users] troubleshooting memory problems

2010-05-27 Thread Richard Revels
make realclean did it.  Thank you.  I'll add that to my "stuff kinda good to 
remember" list.  I was tempted to go back and make sure I hadn't imagined doing 
a make clean the first time around but not all that tempted.  : >

Richard

On May 27, 2010, at 12:22 PM, Ovidiu Sas wrote:

> Try 'make realclean' before a 'make install'.  This should clean up
> completely the repo.
> 
> Regards,
> Ovidiu Sas
> 
> On Thu, May 27, 2010 at 11:45 AM, Richard Revels  
> wrote:
>> Yep.  Did a make clean and make all before make install.  I think its a 
>> little deeper than that.
>> 
>> 
>> On May 27, 2010, at 11:30 AM, Bogdan-Andrei Iancu wrote:
>> 
>>> Richard Revels wrote:
>>>> I got an error when starting up with only qm_malloc enabled.  Was planning 
>>>> to mention that a little later.  Yeah, I should have gone a bit deeper to 
>>>> get the memory pointer that is alloc'd / free'd but am using this as a 
>>>> starting point.  I'll go through the wiki steps over the weekend.
>>>> 
>>>> opensips: ERROR:core:version_control: module compile flags mismatch for 
>>>> avpops
>>>> 
>>> ^^ be sure you recompile all modules and core !!!
>>> 
>>>> #012core: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, 
>>>> SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, 
>>>> FAST_LOCK-ADAPTIVE_WAIT
>>>> 
>>>> #012module: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, 
>>>> SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, DBG_F_MALLOC, 
>>>> FAST_LOCK-ADAPTIVE_WAIT
>>>> 
>>>> 
>>>> Richard
>>>> 
>>>> 
>>>> On May 27, 2010, at 10:35 AM, Bogdan-Andrei Iancu wrote:
>>>> 
>>>> 
>>>>> Hi Richard,
>>>>> 
>>>>> Richard Revels wrote:
>>>>> 
>>>>>> In Makefile.defs uncomment
>>>>>> 
>>>>>>-DDBG_QM_MALLOC \
>>>>>>-DDBG_F_MALLOC \
>>>>>> 
>>>>>> 
>>>>> use only  DDBG_QM_MALLOC !!
>>>>> 
>>>>>> In script set
>>>>>> 
>>>>>> debug=6
>>>>>> memlog=6
>>>>>> 
>>>>>> 
>>>>>> Restart and let run for a while.  Then
>>>>>> 
>>>>>> cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | 
>>>>>> sed -e 's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: 
>>>>>> \(.*\)/\1-malloc/' | sort | uniq -c
>>>>>> 
>>>>>> Adjust path for wherever you are logging of course.  Your output will 
>>>>>> have something like
>>>>>> 
>>>>>>  3015 parse_contact(81)-malloc
>>>>>>  3015 parse_contact(81)-mfree
>>>>>>  3015 parse_contacts(192)-malloc
>>>>>>  3015 parse_contacts(192)-mfree
>>>>>> 19592 parse_from_header(63)-malloc
>>>>>> 19592 parse_from_header(63)-mfree
>>>>>> 335368 parse_headers(309)-malloc
>>>>>> 335368 parse_headers(309)-mfree
>>>>>> 
>>>>>> for all the calls that are fine.  Then something like
>>>>>> 
>>>>>> 14922 do_parse_rr_body(65)-malloc
>>>>>>  8989 do_parse_rr_body(65)-mfree
>>>>>> 
>>>>>> or
>>>>>> 
>>>>>>  9016 sip_msg_cloner(437)-malloc
>>>>>>  6003 sip_msg_cloner(437)-mfree
>>>>>> 
>>>>>> 
>>>>> That is not relevant as a mem block can be allocated in function X and
>>>>> freed in function Y, so you cannot correlate the numbers.
>>>>> 
>>>>>> for calls that need further looking into.  You'll probably want to go 
>>>>>> grep out the problem values in the log to get more information about 
>>>>>> what's calling them.
>>>>>> 
>>>>>> I'm chasing a fairly nasty memory leak (shared memory) right now and 
>>>>>> thought I would document / share some of the methods we use for this 
>>>>>> type of thing.
>>>>>> 
>>>>>> 
>>>>> See:  http://www.opensips.org/Resources/DocsTsMem - try to get a dump to
>>>>> see if there are leaks.
>>>>> 
>>>>> Regards,
>>>>> Bogdan
>>>>> 
>>>>>> Richard
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ___
>>>>>> Users mailing list
>>>>>> Users@lists.opensips.org
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> --
>>>>> Bogdan-Andrei Iancu
>>>>> 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
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Bogdan-Andrei Iancu
>>> 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
>> 
> 
> ___
> 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] Multiple opensips instances

2010-05-27 Thread Richard Revels
One other thing you might want to do is set a couple symbolic links with 
different names to opensips binary and call them for each instance.  It makes 
it easier to kill one instance without disturbing the others.

And then copy opensipsctl to individual names so you can set opensipsctlrc to 
the pid file and fifo or socket for each.  Makes things like "dispatcher 
reload" work nicer.

Richard


On May 27, 2010, at 5:00 PM, Saúl Ibarra Corretgé wrote:

> Hi,
> 
> On 27/05/10 22:57, David Cunningham wrote:
>> Hello,
>> 
>> I've seen mentioned that you can run multiple instances of OpenSIPS as
>> follows. Is it definitely possible (with 1.4?), and each OpenSIPS will
>> be completely independent of the others?
>> 
>> opensips -l 192.168.1.109:5030 -f /var/app/config/opensips_1.cfg -P
>> /var/run/opensips_1.pid
>> opensips -l 192.168.1.109:5040 -f /var/app/config/opensips_2.cfg -P
>> /var/run/opensips_2.pid
>> opensips -l 192.168.1.109:5050 -f /var/app/config/opensips_3.cfg -P
>> /var/run/opensips_3.pid
>> 
>> Thanks in advance!
>> 
> 
> Yes, they will be independent as long as you supply a different 
> configuration file and specify a different PID, just like those examples 
> in your email show.
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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] troubleshooting memory problems

2010-05-27 Thread Richard Revels
Yep.  Did a make clean and make all before make install.  I think its a little 
deeper than that.


On May 27, 2010, at 11:30 AM, Bogdan-Andrei Iancu wrote:

> Richard Revels wrote:
>> I got an error when starting up with only qm_malloc enabled.  Was planning 
>> to mention that a little later.  Yeah, I should have gone a bit deeper to 
>> get the memory pointer that is alloc'd / free'd but am using this as a 
>> starting point.  I'll go through the wiki steps over the weekend. 
>> 
>> opensips: ERROR:core:version_control: module compile flags mismatch for 
>> avpops 
>> 
> ^^ be sure you recompile all modules and core !!!
> 
>> #012core: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 
>> SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> 
>> #012module: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, 
>> SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, DBG_F_MALLOC, 
>> FAST_LOCK-ADAPTIVE_WAIT
>> 
>> 
>> Richard
>> 
>> 
>> On May 27, 2010, at 10:35 AM, Bogdan-Andrei Iancu wrote:
>> 
>> 
>>> Hi Richard,
>>> 
>>> Richard Revels wrote:
>>> 
>>>> In Makefile.defs uncomment
>>>> 
>>>>-DDBG_QM_MALLOC \
>>>>-DDBG_F_MALLOC \
>>>> 
>>>> 
>>> use only  DDBG_QM_MALLOC !!
>>> 
>>>> In script set 
>>>> 
>>>> debug=6
>>>> memlog=6
>>>> 
>>>> 
>>>> Restart and let run for a while.  Then 
>>>> 
>>>> cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | 
>>>> sed -e 's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: 
>>>> \(.*\)/\1-malloc/' | sort | uniq -c
>>>> 
>>>> Adjust path for wherever you are logging of course.  Your output will have 
>>>> something like 
>>>> 
>>>>  3015 parse_contact(81)-malloc
>>>>  3015 parse_contact(81)-mfree
>>>>  3015 parse_contacts(192)-malloc
>>>>  3015 parse_contacts(192)-mfree
>>>> 19592 parse_from_header(63)-malloc
>>>> 19592 parse_from_header(63)-mfree
>>>> 335368 parse_headers(309)-malloc
>>>> 335368 parse_headers(309)-mfree
>>>> 
>>>> for all the calls that are fine.  Then something like 
>>>> 
>>>> 14922 do_parse_rr_body(65)-malloc
>>>>  8989 do_parse_rr_body(65)-mfree
>>>> 
>>>> or 
>>>> 
>>>>  9016 sip_msg_cloner(437)-malloc
>>>>  6003 sip_msg_cloner(437)-mfree
>>>> 
>>>> 
>>> That is not relevant as a mem block can be allocated in function X and 
>>> freed in function Y, so you cannot correlate the numbers.
>>> 
>>>> for calls that need further looking into.  You'll probably want to go grep 
>>>> out the problem values in the log to get more information about what's 
>>>> calling them.
>>>> 
>>>> I'm chasing a fairly nasty memory leak (shared memory) right now and 
>>>> thought I would document / share some of the methods we use for this type 
>>>> of thing.
>>>> 
>>>> 
>>> See:  http://www.opensips.org/Resources/DocsTsMem - try to get a dump to 
>>> see if there are leaks.
>>> 
>>> Regards,
>>> Bogdan
>>> 
>>>> Richard
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>> 
>>>> 
>>>> 
>>> -- 
>>> Bogdan-Andrei Iancu
>>> 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
>> 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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] troubleshooting memory problems

2010-05-27 Thread Richard Revels
I got an error when starting up with only qm_malloc enabled.  Was planning to 
mention that a little later.  Yeah, I should have gone a bit deeper to get the 
memory pointer that is alloc'd / free'd but am using this as a starting point.  
I'll go through the wiki steps over the weekend. 

opensips: ERROR:core:version_control: module compile flags mismatch for avpops  

#012core: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 
SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT

 #012module: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 
SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_QM_MALLOC, DBG_F_MALLOC, 
FAST_LOCK-ADAPTIVE_WAIT


Richard


On May 27, 2010, at 10:35 AM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
> 
> Richard Revels wrote:
>> In Makefile.defs uncomment
>> 
>> -DDBG_QM_MALLOC \
>> -DDBG_F_MALLOC \
>> 
> use only  DDBG_QM_MALLOC !!
>> In script set 
>> 
>> debug=6
>> memlog=6
>> 
>> 
>> Restart and let run for a while.  Then 
>> 
>> cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | sed 
>> -e 's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: \(.*\)/\1-malloc/' | 
>> sort | uniq -c
>> 
>> Adjust path for wherever you are logging of course.  Your output will have 
>> something like 
>> 
>>   3015 parse_contact(81)-malloc
>>   3015 parse_contact(81)-mfree
>>   3015 parse_contacts(192)-malloc
>>   3015 parse_contacts(192)-mfree
>>  19592 parse_from_header(63)-malloc
>>  19592 parse_from_header(63)-mfree
>> 335368 parse_headers(309)-malloc
>> 335368 parse_headers(309)-mfree
>> 
>> for all the calls that are fine.  Then something like 
>> 
>>  14922 do_parse_rr_body(65)-malloc
>>   8989 do_parse_rr_body(65)-mfree
>> 
>> or 
>> 
>>   9016 sip_msg_cloner(437)-malloc
>>   6003 sip_msg_cloner(437)-mfree
>> 
> That is not relevant as a mem block can be allocated in function X and 
> freed in function Y, so you cannot correlate the numbers.
>> 
>> for calls that need further looking into.  You'll probably want to go grep 
>> out the problem values in the log to get more information about what's 
>> calling them.
>> 
>> I'm chasing a fairly nasty memory leak (shared memory) right now and thought 
>> I would document / share some of the methods we use for this type of thing.
>> 
> 
> See:  http://www.opensips.org/Resources/DocsTsMem - try to get a dump to 
> see if there are leaks.
> 
> Regards,
> Bogdan
>> Richard
>> 
>> 
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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


[OpenSIPS-Users] troubleshooting memory problems

2010-05-26 Thread Richard Revels
In Makefile.defs uncomment

 -DDBG_QM_MALLOC \
 -DDBG_F_MALLOC \

In script set 

debug=6
memlog=6


Restart and let run for a while.  Then 

cat /var/log/opensips-msg | egrep 'freeing|DBG:core:fm_malloc.*called' | sed -e 
's/.*free.*\: \(.*\)/\1-mfree/' -e 's/.*malloc.*\: \(.*\)/\1-malloc/' | sort | 
uniq -c

Adjust path for wherever you are logging of course.  Your output will have 
something like 

   3015 parse_contact(81)-malloc
   3015 parse_contact(81)-mfree
   3015 parse_contacts(192)-malloc
   3015 parse_contacts(192)-mfree
  19592 parse_from_header(63)-malloc
  19592 parse_from_header(63)-mfree
 335368 parse_headers(309)-malloc
 335368 parse_headers(309)-mfree

for all the calls that are fine.  Then something like 

  14922 do_parse_rr_body(65)-malloc
   8989 do_parse_rr_body(65)-mfree

or 

   9016 sip_msg_cloner(437)-malloc
   6003 sip_msg_cloner(437)-mfree


for calls that need further looking into.  You'll probably want to go grep out 
the problem values in the log to get more information about what's calling them.

I'm chasing a fairly nasty memory leak (shared memory) right now and thought I 
would document / share some of the methods we use for this type of thing.

Richard



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


Re: [OpenSIPS-Users] Codec translation

2010-05-20 Thread Richard Revels
If all you have is user one, user two, and opensips, you will never have to 
worry about this because the call will not set up unless the two endpoints can 
settle on a codec they both support.  No transcoding needed.

Richard

On May 20, 2010, at 6:06 AM, samoh wrote:

> 
> Hi everyone,
> 
> How can I do the translation of audio codec betwen the users ? 
> 
> Example:
> 
> User1 <> OPENSIPS <---> User2
> G711  G711 <-> G729  G729
> 
> Best regards.
> Sam.
> -- 
> View this message in context: 
> http://opensips-open-sip-server.1449251.n2.nabble.com/Codec-translation-tp5078977p5078977.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


Re: [OpenSIPS-Users] Dialog destroys when answering call!!

2010-05-10 Thread Richard Revels
Sorry.  Should have wondered what the avp is set to when the dialog is created 
rather than when it is destroyed.


On May 10, 2010, at 12:33 PM, Richard Revels wrote:

> I wonder what the timeout_avp is set to when the dialog goes away?  Not to 
> get off topic, but if anyone knows, can that avp be modified via opensipsctl? 
>  Been meaning to investigate this question and keep forgetting.
> 
> Richard
> 
> 
> On May 10, 2010, at 9:17 AM, Neo Anderson wrote:
> 
>> Hello Bogdan,
>> 
>> Yes when opensips gets 200 OK & then send ACK back to the Callee, that time 
>> dialog destroys.
>> When making call, I am executing opensipsctl fifo dlg_list .
>> Till receiving 200 OK I can see the dialog but when sending ACK dialog 
>> destroys. Also I found Status 5 in dialog list.
>> Please let me know if anything I did wrong in configurations.
>> 
>> dialog module configurations:
>> modparam("dialog", "dlg_flag", 10)
>> modparam("dialog", "dlg_match_mode", 1)
>> modparam("dialog", "profiles_with_value", "caller")
>> modparam("dialog", "default_timeout", 43200)
>> modparam("dialog", "timeout_avp", "$avp(i:100)")
>> 
>> Thanks.
>> 
>> --
>> Neo
>> 
>> 
>> 
>> 
>> From: Bogdan-Andrei Iancu 
>> To: OpenSIPS users mailling list 
>> Sent: Mon, May 10, 2010 6:20:55 PM
>> Subject: Re: [OpenSIPS-Users] Dialog destroys when answering call!!
>> 
>> Hi Neo,
>> 
>> you are saying the dialogs (in dialog module) are destroyed when they 
>> are answered (200 ok ) ? what makes you say that? I mean what do you see 
>> to confirm this?
>> 
>> Regards,
>> Bogdan
>> 
>> Neo Anderson wrote:
>> > Hi,
>> >
>> > I am using OpenSIPS 1.5.3 .
>> > I have implemented call-limit based on the tutorial.
>> >
>> > http://www.opensips.org/Resources/DocsTutConcurrentCalls 
>> > <http://www.opensips.org/Resources/DocsTutConcurrentCalls>
>> >
>> > But when call gets answered, dialog destroys. That's why call limit is 
>> > not working.
>> > Would you please let me know what I am doing wrong?
>> > I have followed the same instructions given in the tutorial.
>> > I am using carrier-route module to route outbound calls.
>> >
>> > Thanks in advance!!!
>> >
>> > --
>> > Neo
>> >
>> > 
>> >
>> > ___
>> > Users mailing list
>> > Users@lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >  
>> 
>> 
>> -- 
>> Bogdan-Andrei Iancu
>> 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
> 

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


Re: [OpenSIPS-Users] Dialog destroys when answering call!!

2010-05-10 Thread Richard Revels
I wonder what the timeout_avp is set to when the dialog goes away?  Not to get 
off topic, but if anyone knows, can that avp be modified via opensipsctl?  Been 
meaning to investigate this question and keep forgetting.

Richard


On May 10, 2010, at 9:17 AM, Neo Anderson wrote:

> Hello Bogdan,
> 
> Yes when opensips gets 200 OK & then send ACK back to the Callee, that time 
> dialog destroys.
> When making call, I am executing opensipsctl fifo dlg_list .
> Till receiving 200 OK I can see the dialog but when sending ACK dialog 
> destroys. Also I found Status 5 in dialog list.
> Please let me know if anything I did wrong in configurations.
> 
> dialog module configurations:
> modparam("dialog", "dlg_flag", 10)
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "profiles_with_value", "caller")
> modparam("dialog", "default_timeout", 43200)
> modparam("dialog", "timeout_avp", "$avp(i:100)")
> 
> Thanks.
> 
> --
> Neo
> 
> 
> 
> 
> From: Bogdan-Andrei Iancu 
> To: OpenSIPS users mailling list 
> Sent: Mon, May 10, 2010 6:20:55 PM
> Subject: Re: [OpenSIPS-Users] Dialog destroys when answering call!!
> 
> Hi Neo,
> 
> you are saying the dialogs (in dialog module) are destroyed when they 
> are answered (200 ok ) ? what makes you say that? I mean what do you see 
> to confirm this?
> 
> Regards,
> Bogdan
> 
> Neo Anderson wrote:
> > Hi,
> >
> > I am using OpenSIPS 1.5.3 .
> > I have implemented call-limit based on the tutorial.
> >
> > http://www.opensips.org/Resources/DocsTutConcurrentCalls 
> > 
> >
> > But when call gets answered, dialog destroys. That's why call limit is 
> > not working.
> > Would you please let me know what I am doing wrong?
> > I have followed the same instructions given in the tutorial.
> > I am using carrier-route module to route outbound calls.
> >
> > Thanks in advance!!!
> >
> > --
> > Neo
> >
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >  
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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

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


Re: [OpenSIPS-Users] dialog module

2010-05-03 Thread Richard Revels
There are several parts of the config where this type of problem can be checked 
and caught.  An easy one, provided you aren't running an asterisk on the same 
IP that talks to opensips or something, is this source ip and request domain 
check

if( $si == $rd )
{   
xlog("L_INFO", "Rejecting message that seems to be looping\n");
sl_send_reply( "483", "Something wrong in SIP Message - created 
loop" );
return(0);
}

Another thing to check in CANCEL and ACK handling is can message be routed 
somewhere from the message headers or is it part of an existing transaction

if( (!loose_route()) && (!t_check_trans()) )
{
if (isflagset(1))
xlog("L_INFO", "not forwarding $rm with 
debug turned on for $ci \n");
return(0);
}

If you have these and still have a problem it's going to require a lot more 
information about your config and some ngrep traces to nail down.  For me 
anyway.  Someone else might have some more thoughts just from past experience.

Richard

On May 3, 2010, at 9:40 AM, wüber wrote:

> 
> Hello Richard,
> 
> I've configured my system as you suggested and now going on with my setup
> and application, I have a similar problem with the CANCEL message.
> If a make a call and, before answering the call, I close it from the caller
> side, sending a CANCEL message, I get lots of CANCEL packets and ACK packets
> and again the message that the size is too big!
> One of these CANCEL and ACK packets (the same I can see with wireshark) are
> between the server and the end user, the other (that  do not see with
> wireshark) are inside the Opensips server!
> 
> How I can solve this problem?
> Thanks in advance.
> 
> Carmelo
> -- 
> View this message in context: 
> http://opensips-open-sip-server.1449251.n2.nabble.com/dialog-module-tp4967644p4997814.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
> 
> ___
> 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] Trunking Calls Onward

2010-05-01 Thread Richard Revels
Pretty sure I must be missing something here but when you do the 
alias_db_lookup, the destination host and port will already be set to whatever 
you set the domain column to in the dbaliases table.  Just call t_relay() and 
it goes.

As Adrian mentioned, there are a ba-zillion ways to do this.  You might look at 
the drouting module if a one-to-one lookup is not what you are after.  Also, 
you mention you send some extra headers to asterisk to let it determine where 
to send the call.  I'm going to assume by that point you already know the IP 
and port you want to send to so why not just do $rd=IPTOSENDTO; 
$rp=PORTTOSENDTO; ?  These will accept AVP's as arguments.

http://www.opensips.org/Resources/DocsCoreVar16#toc56

http://www.opensips.org/Resources/DocsCoreVar16#toc61


Richard


On May 1, 2010, at 5:10 AM, Mike O'Connor wrote:

> Hi Adrian
> 
> I've tried a good number of them, the only method I've been able to
> working is to send the calls to Asterisk at a static locations using
> sethostport.
> 
> There does not seem to be a function which can rewrite the destination
> host/port from with in the opensips config file using a call like this.
> sethostport($avp(s:calltrunk));
> Maybe there is but I've been reading the docs for a while now and can
> not find one.
> 
> I currently use alias_db_lookup to find a local service number then a
> avp_db_load to find if the call should be forwarded. I then test and
> then forward the call to Asterisk with some extra headers which tell
> asterisk where to send the call.
> 
> There just has to be a simpler way.
> 
> Thanks for you time
> Mike
> 
> 
> 
> On 1/05/10 6:28 PM, Adrian Georgescu wrote:
>> Mike,
>> 
>> There are infinite ways to do what you asked for. My suggestion is  
>> just one of them.
>> 
>> Adrian
>> 
>> 
>> On May 1, 2010, at 10:54 AM, Mike O'Connor wrote:
>> 
>> 
>>> So there is no way for me to read from a db and rewrite the sip host  
>>> and
>>> port ?
>>> 
>>> Mike
>>> 
>>> On 1/05/10 4:35 PM, Adrian Georgescu wrote:
>>> 
 You could use ENUM to translate SIP URIs to a particular outside peer
 and use trusted peers table to match incoming calls.
 
 Then you only need to add ENUM numbers in your DNS database and  
 trusted
 peers in your proxy database, no need to configure much in OpenSIPS
 beside doing ENUM lookup and checking the trusted table.
 
 
 On Sat, 2010-05-01 at 16:28 +0930, Mike O'Connor wrote:
 
 
> Hi All
> 
> I have a need to forward calls onward for a range of DID's, but the
> other end is not going to Register. I think this is called trunking.
> 
> I need to be able to configure the DID's and the ip/port there  
> being on
> forwarded too.
> What methods should I use to do this ?
> 
> I've look at a number of options but the issue is that for the  
> functions
> like 'seturi' do not allow variables only static strings.
> 
> Thanks
> Mike
> 
> ___
> 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
>> 
> 
> 
> ___
> 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] [RFC] OpenSIPS 2.0 - changes on the SIP messages

2010-04-28 Thread Richard Revels
Being able to make changes on a branch and have those changes disappear when 
the branch does is very handy.

So far, the issue of not being able to change a header in script because it had 
already been changed in a function call hasn't been a major issue for me 
either.  I wonder if the example given in another email of needing to add a tag 
after calling fix_natted_contact couldn't be resolved by changing the 
fix_natted_contact function to accept a tag parameter.

Fast is good.  At least in this context.

Richard

On Apr 28, 2010, at 1:45 PM, Bogdan-Andrei Iancu wrote:

> Hi Brett,
> 
> Thanks for the feedback - one of the goals of my email was to see how 
> "serious" and "spreading" is the issue with changes being applied at the 
> end. If the users do actually see here no problem, fine with me :)
> 
> Best regards,
> Bogdan
> 
> Brett Nemeroff wrote:
>>> From a user's perspective...
>> I can clearly see the need to pull information from the original 
>> message as well as the "processed, unsent message". I'm aware of this 
>> issue, but I've never ran into an issue where it's really been a 
>> problem. Typically, these issues are resolved by instead of using 
>> something like message headers, using previously set AVPs in the 
>> script. Maybe my assumption is from my lack of running into the 
>> problem, but I *think* it can be resolved by smart scriptwriting...
>> 
>> I don't know a whole lot about how the message is processed under the 
>> hood, but.. from a user perspective, I'd rather change my 
>> scriptwriting to handle these issues (assuming there is a way to 
>> mitigate the issue) than make an architectural change that would 
>> overall impair performance and scalability.
>> 
>> -Brett
>> 
>> 
>> On Wed, Apr 28, 2010 at 5:40 AM, Bogdan-Andrei Iancu 
>> mailto:bog...@voice-system.ro>> wrote:
>> 
>>Hi,
>> 
>>sorry for crossposting, but I thing this topic is interesting both for
>>users (as experience) and for developers (as solution).
>> 
>>So, right now the code for 2.0 got to a stage were we need to "apply"
>>changes on the received messages (like adding VIA headers, changing
>>headers, etc). And before starting the work on this area, I would like
>>to get some opinions on the available options:
>> 
>>   1) keep the current mechanism for changing the SIP messages by
>>using
>>lumps that are applied only when the message is sent out :
>>  Advantages: code is there and works; the mechanism is very
>>fast ;
>>no need to re-parse the message after the parsing
>>  Disadvantages : from script or code, you are not able to see the
>>previous changes you did on the message, like:
>>if you remove a hdr, it will be marked to be removed,
>>but you will still see it there after the removed
>>if you add a new hdr, you will not be able to see it
>>(it will be actually added only when the message will be sent out)
>>if you replace the contact hdr (like after
>>fix_nated_contact() ) will not see the new contact, but the old one
>>trying to apply 2 changes in the same area (like
>>changing twice the contact) will result in bogus result.
>> 
>>   2) find a new approach that will allow to push in realtime the
>>changes on messages
>>  Advantages: the change will take affect instantly, so all the
>>disadvantages from 1) (as user experience in operating opensips) will
>>disappear .
>>  Disadvantages : the code will probably be slower (the changes
>>part), but will speed up other parts of the code (where you need to
>>manually identify the prev changes);
>>changed parts of the SIP message will require re-parsing
>>(so the code will have to check the state of a header (if parsed
>>or not)
>>before each usage)
>>you will not be able to undo changes on the SIP
>>messages in
>>an easy way (for example during the parallel and serial forking on
>>per-branch changes)
>> 
>>So this is the dilemma: if the current mechanism (with applying
>>changes
>>at the end) such a bad user experience (scripting) in order to try for
>>2.0 a different approach ?
>> 
>>I would like to hear some opinions from both people writing
>>scripts and
>>people writing code.
>> 
>>Thanks and regards,
>>Bogdan
>> 
>>--
>>Bogdan-Andrei Iancu
>>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] dialog module

2010-04-27 Thread Richard Revels
This comment from the opensips mailing list archive may help with the 
redundancy setup.

> 2) Set ip_nonlocal_bind via sysctl, which will allow you to bind to an
> interface even if it's not available on that host. You can have a hot
> standby host this way (on the virtual address), because it will start
> getting messages as soon as you update the routing. Just bind to the
> address you want instead of 0.0.0.0.

And the message size is probably the result of via headers being added as the 
messages loop.  Are you capturing on the loopback interface as well?

Richard


On Apr 27, 2010, at 11:10 AM, Bogdan-Andrei Iancu wrote:

> Hi Carmelo,
> 
> Carmelo D wrote:
>> Hi all,
>> 
>> I'm working with the dialog module, and  have a problem with it.
>> If I bind Opensips on the physical address it works fine, but if I
>> bind it on the 0.0.0.0 address (I use it for redundancy purpose), it
>> doesn't work fine.
>> 
> Opensips does not support binding on 0.0.0.0 - it has to know from the 
> beginning the exact set of interfaces.
>> In particular I get a message that the ACK and the BYE messages are
>> too big (bigger than 2048 byte), but actually with wireshark I can see
>> that they have a size of about 500 byte!
>> 
> UDP ?
> 
> Regards,
> Bogdan
>> any idea on how can I solve this problem?
>> 
>> Thanks in advance.
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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] Some Guidance

2010-04-17 Thread Richard Revels
xlog( "L_INFO", "The from name $fn and the modified from name 
$(fn{s.select,1,\"})");


On Apr 17, 2010, at 2:30 PM, Douglas Lane wrote:

> Hi Richard,
> 
> Big thanks, been playing around with the dialplan module - really rocks.
> 
> Just a question though, I'm using $fn to check the CLID, however, $fn has 
> double-quotes encasing it. Is there a way that I can strip the double quotes 
> from $fn (I'll copy it to an AVP first obviously) before passing it to 
> dp_translate, otherwise, it doesn't match my regexes.
> 
> Thanks
> Doug
> 
> On 2010/04/16 10:00 PM, Richard Revels wrote:
>> 
>> dialplan module
>> 
>> On Apr 16, 2010, at 3:46 PM, Douglas Lane wrote:
>> 
>>> Hi Guys,
>>> 
>>> Firstly, big thanks for assisting me with the username and raelm issue I 
>>> was having - seems to have worked itself out nicely.
>>> 
>>> I'm looking for some guidance on how to do the following the "right" way:
>>> 
>>> We currently have some wholesale clients signed up with us now, and they 
>>> have a few 1000 numbers in their assigned number ranges. We'd like to 
>>> transit their CLID, but I really don't want to troll through my 
>>> usr_preferences to pull 1000 CLID, and then identify which number they're 
>>> sending and checking to see if it exists.
>>> 
>>> I was thinking of loading a range of sorts using a regex, like 1800777 
>>> which would be a 1 number range. Then when the client sends us their 
>>> CLID in the display name section of the From header, say 18007775566, we 
>>> could check against the  portion using a regex, and if it returns true, 
>>> we accept the CLID and instruct the C4 to present the CLID. If not, we 
>>> return a SIP error saying "Invalid CLID" or something like that.
>>> 
>>> I'm open to suggestions here, what I need to achieve is the following:
>>> Don't want to load 1 numbers at a time into my usr_preferences 
>>> database, as this could get very big
>>> Need a way to check that the CLID we've loaded is checked against the 
>>> display name in the From header
>>> Check must be quick to ensure we don't kill opensips doing 1000's of db 
>>> queries
>>> I look forward to the assistance.
>>> 
>>> Thanks
>>> Doug
>>> 
>>> ___
>>> 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] Some Guidance

2010-04-16 Thread Richard Revels
dialplan module

On Apr 16, 2010, at 3:46 PM, Douglas Lane wrote:

> Hi Guys,
> 
> Firstly, big thanks for assisting me with the username and raelm issue I was 
> having - seems to have worked itself out nicely.
> 
> I'm looking for some guidance on how to do the following the "right" way:
> 
> We currently have some wholesale clients signed up with us now, and they have 
> a few 1000 numbers in their assigned number ranges. We'd like to transit 
> their CLID, but I really don't want to troll through my usr_preferences to 
> pull 1000 CLID, and then identify which number they're sending and checking 
> to see if it exists.
> 
> I was thinking of loading a range of sorts using a regex, like 1800777 
> which would be a 1 number range. Then when the client sends us their CLID 
> in the display name section of the From header, say 18007775566, we could 
> check against the  portion using a regex, and if it returns true, we 
> accept the CLID and instruct the C4 to present the CLID. If not, we return a 
> SIP error saying "Invalid CLID" or something like that.
> 
> I'm open to suggestions here, what I need to achieve is the following:
> Don't want to load 1 numbers at a time into my usr_preferences database, 
> as this could get very big
> Need a way to check that the CLID we've loaded is checked against the display 
> name in the From header
> Check must be quick to ensure we don't kill opensips doing 1000's of db 
> queries
> I look forward to the assistance.
> 
> Thanks
> Doug
> 
> ___
> 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] Strange username registration

2010-04-08 Thread Richard Revels
I think if you don't populate the ha1b column in the subscriber table it would 
also solve this problem by not passing the auth check.  Depending on how you 
populate the table this may be done outside your control in which case you 
could use the password_column_2 modparam and set it to a column like ha1 
(rather than ha1b) and it would also always fail if the username auth field 
also contained the domain.

Richard

On Apr 7, 2010, at 3:22 PM, Douglas Lane wrote:

> Hi Brett,
> 
> Big thanks for all the assistance. I'll work on some patches tonight to 
> the route logic, and let you all know in the morning.
> 
> Thanks
> Doug
> 
> Brett Nemeroff wrote:
>> Bah
>> I think I spoke to quick the auth id does have the domain in it..
>> 
>> I think something is buggy here really It shouldn't be authenticating
>> like that. For a temp fix I'd just use the textopts mod to reject auth
>> ids with invalid characters. I'm interested in how this gets
>> resolved..
>> 
>> Maybe you can do something like
>> $avp(s:authname) = $(Au{uri.user}) + $ar
>> 
>> or this would be userful too:
>> $avp(s:username) = $(Au{uri.user})
>> 
>> Or something similar.. BTW, there seems to be some discrepancy in the
>> docs over "$ar"
>> 
>> Let us know what works. :)
>> -Brett
>> 
>> 
>> On Wed, Apr 7, 2010 at 2:04 PM, Douglas Lane  wrote:
>> 
>>> Hi Brett,
>>> 
>>> Auth is definately being done on the INVITE as well, but once again,
>>> this succeeds even though it has another @domain part.
>>> 
>>> I know it all looks right, the problem is, OpenSIPS is even storing the
>>> location data as username [at] domain [dot] com [at] domain [dot] com.
>>> And I can't rely on using the Auth ID for billing as a lot of other
>>> correctly configured clients are using
>>> 
>>> Digest username="doug",realm="domain.com".
>>> 
>>> I guess I'd have to put the two vars together, $au and $ar (or $ad) and
>>> then if $au contains a domain name, just to strip it off or something?
>>> 
>>> As requested, trace follows:
>>> 
>>> IP: 1.2.3.4 is the client
>>> IP: 5.6.7.8 is the OpenSIPS proxy
>>> 
>>> T 1.2.3.4:62689 -> 5.6.7.8:5060 [AP]
>>> INVITE sip:18005556...@domain.com SIP/2.0.
>>> Via: SIP/2.0/TCP
>>> 1.2.3.4:24022;branch=z9hG4bK-d8754z-552d4b70ed34a43e-1---d8754z-;rport.
>>> Max-Forwards: 70.
>>> Contact: .
>>> To: .
>>> From: ;tag=1b164627.
>>> Call-ID: YzdjMGRjNDNhODNiMWE1MTMzYjY0ZDJkMDNmNWE5MGU..
>>> CSeq: 1 INVITE.
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>> SUBSCRIBE, INFO.
>>> Content-Type: application/sdp.
>>> User-Agent: X-Lite Beta release 4.0 v3 stamp 55153.
>>> Content-Length: 188.
>>> .
>>> v=0.
>>> o=- 7 2 IN IP4 192.168.0.113.
>>> s=CounterPath X-Lite 4.0.
>>> c=IN IP4 1.2.3.4.
>>> t=0 0.
>>> m=audio 58262 RTP/AVP 0 8 3 101.
>>> a=sendrecv.
>>> a=rtpmap:101 telephone-event/8000.
>>> a=fmtp:101 0-15.
>>> 
>>> #
>>> T 5.6.7.8:5060 -> 1.2.3.4:62689 [AP]
>>> SIP/2.0 100 Trying.
>>> Via: SIP/2.0/TCP
>>> 1.2.3.4:24022;branch=z9hG4bK-d8754z-552d4b70ed34a43e-1---d8754z-;rport=62689.
>>> To: .
>>> From: ;tag=1b164627.
>>> Call-ID: YzdjMGRjNDNhODNiMWE1MTMzYjY0ZDJkMDNmNWE5MGU..
>>> CSeq: 1 INVITE.
>>> Server: OpenSIPS (1.6.1-tls (x86_64/linux)).
>>> Content-Length: 0.
>>> .
>>> 
>>> #
>>> T 5.6.7.8:5060 -> 1.2.3.4:62689 [AP]
>>> SIP/2.0 407 Proxy Authentication Required.
>>> Via: SIP/2.0/TCP
>>> 1.2.3.4:24022;branch=z9hG4bK-d8754z-552d4b70ed34a43e-1---d8754z-;rport=62689.
>>> To: ;tag=cdff758d742c799b04c91123cd1608d5.fdd1.
>>> From: ;tag=1b164627.
>>> Call-ID: YzdjMGRjNDNhODNiMWE1MTMzYjY0ZDJkMDNmNWE5MGU..
>>> CSeq: 1 INVITE.
>>> Proxy-Authenticate: Digest realm="domain.com",
>>> nonce="4bbcd61d0a1268c6ccae9b032af3204121ac0623b648".
>>> Server: OpenSIPS (1.6.1-tls (x86_64/linux)).
>>> Content-Length: 0.
>>> .
>>> 
>>> ###
>>> T 1.2.3.4:62689 -> 5.6.7.8:5060 [AP]
>>> ACK sip:18005556...@domain.com SIP/2.0.
>>> Via: SIP/2.0/TCP
>>> 1.2.3.4:24022;branch=z9hG4bK-d8754z-552d4b70ed34a43e-1---d8754z-;rport.
>>> Max-Forwards: 70.
>>> To: ;tag=cdff758d742c799b04c91123cd1608d5.fdd1.
>>> From: ;tag=1b164627.
>>> Call-ID: YzdjMGRjNDNhODNiMWE1MTMzYjY0ZDJkMDNmNWE5MGU..
>>> CSeq: 1 ACK.
>>> Content-Length: 0.
>>> .
>>> 
>>> ##
>>> T 1.2.3.4:62689 -> 5.6.7.8:5060 [AP]
>>> INVITE sip:18005556...@domain.com SIP/2.0.
>>> Via: SIP/2.0/TCP
>>> 1.2.3.4:24022;branch=z9hG4bK-d8754z-a5ba7a6914ca1e45-1---d8754z-;rport.
>>> Max-Forwards: 70.
>>> Contact: .
>>> To: .
>>> From: ;tag=1b164627.
>>> Call-ID: YzdjMGRjNDNhODNiMWE1MTMzYjY0ZDJkMDNmNWE5MGU..
>>> CSeq: 2 INVITE.
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>> SUBSCRIBE, INFO.
>>> Content-Type: application/sdp.
>>> Proxy-Authorization: Digest
>>> username="d...@domain.com",realm="domain.com",nonce="4bbcd61d0a1268c6ccae9b032af3204121ac0623b648",uri="sip:18005556...@domain.com",response="2a7d0482c71d07180af31548fc344904",algorithm=MD5.
>>> User-Agent: X-Lite Beta release 4.0 v3 stamp 55153.
>>> Content-Length: 188.
>>> .
>>> v=0.
>>> o=- 7 2 IN IP4 192.168.

Re: [OpenSIPS-Users] mediaproxy

2010-04-05 Thread Richard Revels
Thank you Marco.  Looking at some of the version numbers from the faq I noticed 
the distribution ctypes was a little behind.  So adding easy_install ctypes to 
the process below results in a functional media-proxy and dispatcher.  Kinda.  
Also add easy_install twisted for the relay.

Richard

On Apr 5, 2010, at 3:28 PM, Marco Nesler wrote:

> http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm
> 
> 2010/4/5 Richard Revels 
> Here is the process I used with an up to date CentOS 5.4 server
> 
> wget http://download.ag-projects.com/MediaProxy/mediaproxy-2.4.2.tar.gz
> tar -xzf mediaproxy-2.4.2.tar.gz
> cd mediaproxy-2.4.2
> yum install python-tools.x86_64 python-twisted-core.x86_64 
> python-zope-interface.x86_64 python.x86_64 python-ctypes.x86_64
> easy_install -U setuptools
> easy_install 
> http://pypi.python.org/packages/source/p/python-application/python-application-1.1.5.tar.gz
> easy_install python-cjson
> cd ../
> wget http://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.8.6.tar.bz2
> bunzip2 gnutls-2.8.6.tar.bz2
> tar -xf gnutls-2.8.6.tar
> cd gnutls-2.8.6
> yum install libgcrypt
> ./configure
> make install
> cd ../mediaproxy-2.4.2
> easy_install python-gnutls==1.1.8
> yum install libnetfilter_conntrack-devel.x86_64
> ./build_inplace
> 
> 
> And unfortunately, here is the latest error I am getting when trying to run 
> the media-dispatcher:
> 
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Log opened.
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Starting MediaProxy Dispatcher 
> 2.4.2
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Twisted is using selectreactor
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: fatal error: failed to create 
> MediaProxy Dispatcher: Objects/dictobject.c:533: bad argument to internal 
> function
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Traceback (most recent call 
> last):
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: ---  ---
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File "./media-dispatcher", 
> line 62, in ?
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: dispatcher = Dispatcher()
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "/usr/local/src/mediaproxy-2.4.2/mediaproxy/dispatcher.py", line 527, in 
> __init__
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: self.cred = 
> X509Credentials(cert_name='dispatcher')
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 132, in __init__
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: 
> twisted.X509Credentials.__init__(self, self.X509cert, self.X509key, 
> [self.X509ca], [self.X509crl])
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 99, in __get__
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: return descriptor.get()
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 82, in get
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: self.object = 
> self.klass(f.read())
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File "", line 1, in 
> __init__
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "build/bdist.linux-x86_64/egg/gnutls/validators.py", line 273, in check_args
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "build/bdist.linux-x86_64/egg/gnutls/crypto.py", line 83, in __init__
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
> "/usr/lib64/python2.4/site-packages/ctypes/__init__.py", line 453, in cast
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: return _cast(obj, obj, typ)
> Apr  5 18:32:31 ip-30 media-dispatcher[22909]: exceptions.SystemError: 
> Objects/dictobject.c:533: bad argument to internal function
> 
> Any guidance you can give to resolve this (outside of "stop using Cent") 
> would be appreciated.
> 
> Richard
> 
> 
> On Mar 23, 2010, at 4:02 AM, Saúl Ibarra Corretgé wrote:
> 
> > Hi,
> >
> > On 22/3/10 8:40 PM, Julien Chavanton wrote:
> >> Hi, I have some problem with installing / running mediaproxy on FC7
> >> I have also tried mediaproxy-2.4.2, but then I revert to the latest
> >> working version I have deployed
> >> /usr/bin/media-relay --no-fork
> >> Starting MediaProxy Relay 2.3.6
> >> Segmentation fault
> >> I would like to install in on Debian, but I need to make it work on FC7
> >> or CentOS5
> >> I can s

Re: [OpenSIPS-Users] mediaproxy

2010-04-05 Thread Richard Revels
Here is the process I used with an up to date CentOS 5.4 server

wget http://download.ag-projects.com/MediaProxy/mediaproxy-2.4.2.tar.gz
tar -xzf mediaproxy-2.4.2.tar.gz 
cd mediaproxy-2.4.2
yum install python-tools.x86_64 python-twisted-core.x86_64 
python-zope-interface.x86_64 python.x86_64 python-ctypes.x86_64
easy_install -U setuptools
easy_install 
http://pypi.python.org/packages/source/p/python-application/python-application-1.1.5.tar.gz
easy_install python-cjson
cd ../
wget http://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.8.6.tar.bz2
bunzip2 gnutls-2.8.6.tar.bz2 
tar -xf gnutls-2.8.6.tar 
cd gnutls-2.8.6
yum install libgcrypt
./configure
make install
cd ../mediaproxy-2.4.2
easy_install python-gnutls==1.1.8
yum install libnetfilter_conntrack-devel.x86_64
./build_inplace 


And unfortunately, here is the latest error I am getting when trying to run the 
media-dispatcher:

Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Log opened.
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Starting MediaProxy Dispatcher 
2.4.2
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Twisted is using selectreactor
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: fatal error: failed to create 
MediaProxy Dispatcher: Objects/dictobject.c:533: bad argument to internal 
function
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: Traceback (most recent call 
last):
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: ---  ---
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File "./media-dispatcher", 
line 62, in ?
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: dispatcher = Dispatcher()
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"/usr/local/src/mediaproxy-2.4.2/mediaproxy/dispatcher.py", line 527, in 
__init__
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: self.cred = 
X509Credentials(cert_name='dispatcher')
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 132, in __init__
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: 
twisted.X509Credentials.__init__(self, self.X509cert, self.X509key, 
[self.X509ca], [self.X509crl])
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 99, in __get__
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: return descriptor.get()
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"/usr/local/src/mediaproxy-2.4.2/mediaproxy/tls.py", line 82, in get
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: self.object = 
self.klass(f.read())
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File "", line 1, in 
__init__
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: 
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"build/bdist.linux-x86_64/egg/gnutls/validators.py", line 273, in check_args
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: 
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"build/bdist.linux-x86_64/egg/gnutls/crypto.py", line 83, in __init__
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: 
Apr  5 18:32:31 ip-30 media-dispatcher[22909]:   File 
"/usr/lib64/python2.4/site-packages/ctypes/__init__.py", line 453, in cast
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: return _cast(obj, obj, typ)
Apr  5 18:32:31 ip-30 media-dispatcher[22909]: exceptions.SystemError: 
Objects/dictobject.c:533: bad argument to internal function

Any guidance you can give to resolve this (outside of "stop using Cent") would 
be appreciated.

Richard


On Mar 23, 2010, at 4:02 AM, Saúl Ibarra Corretgé wrote:

> Hi,
> 
> On 22/3/10 8:40 PM, Julien Chavanton wrote:
>> Hi, I have some problem with installing / running mediaproxy on FC7
>> I have also tried mediaproxy-2.4.2, but then I revert to the latest
>> working version I have deployed
>> /usr/bin/media-relay --no-fork
>> Starting MediaProxy Relay 2.3.6
>> Segmentation fault
>> I would like to install in on Debian, but I need to make it work on FC7
>> or CentOS5
>> I can see the problem, is there a suggested way to debug ?
>> -
>> try:
>> from mediaproxy.relay import MediaRelay
>> if not options.fork:
>> from application.debug.memory import *
>> relay = MediaRelay()
>> except Exception, e:
>> log.fatal("failed to create %s: %s" % (fullname, e))
>> if e.__class__ is not RuntimeError:
>> log.err()
>> sys.exit(1)
>> 
> 
> There seems to be a compatibility issue with latest python-application 
> and/or python-gnutls. I'll fix that as soon as I can, but in the 
> meanwhile you may use python-application 1.1.5 and python-gnutls 1.1.8 
> which are known to work.
> 
> If you find any other issues please let me know.
> 
> 
> Thanks for your report!
> 
> 
> Regards,
> 
> -- 
> Saúl Ibarra Corretgé
> AG Projects
> 
> ___
> 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.opensi

Re: [OpenSIPS-Users] Could I use mysql lines in opensips.cfg?

2010-04-02 Thread Richard Revels
or alias_db is designed exactly to handle looking up a username. if found you 
have side benefit of having the request uri set for next hop.

On Apr 2, 2010, at 5:18 AM, Bogdan-Andrei Iancu wrote:

> or for any kind of mysql query, you may use the "avp_db_query" function 
> from avpops module:
>http://www.opensips.org/html/docs/modules/1.6.x/avpops.html#id271033
> 
> Regards,
> Bogdan
> 
> Brett Nemeroff wrote:
>> I personally would probably end up storing the users into memcache and
>> checking against that.
>> 
>> the userblacklist module might also do what you need..
>> http://www.opensips.org/html/docs/modules/1.6.x/userblacklist.html#id227282
>> 
>> 
>> On Fri, Apr 2, 2010 at 12:15 AM, CheeWii  wrote:
>> 
>>> Hi,
>>>I use Opensips as an SMS gateway. Now I need to check all message's
>>> username firstly. If the username is in my mysql database,thus it belong to
>>> the white name-list,then I realy it normally.If not ,I will drop it
>>> directlly.
>>>   So I think I should exec some some mysql commands to check the usename.
>>> How can I accomplish it?
>>>   Thanks a lot:)
>>> 
>>> CheeWii
>>> 
>>> ___
>>> 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
> 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] from tag in b2bua

2010-03-31 Thread Richard Revels
Yes please.  It's a bit of a problem.

Richard

On Mar 31, 2010, at 1:39 PM, Anca Vamanu wrote:

> Hi Richard,
> 
> Now the from tag is constructed by concatenating the callid and the from 
> tag of the received Invite. The callid is probably the one containing 
> '@'. If there are clients that reject this kind of tags, I could take 
> this character out.
> 
> Regards,
> 
> -- 
> Anca Vamanu
> www.voice-system.ro
> 
> 
> Richard Revels wrote:
>> I started looking at B2BUA top hiding again last night.  The from tag on the 
>> outbound side is being built from something (don't remember what) on the 
>> original Invite that contains an @ symbol and domain.  Can this be changed?  
>> I am finding quite a few UAs that don't like having that symbol in a tag on 
>> the from header.
>> 
>> Richard
>> 
>> 
>> ___
>> 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


[OpenSIPS-Users] from tag in b2bua

2010-03-31 Thread Richard Revels
I started looking at B2BUA top hiding again last night.  The from tag on the 
outbound side is being built from something (don't remember what) on the 
original Invite that contains an @ symbol and domain.  Can this be changed?  I 
am finding quite a few UAs that don't like having that symbol in a tag on the 
from header.

Richard


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


Re: [OpenSIPS-Users] Access to statistics variables from within script

2010-03-04 Thread Richard Revels
Good to remember.  Thank you.  I normally spend tons of time thinking about how 
and why I'm accessing the database and file system and no time thinking about 
how I'm manipulating variables in script.  

While we are on this subject, I've always wondered about something, but not 
enough to test it out.  I had to modify the snippet below quite a bit before 
sending it due to the fact that I use m4 and let it convert strings to integer 
named avp's.  One of the primary reasons I started using m4 was the warning in 
the docs about the speed difference of manipulating avp's with string names vs 
avp's with integer names and how using aliases on the avp's was a better idea.  
Do you know if any comparisons were ever done to quantify that difference?  I'm 
wondering if the difference between reading, then modifying 1000 avp's using 
string vs integer would be like 10 milliseconds vs 1 second or 10 milliseconds 
vs 100 milliseconds.

Like I say, this was never a big enough concern to make me test it out but if 
you know then I would like to know.  : >

Richard
 
On Mar 4, 2010, at 6:45 AM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
> 
> 1 important comment here - the global vars are something more powerful 
> than statistic vars. And of course, they come with more penalties. 
> Operating with the global vars requires internal locking (over the 
> variable) - this may lead to a general slowdown of opensips as all the 
> procs will keep syncronizing over the lock for the this vars. The stat 
> vars are using atomic ops (internally) and they do not require locking.
> 
> just my 2 cents on this,
> Bogdan
> 
> Richard Revels wrote:
>> Most likely this is where Bogdan is headed but, if you only want to 
>> increment and reset some variables in the script there are global vars 
>> available to do that with.  cfgutils module.
>> 
>> #first a var that is shared across all processes
>> modparam("cfgutils", "shvset", "didtracker=i:0")
>> 
>> #now one that will be unique to each process thread
>> modparam("cfgutils", "varset", "threadtracker=s:0")
>> 
>> Then in the script to, say, randomly select a from user:
>> 
>>$avp(s:newfromheader) = $hdr(From);
>>$avp(s:holder)=$shv(didtracker);
>>$shv(didtracker)=$shv(didtracker) + 1;
>>if( $shv(didtracker) == 5 )
>>$shv(didtracker)=0;
>>$avp(s:offset)= 5 - $(avp(s:holder){s.len});
>>
>> $var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) + 
>> $avp(s:holder);
>>if( dp_translate("42", "$var(matchup)/$var(matchup)") )
>>{
>>$avp(s:newfromheader) = "sip:" + $var(matchup) + "@" 
>> + $fd;  #this could change again for oli tag or something so
>>setflag(FLAG_CHANGED_FROMHEADER);   #use flag to 
>> insure we only change from header once in t_relay route  
>>}
>> 
>> 
>> Richard
>> 
>> On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote:
>> 
>> 
>>> On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote:
>>> 
>>> 
>>>> Hi Pawel,
>>>> 
>>>> for read, the stats vars are available only via the MI interface (the 
>>>> get_statistics function).
>>>> 
>>>> do you want to read the stats from the statistics module only, or all of 
>>>> them?
>>>> 
>>> Nah, only the ones defined in my script/statistics module and log/print 
>>> them and reset them in a timer route.
>>> 
>>> Pawel,___
>>> 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
> 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] Access to statistics variables from within script

2010-03-04 Thread Richard Revels
Or you could do this too.  : >


On Mar 4, 2010, at 5:48 AM, Bogdan-Andrei Iancu wrote:

> Paweł,
> 
> this can be simpler done with an external script that runs on cron and 
> periodically fetch the stats you need (via opensipsctl fifo 
> get_statistics), dump the values somewhere and resets them (via 
> opensipsctl fifo reset_statistics - 
> http://www.opensips.org/Resources/DocsCoreMi16#toc11).
> 
> The idea is to keep non-sip processing outside opensips - let opensips 
> to its job with the SIP stuff and do other apps to take care of the side 
> jobs (like CDRs, stats, etc).
> 
> Do you think this will work for you ?
> 
> Regards,
> Bogdan
> 
> Paweł Pierścionek wrote:
>> On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote:
>> 
>> 
>>> Hi Pawel,
>>> 
>>> for read, the stats vars are available only via the MI interface (the 
>>> get_statistics function).
>>> 
>>> do you want to read the stats from the statistics module only, or all of 
>>> them?
>>> 
>> 
>> Nah, only the ones defined in my script/statistics module and log/print them 
>> and reset them in a timer route.
>> 
>> Pawel,
>> 
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
> 
> 
> -- 
> Bogdan-Andrei Iancu
> 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] Access to statistics variables from within script

2010-03-04 Thread Richard Revels
Most likely this is where Bogdan is headed but, if you only want to increment 
and reset some variables in the script there are global vars available to do 
that with.  cfgutils module.

#first a var that is shared across all processes
modparam("cfgutils", "shvset", "didtracker=i:0")

#now one that will be unique to each process thread
modparam("cfgutils", "varset", "threadtracker=s:0")

Then in the script to, say, randomly select a from user:

$avp(s:newfromheader) = $hdr(From);
$avp(s:holder)=$shv(didtracker);
$shv(didtracker)=$shv(didtracker) + 1;
if( $shv(didtracker) == 5 )
$shv(didtracker)=0;
$avp(s:offset)= 5 - $(avp(s:holder){s.len});
$var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) 
+ $avp(s:holder);
if( dp_translate("42", "$var(matchup)/$var(matchup)") )
{
$avp(s:newfromheader) = "sip:" + $var(matchup) + "@" + 
$fd;  #this could change again for oli tag or something so
setflag(FLAG_CHANGED_FROMHEADER);   #use flag to insure 
we only change from header once in t_relay route  
}


Richard

On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote:

> 
> On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote:
> 
>> Hi Pawel,
>> 
>> for read, the stats vars are available only via the MI interface (the 
>> get_statistics function).
>> 
>> do you want to read the stats from the statistics module only, or all of 
>> them?
> 
> Nah, only the ones defined in my script/statistics module and log/print them 
> and reset them in a timer route.
> 
> Pawel,___
> 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] media proxy - B2BUA(signaling only)

2010-01-21 Thread Richard Revels
I'm having a problem that I think is the same as this discussion.  When a call 
from a natted user comes in to my opensips proxy, my config does auth and then 
immediately fires up the nat ping and media proxy ( engage-mediaproxy() ) to 
provide far end nat traversal.  Now I'm trying to add top hiding from b2bua and 
when the INVITE comes from b2bua back to opensips, the sdp has values from the 
original invite rather than the mediaproxy IP and port.

I suspect that engaging the media proxy on the way out of the proxy rather than 
on the inbound side will resolve this, although I haven't tried that yet.  
However, this doesn't seem like expected behavior from the b2bua so I thought I 
would chime in here.

Richard

Iñaki, making new friends i see. : > 
 

On Jan 20, 2010, at 3:37 PM, Julien Chavanton wrote:

> 
> Hi Bogdan,
> I have found this logic that is working (tested), I think it will not create 
> problem as it is not possible for a new INVITE to already have the 
> media-proxy IP if is not already passing trought the proxy once.
> 
> 
> 
> #---> Force media proxy
> if(is_present_hf("Media-Proxy")){
>xlog("L_NOTICE", "***MEDIA PROXY FOUND [on another call leg]\n***");
> }
> else{
>if(search_body("c=IN IP4 1.1.1.1") && method == "INVITE"){
>#---> Tag the call, not to engage media proxy
>append_hf("Media-Proxy: engaged\r\n");
>}
>else{
>$avp(s:media_relay) = "1.1.1.1";
>use_media_proxy();
>}
> }
> 
> 
> 
> 
> From: users-boun...@lists.opensips.org on behalf of Bogdan-Andrei Iancu
> Sent: Wed 20/01/2010 5:58 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] media proxy - B2BUA(signaling only)
> 
> 
> 
> Hi Julien,
> 
> Just a wild guess - maybe the mediaproxy does not work as you may invoke
> it (request and reply) for different calls (for request on UA_A call and
> for reply on UA_B calls) - afaik, both mediaproxy and rtpproxy use the
> callid in order to bridge the request and reply SDP portsBut because
> of B2BUA, you actually have 2 calls.
> 
> So, be sure you do both media setup steps on the same call (only on one
> side of the B2BUA).
> 
> Regards,
> Bogdan
> 
> Julien Chavanton wrote:
>> Humm, this does not work, as when the "200 OK" comes back from UA_B
>> there is a need to set media proxy and a second session is set on the
>> media proxy.
>> Any suggestion on how to handle this senario ?
>> 
>> 
>> 
>> *From:* users-boun...@lists.opensips.org on behalf of Julien Chavanton
>> *Sent:* Tue 19/01/2010 8:55 PM
>> *To:* OpenSIPS users mailling list; Users@lists.opensips.org
>> *Subject:* Re: [OpenSIPS-Users] media proxy - B2BUA(signaling only)
>> 
>> 
>> I found what was going on more in details, when the second call comes
>> in the RTP port is set as the correct one from the first call,
>> however, I issue another use_media_proxy() and a new port is set, I
>> guess I could ignore the use media proxy this time by validating if
>> the IP of the media proxy is already in SDP "m=audio x.x.x.x", I will
>> try this
>> 
>> Opensip_A --invite--> B2B_UA
>> m=audio 52542 RTP/AVP 18 8 0
>> 
>> B2B_UA --invite--> Opensip_A
>> m=audio 52542 RTP/AVP 18 8 0
>> 
>> (use media proxy)
>> 
>> Opensip_A --invite--> UA_B
>> m=audio 50506 RTP/AVP 18 8 0
>> 
>> 
>> 
>> *From:* users-boun...@lists.opensips.org on behalf of Julien Chavanton
>> *Sent:* Tue 19/01/2010 6:43 PM
>> *To:* Users@lists.opensips.org
>> *Subject:* [OpenSIPS-Users] media proxy - B2BUA(signaling only)
>> 
>> Hi,
>> 
>> I have this senario :
>> 
>> UA_A --> Opensip_A --> SIP_B2BUA(signaling only) --> Opensip_A --> UA_B
>> 
>> this result is 2 calls(different callid) on Opensip_A however UA_A and
>> UA_B are connecting the the MediaProxy on 2 differents calls and the
>> audio is not bridged between them.
>> 
>> It there a way the make the media proxy aware about the fact that the
>> 2 calls should be bridged ?
>> 
>> 
>> 
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
> 
> 
> --
> Bogdan-Andrei Iancu
> 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


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


Re: [OpenSIPS-Users] need help on mediaproxy that cannot start

2010-01-11 Thread Richard Revels
My bad.  Got an error running the Dispatcher and downgraded sqlobject.  Later, 
when I realized the issue was that I didn't have a postgres module installed I 
never went back and updated my notes or tried running with the newer sqlobject.

 
On Jan 9, 2010, at 10:41 AM, Dan Pascu wrote:

> 
> On 8 Jan 2010, at 22:17, Richard Revels wrote:
> 
>> I've been meaning to come back to this.  I'll try to get something  
>> coherent together this weekend for CentOS users.  The process  
>> outlined at the link below is somewhat overkill as most of the  
>> python stuff can be done via easy_install with just a couple tweaks  
>> to the readme.  The gnutls must be compiled and installed from  
>> source but a standard ./configure; make; make install is all that is  
>> needed there as well.
>> 
>> I had a problem with asking for specific versions of both sqlobject  
>> and python-application because easy_install is not able to find them  
>> wherever it looks by default.  This is a drag since it worked fine  
>> for sqlobject just a couple of weeks ago.  Here are the command  
>> lines I am using to get around that:
>> 
>> #get recent version of setup tools
>> easy_install -U setuptools
>> 
>> #let easy_install download and install from svn for specific version  
>> (notice space between url and package identifier)
>> easy_install http://svn.colorstudy.com/SQLObject/tags/0.9.0/  
>> sqlobject==0.9.0
> 
> Why do you need sqlobject==0.9.0? I'm running with 0.11.0 just fine  
> and I expect it to run with 0.12.0 as well as there were no changes in  
> it to affect the code.
> 
> --
> Dan
> 
> 
> 
> 
> ___
> 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] need help on mediaproxy that cannot start

2010-01-08 Thread Richard Revels
I've been meaning to come back to this.  I'll try to get something coherent 
together this weekend for CentOS users.  The process outlined at the link below 
is somewhat overkill as most of the python stuff can be done via easy_install 
with just a couple tweaks to the readme.  The gnutls must be compiled and 
installed from source but a standard ./configure; make; make install is all 
that is needed there as well.

I had a problem with asking for specific versions of both sqlobject and 
python-application because easy_install is not able to find them wherever it 
looks by default.  This is a drag since it worked fine for sqlobject just a 
couple of weeks ago.  Here are the command lines I am using to get around that:

#get recent version of setup tools
easy_install -U setuptools

#let easy_install download and install from svn for specific version (notice 
space between url and package identifier)
easy_install http://svn.colorstudy.com/SQLObject/tags/0.9.0/ sqlobject==0.9.0

#let easy_install directly from zipped tar file
easy_install 
http://pypi.python.org/packages/source/p/python-application/python-application-1.1.5.tar.gz

I hope this helps some CentOS users out there until I can get the whole thing 
documented somewhere.

Richard

On Jan 8, 2010, at 10:22 AM, Dan Pascu wrote:

> Either use python2.5 or use python-application-1.1.5. python- 
> application-1.2.x depends on python2.5, however mediaproxy doesn't  
> require python-application-1.2.x to work, so it can work just fine  
> with python2.4 if you use python-application-1.1.5
> 
> On 8 Jan 2010, at 05:59, ha do wrote:
> 
>> Hi all
>> 
>> 
>> i follow the instruction : 
>> http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm
>> 
>> my centos version:
>> [r...@centos-cucku application]# uname -a
>> Linux CentOS-Cucku 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST  
>> 2009 i686 i686 i386 GNU/Linux
>> 
>> i get the error when start the mediaproxy on Centos :
>> [r...@centos-cucku application]# /usr/bin/media-dispatcher
>> Traceback (most recent call last):
>>  File "/usr/bin/media-dispatcher", line 12, in ?
>>from application.process import process, ProcessError
>>  File "/usr/lib/python2.4/site-packages/application/process.py",  
>> line 12, in ?
>>from application import log
>>  File "/usr/lib/python2.4/site-packages/application/log/ 
>> __init__.py", line 12, in ?
>>from application.log.extensions import twisted
>>  File "/usr/lib/python2.4/site-packages/application/log/extensions/ 
>> twisted/__init__.py", line 4
>>from __future__ import absolute_import
>> SyntaxError: future feature absolute_import is not defined
>> 
>> 
>> please help
>> 
>> thank you
>> Ha`
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> --
> Dan
> 
> 
> 
> 
> ___
> 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] Media-dispatcher

2010-01-04 Thread Richard Revels
Interesting.  I think you may have mentioned this before Dan but I didn't catch 
it for some reason.  That makes installing media proxy on CentOS / RHEL 5.x 
easier.  I've found that creating an RPM to install python 2.5 (along with the 
2.4 rather than upgrading it) and then using the virtualenv package to use it 
in a sandbox for non-distribution applications made things a lot easier too.

So, looking at the INSTALL file it seems that the two changes needed would be
 
easy_install python-application<1.2.0
and
easy_install sqlobject==0.9

I'll try that out this afternoon.  Will that <1.2.0 work for easy_install or do 
I need to go find a specific version that I want to use?

Richard

On Jan 3, 2010, at 8:53 AM, Dan Pascu wrote:

> 
> On 31 Dec 2009, at 10:52, Chandrakant Solanki wrote:
> 
>> 
>> Hello
>> 
>> I have installed media-proxy 2.3.8 using 
>> http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm
>> 
>> But when i start media-dispatcher/media-relay it gives following error
>> 
>> [r...@users ~]# media-dispatcher
>> Traceback (most recent call last):
>>  File "/usr/bin/media-dispatcher", line 12, in ?
>>from application.process import process, ProcessError
>>  File "build/bdist.linux-i686/egg/application/process.py", line 12,  
>> in ?
>>  File "build/bdist.linux-i686/egg/application/log/__init__.py",  
>> line 12, in ?
>>  File "/usr/lib/python2.4/site-packages/python_application-1.2.1- 
>> py2.4.egg/application/log/extensions/twisted/__init__.py", line 4
>> SyntaxError: future feature absolute_import is not defined
> 
> Either use python2.5 or use a python-application package < 1.2.0
> 
> 
> --
> Dan
> 
> 
> 
> 
> ___
> 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] unix domain MI

2009-09-26 Thread Richard Revels
Thank you for looking into this.  Didn't mean to cause anyone work on  
the weekend.  I'll update from SVN tonight or tomorrow.


Richard Revels


On Sep 26, 2009, at 1:56 PM, Bogdan-Andrei Iancu wrote:

> Hi Richard,
>
> I found some bug related to flushing (of output MI tree) when using  
> the
> Datagram backend.
>
> Please update from SVN (1.5 branch) and try again (or see rev #6191).
>
> Thanks and regards,
> Bogdan
>
> Richard Revels wrote:
>> I'm using unix domain socket for MI on opensips-1.5.2 and am getting
>> an error when trying to do opensipsctl ul show.  Is this something
>> that was fixed in a newer version?
>>
>> Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:
>> ERROR:mi_datagram:mi_datagram_flush_tree: failed to write - reason  
>> too
>> long!
>> Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:
>> ERROR:mi_datagram:mi_datagram_flush_tree: failed to write - reason  
>> too
>> long!
>> Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:
>> ERROR:mi_datagram:datagram_recur_write_tree: failed to write -line  
>> too
>> long!!!
>> Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:
>> ERROR:mi_datagram:mi_datagram_server: failed to build the response
>>
>> Richard Revels
>>
>>
>>
>>
>> ___
>> 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


[OpenSIPS-Users] unix domain MI

2009-09-25 Thread Richard Revels
I'm using unix domain socket for MI on opensips-1.5.2 and am getting  
an error when trying to do opensipsctl ul show.  Is this something  
that was fixed in a newer version?

Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:  
ERROR:mi_datagram:mi_datagram_flush_tree: failed to write - reason too  
long!
Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:  
ERROR:mi_datagram:mi_datagram_flush_tree: failed to write - reason too  
long!
Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:  
ERROR:mi_datagram:datagram_recur_write_tree: failed to write -line too  
long!!!
Sep 25 19:36:21 wtrunking /usr/local/opensips/sbin/opensips[10316]:  
ERROR:mi_datagram:mi_datagram_server: failed to build the response

Richard Revels




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


Re: [OpenSIPS-Users] Fw: Re: [NEW]memcached implementation for memory caching

2009-07-15 Thread Richard Revels
I'm thinking of the case where I have multiple proxies that an account  
can send to and I want to do concurrency counts across them.  Doesn't  
need to be a reliable data store.  Just need to be able to update a  
value here and be able to read it there.


This module puts ya'll real close to the top of my "pretty cool  
people" list.  Thank you.



Richard Revels

On Jul 15, 2009, at 2:01 PM, Brett Nemeroff wrote:

I think it's worth re-iterating that memcache is NOT meant to be a  
reliable data store and you should essentially build your  
applications assuming the data will NOT be available. Doing some  
reading on memcache is very worthwhile for proper use of this  
fantastic capability. The use of OpenSIPs using memcache doesn't  
really change any of the underlying design principals.




On Wed, Jul 15, 2009 at 12:14 PM, andrei dragus > wrote:




 Hi, Richard.

 Yes.

 As long as the server (ip and port) is the same, keys are
 visible from all opensips distribution accessing that
 cache.

 Careful! In some cases this may be unwanted behavior.

 Also if you use a group of servers you don't have complete
 control over which keys go on which servers, but if you use
 the same groups on all opensips servers it is guaranteed
 that they are distributed in the same way, so again they are
 visible from all servers.

 Andrei.

 --- On Wed, 7/15/09, Richard Revels 
 wrote:


 > Andrei,
 >
 > I'll read the documentation shortly but I wonder if
 you
 > could give me
 > a quick booster here.  Does this module allow for
 two
 > or more opensips
 > proxies to access the same memory cached data on the
 > distributed cache?
 >
 > Richard Revels
 >
 >





___
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] [NEW]memcached implementation for memory caching

2009-07-15 Thread Richard Revels
Andrei,

I'll read the documentation shortly but I wonder if you could give me  
a quick booster here.  Does this module allow for two or more opensips  
proxies to access the same memory cached data on the distributed cache?

Richard Revels


On Jul 15, 2009, at 9:57 AM, andrei dragus wrote:

>
>
> Hello,
>
> A new module that provides a new caching method using memcached  
> servers was added.
> It provides a way to access memcached servers using the existing  
> memcache API.
>
> Advantages over the existing "localcache" module:
>   - memory costs are no longer on the server
>   - many servers may be used so the memory is virtually unlimited
>   - the cache is persistent so a restart of the server will not  
> affect the cache
>   - memcached is an open-source project so it can be used to exchange  
> data with various other applications
>   - servers may be grouped together (e.g. for security purposes :  
> some can be inside a private network, some can be in a public one).
>   
> Limitations:
>   - keys (in key:value pairs) may not contain spaces or control  
> characters
>   
> Requirements:
>   - libmemcahed is a dependency of the module ( see docs)
>   - memcached servers must exist somewhere accessible via the network.
>   
> Usage:
>   - memcached module must be loaded
>   - server parameters must be set
>   E.g:
>   
>   ...
>   modparam("memcached", "server","group1 = localhost:,127.0.0.1" );
>   modparam("memcached", "server","y = random_url:" );
>   ...
>   This creates two groups of servers( one called "group1" and one  
> called "y").
>   
>   
>   - Calls to the two groups will be done via the memcache API by  
> passing the first parameter as "memcached_($GROUP_NAME)".
>   E.g:
>   
>   ...
>   cache_store("memcached_group1","key","$ru value");
>   ...
>   This stores "key"="$ru value" on the group denoted by "group1".
>   The key is only stored on one of the servers in a consistent  
> fashion   (subsequent calls with "key" will be stored, deleted from  
> the same server).
>   
>   
>   ...
>   cache_fetch("memcached_y","key",$avp(i:10));
>   cache_remove("memcached_y","key");
>   ...
>   This attempts to fetch/remove key from the group named "y".
>   
> Thanks, Andrei.
>   
>   
>
>
>
>
> ___
> 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] Mediaproxyand trancoding

2009-07-03 Thread Richard Revels

What's your budget?


http://www.ditechnetworks.com/products/packet-voice-processor.html


Richard Revels


On Jul 3, 2009, at 11:33 AM, Brett Nemeroff wrote:

I too am curious about this.. High volume transcoding.. something  
that ISNT asterisk. :)


-Brett


On Fri, Jul 3, 2009 at 10:05 AM, Julien Chavanton  
 wrote:

Thanks, I understand this is out of scope for Opensips,
I am going to test a transcoding board full of DSP with an on board  
NIC to handle our transcoding requirement.

I was just currious to find out what other options people are using ?

Julien
From: Adrian Georgescu [mailto:a...@ag-projects.com]
Sent: Thu 02/07/2009 11:30 PM
To: Julien Chavanton
Cc: Users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Mediaproxyand trancoding

Julien,

If you use media proxy you actually let the end-points negotiate the  
codec, MediaProxy is transparent and does not get involved at code  
level. A transcoder would be just one of the endpoints. So you can  
use any transcoder you want (like an SBC with transcoding  
capabilities), if an endpoint transcodes the fact that you use  
MediaProxy to get to it is not irrelevant.


Adrian

On Jul 2, 2009, at 6:41 PM, Julien Chavanton wrote:


Hi,

 When using Opensips with Mediaproxy, what transcoding solution is  
mostly used by Opensips users, anyone as recommendations /  
suggestions ?

___
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] media dispatcher startup fails

2009-07-03 Thread Richard Revels
First off, thank you for your help.  It loads now and I imagine it  
will run just fine as well.

I couldn't find a "easy_uninstall" to get rid of the 0.10.6 version so  
I pulled 0.9.5 from svn and ran the python setup.py install command.   
Since both versions are now sitting in the site-packages directory I  
really wasn't expecting the dispatcher to load without further work.   
But it did so I'm happy.  Do I need to get rid of the 0.10.6 version  
and if so what is the method of going about that?

Richard Revels


On Jul 3, 2009, at 10:00 AM, Ruud Klaver wrote:

> Hi,
>
> On 03 Jul 2009, at 15:30, Richard Revels wrote:
>
>> After googling around a little for self.dbEncoding I've decided I
>> don't have a chance of finding a solution for this on my own.  Any
>> help would be appreciated.
>>
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Log opened.
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: warning:
>> startSyslog is being deprecated and will be removed in 1.2.0. Use the
>> start_syslog function instead.
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Starting
>> MediaProxy Dispatcher 2.3.4
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Twisted is using
>> selectreactor
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: fatal error:
>> failed to create MediaProxy Dispatcher: unicode() argument 2 must be
>> string, not None
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Traceback (most
>> recent call last):
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: --- > caught here> ---
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "./media-
>> dispatcher", line 56, in ?
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: dispatcher =
>> Dispatcher()
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/
>> local/src/mediaproxy-2.3.4/mediaproxy/dispatcher.py", line 523, in
>> __init__
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:
>> self.accounting = [__import__("mediaproxy.interfaces.accounting.%s" %
>> mod.lower(), globals(), locals(), [""]).Accounting() for mod in
>> set(Config.accounting)]
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/
>> local/src/mediaproxy-2.3.4/mediaproxy/interfaces/accounting/
>> database.py", line 53, in ?
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:
>> MediaSessions.createTable(ifNotExists=True)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/ 
>> main.py",
>> line 1393, in createTable
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: if
>> ifNotExists and cls.tableExists(connection=conn):
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/ 
>> main.py",
>> line 1367, in tableExists
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: return
>> conn.tableExists(cls.sqlmeta.table)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/mysql/
>> mysqlconnection.py", line 203, in tableExists
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:
>> self.query('DESCRIBE %s' % (tableName))
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/
>> dbconnection.py", line 347, in query
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: return
>> self._runWithConnection(self._query, s)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/
>> dbconnection.py", line 260, in _runWithConnection
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: val =
>> meth(conn, *args)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/
>> dbconnection.py", line 344, in _query
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:
>> self._executeRetry(conn, conn.cursor(), s)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
>> lib/
>> python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/mysql/
>> mysqlconnection.py", line 103, in _executeRetry
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: query =
>> unicode(query, self.dbEncoding)
>> Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:
>> exceptions.TypeError: unicode() argument 2 must be string, not None
>>
>> Richard Revels
>
> Looks like a SQLObject issue, could you try if downgrading to a 0.9  
> version helps?
>
> Ruud Klaver
> AG Projects
>


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


[OpenSIPS-Users] media dispatcher startup fails

2009-07-03 Thread Richard Revels
After googling around a little for self.dbEncoding I've decided I  
don't have a chance of finding a solution for this on my own.  Any  
help would be appreciated.

Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Log opened.
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: warning:  
startSyslog is being deprecated and will be removed in 1.2.0. Use the  
start_syslog function instead.
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Starting  
MediaProxy Dispatcher 2.3.4
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Twisted is using  
selectreactor
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: fatal error:  
failed to create MediaProxy Dispatcher: unicode() argument 2 must be  
string, not None
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: Traceback (most  
recent call last):
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: ---  ---
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "./media- 
dispatcher", line 56, in ?
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: dispatcher =  
Dispatcher()
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
local/src/mediaproxy-2.3.4/mediaproxy/dispatcher.py", line 523, in  
__init__
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:  
self.accounting = [__import__("mediaproxy.interfaces.accounting.%s" %  
mod.lower(), globals(), locals(), [""]).Accounting() for mod in  
set(Config.accounting)]
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/ 
local/src/mediaproxy-2.3.4/mediaproxy/interfaces/accounting/ 
database.py", line 53, in ?
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:  
MediaSessions.createTable(ifNotExists=True)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/main.py",  
line 1393, in createTable
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: if  
ifNotExists and cls.tableExists(connection=conn):
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/main.py",  
line 1367, in tableExists
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: return  
conn.tableExists(cls.sqlmeta.table)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/mysql/ 
mysqlconnection.py", line 203, in tableExists
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:  
self.query('DESCRIBE %s' % (tableName))
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/ 
dbconnection.py", line 347, in query
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: return  
self._runWithConnection(self._query, s)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/ 
dbconnection.py", line 260, in _runWithConnection
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: val =  
meth(conn, *args)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/ 
dbconnection.py", line 344, in _query
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:  
self._executeRetry(conn, conn.cursor(), s)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:   File "/usr/lib/ 
python2.4/site-packages/SQLObject-0.10.6-py2.4.egg/sqlobject/mysql/ 
mysqlconnection.py", line 103, in _executeRetry
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]: query =  
unicode(query, self.dbEncoding)
Jul  3 13:03:32 opensips-hou media-dispatcher[6005]:  
exceptions.TypeError: unicode() argument 2 must be string, not None

Richard Revels




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


Re: [OpenSIPS-Users] MediaProxy call quality issues

2009-05-30 Thread Richard Revels
I expect you will find that calls per second and cpu have a lot less  
to do with media relay performance than do concurrent sessions and  
codec (in other words, packets per second).  Check out this article  
and then we can discuss tools for checking network limitations if  
needed.

http://staff.washington.edu/corey/gulp/

I would say that "ip -s link show" and "netstat -s" would be a couple  
of good ones to start with.  Also tshark captures from both sides of  
the relay on a poor audio connection of course.




On May 28, 2009, at 12:29 PM, Darren Sessions wrote:

> Hi all,
>
> Just wondering . .
>
> We've got set of relays doing on average of 17 to 19 cps. When I get
> traffic spikes my cps can hit just shy of 30 cps. When the cps gets to
> about 24 - 26 cps we start to get loads of choppy audio and in some
> cases one-way audio.
>
> No errors in any of the logs on the OpenSIPS/Dispatcher or the relays;
> 0% cpu utilization across the board. Audio at the lower volumes sounds
> superb.
>
> Taking *only* the relays out of the mix resolves the problem  
> instantly.
>
> We're using stock Ubuntu 8.04LTS with the server kernel.
>
> Any thoughts would be appreciated.
>
> Cheers,
>
>  - Darren
>
> ___
> 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] Calling engage_media_proxy per branch

2009-05-28 Thread Richard Revels
For scenario b I suspect you could just call a route from within the  
failure route and engage the media proxy there.  I know you will be  
able to make the function call without error, just never tested it to  
see if it has any undesired side effects.  Like not actually working.

Richard Revels

On May 28, 2009, at 11:27 AM, Thomas Gelf wrote:

> Hi list,
>
> I really like engage_media_proxy() as it really makes life easier.
> However, currently it is dialog-based and cannot be called in a
> branch_route. This has some side-effect:
>
> a) if a call is forked to two users, one behind NAT and one with
>   non-symmetric router and STUN or on public IP, mediaproxy is
>   always used, even if the client without NAT picks up the call.
>
> While I could live with this, a second scenario is really ugly:
>
> b) A is calling B, both with public IP. B issues a conditional
>   call forward (30x) to C, with C being behind NAT. As far as
>   I understood the module there is no way to "engage" Mediaproxy
>   in this scenario.
>
> What I would like to know is:
>
> - is there a known workaround for this issue, that I can apply
>  to my config script?
> - is it planned to change engage_media_proxy to make it "branch-
>  aware"?
> - if you can acknowledge neither of the above: do I really need
>  to tear down/re-use Mediaproxy session on each ReINVITE? What
>  is the current best practice in this case?
>
> Many thanks for your answers!
>
> Best regards,
> Thomas Gelf
>
>
> ___
> 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] remove_hf() doesn't always work

2009-03-10 Thread Richard Revels
The branch routes in the config files are simply blocks of code that  
get hit as the message leaves the door.  In your config instead of  
inserting the header in one of your routes use t_on_branch("1").  Then  
in the branch route look at the request domain and insert your header  
as needed.  The t_on_branch arms which branch gets hit so you can set  
one branch for a call going out initially and another for calls that  
go out from failure routes.  Or not.  Whatever works best.  I'm  
putting a sample below that assumes you have built the avp named cpid  
and removed any headers from the initial invite that you desire.  You  
might have to play with this a little.  For instance I can't remember  
if the module parameter is needed to insure the avp is available in  
the branch route after a failure response or not.  They can get a  
little more involved if you do parallel forking but that doesn't seem  
to be the case here.

#this might be needed
modparam("tm", "onreply_avp_mode", 1)



branch_route[1]
{
if( is_gflag("0") )
xlog("L_INFO", "In branch route 1 - request domain is $rd \n");
 switch($rd)
{
case "1.2.3.4": #carrier-1
case "5.6.7.8": #carrier-1
insert_hf("P-Charge-Info: $avp(s:cpid)\r\n", "CALL-ID");
return;
break;
case "2.3.4.5": #carrier2
case "6.7.8.9": #carrier2
append_hf("P-Asserted-Identity: <$avp(s:cpid)>\r\n");
return;
break;
default:
#dont bother with headers
}
return;
}


On Mar 7, 2009, at 3:33 PM, Jeff Pyle wrote:

> Richard,
>
> Branch routing is something I've never been able to completely wrap  
> my mind
> around.  I'm not using any branch routing in my current  
> configuration, at
> least to the best of my knowledge.  I'll read up on the different  
> types of
> routes to see if I can figure this one out.  Do you have any quick
> suggestions on how to adapt a branch-less config into something  
> where I can
> add and delete the headers I need to?
>
>
> Thanks,
> Jeff
>
>
>
>
> On 3/7/09 11:25 AM, "Richard Revels"  wrote:
>
>> Add the headers in branch routes.  Headers added in primary routing
>> can't be removed in later processing.
>


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


Re: [OpenSIPS-Users] remove_hf() doesn't always work

2009-03-07 Thread Richard Revels
Add the headers in branch routes.  Headers added in primary routing  
can't be removed in later processing.


On Mar 6, 2009, at 10:40 PM, Jeff Pyle wrote:

> Hello,
>
> I’m using serial forking to send requests to multiple PSTN  
> carriers.  Some
> of these carriers want P-Asserted-Identity/Privacy, and others want
> Remote-Party-ID.  After selecting a carrier I remove any of these  
> headers so
> I can build new ones and insert them.
>
> The insert works fine, but the remove_hf() isn’t removing the headers.
> Here’s the config:
>
> # Clear identity / privacy headers
> if (is_present_hf("Remote-Party-ID")) {
>remove_hf("Remote-Party-ID");
>xlog("L_INFO", "Removed Remote-Party-ID header\n");
> }
> if (is_present_hf("P-Asserted-Identity")) {
>remove_hf("P-Asserted-Identity");
>xlog("L_INFO", "Removed P-Asserted-Identity header\n");
> }
> if (is_present_hf("Privacy")) {
>remove_hf("Privacy");
>xlog("L_INFO", "Removed Privacy header\n");
> }
>
> Requests come into the proxy with either PAI/Privacy or RPID.  After  
> parsing
> them I remove them with the above code.  It seems some odd things  
> are going
> on.
>
> Take the following example:  A request comes into the proxy with  
> RPID.  RPID
> is detected and removed.  The first carrier requires PAI, so it is  
> built and
> inserted.  The request is related to the first carrier where it  
> arrives with
> only PAI.  So far, so good.
>
> The carrier sends a 503 into a failure_route.  The above config is  
> also in
> the failure_route, where it oddly detects an RPID.  The 503 didn't  
> have an
> RPID, nor did the INVITE before it.  Anyway, the route block is  
> called to
> prepare the next carrier.  The above config is called again in that  
> route
> block.  It also shows that it detected and removed and RPID header,  
> even
> though as far as I can tell none was present.  This second carrier  
> prefers
> RPID, so a new RPID header is constructed and inserted.  The request  
> is
> forwarded to the carrier.  When the carrier gets it, it has both an  
> RPID and
> a PAI header.
>
> It doesn't matter what the UAC sends initially to this proxy, RPID  
> or PAI,
> or which order the carriers receive the INVITEs.  The second carrier  
> always
> has both headers, and the xlogs from the above code don't seem to make
> sense.
>
> I'm at a loss on this one.  Especially since I use remove_hf() to  
> take out
> P-Charge-Info and some other custom headers after they're parsed at  
> the
> beginning of the route[0].  And that works fine.
>
>
> Thanks in advance for any insight anyone may have.
>
>  - 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] Run Server in background with maximum debug to log file

2009-01-11 Thread Richard Revels
Man Pages are your friend.  When you divert opensips messages to  
another logging file or destination you also need to stop them from  
going to the standard messages file.  Here are a couple of pertinent  
entries from a syslog-ng (gentoo) and rsyslog (CentOS) config.  The  
remote destination entries are looking for pkg_memory errors which are  
then forwarded to a syslog instance on a monitoring server.  If you  
are using something like Zenoss or Solarwinds these messages can  
trigger alerts and all that network monitoring type stuff.


syslog-ng.conf

#any message caught by filter local7 goes to file defined as openser- 
$YEAR-$MONTH
destination local7 { file( "/var/log/openser-$YEAR-$MONTH" ); };
#send pkg_memory errors to remote syslog
destination zenoss {udp("192.168.0.1" port(514));


#grab messages from opensips and keep them from also going to messages  
file.
filter local7_filter { facility( local7 ); };
filter messages_filter { not facility( local7 ); };

#grab messages dealing with memory
filter f_out_of_pkg_memory { match("out of pkg memory"); };
filter f_pkg_memory_allocation_failure { match("pkg memory allocation  
failure"); };
filter f_no_more_share_memory { match("no more share memory"); };
filter f_out_of_mem { match("out of mem"); };
filter f_no_shm_mem { match("no more shm mem"); };
filter f_no_pkg_mem { match("no more pkg mem"); };

#we've got sources, destinations, and filtered messages.  send them
log { source( src ); filter( local7_filter ); destination( local7 ); };
log { source(src); filter(f_out_of_pkg_memory); destination(zenoss); };
log { source(src); filter(f_pkg_memory_allocation_failure);  
destination(zenoss); };
log { source(src); filter(f_no_shm_mem); destination(zenoss); };
log { source(src); filter(f_no_pkg_mem); destination(zenoss); };
log { source(src); filter(f_no_more_share_memory);  
destination(zenoss); };

rsyslog is somewhat easier to deal with.

rsyslog.conf

#send lots of stuff to messages file but not local7 opensips stuff
*.info;mail.none;authpriv.none;cron.none;local7.none/var/log/ 
messages

#log opensips messages to own log
local7.*/var/log/opensips.log

#send some messages to zenoss
:msg, contains, "INFO:core:probe_max_receive_buffer"@192.168.0.1:514
:msg, contains, "pkg"   @192.168.0.1:514

It should be noted that the rsyslog default on Cent uses facility 7  
for boot messages so you will either want to change to a different  
facility in the opensips config or change rsyslog.conf  to use  
something else for boot messages.

Richard





On Jan 11, 2009, at 12:21 AM, Wasin Thiengkunagrit wrote:

> Dear  Iñaki Baz Castillo,
>
> I'm running Opensips on Ubuntu 8.10. And I've found out that the log  
> appear on
> both /var/log/syslog and /var/log/opensips. The log messages are
> almost the same.
> I think that OpenSips forwarding all log to /var/log/opensips and some
> of the duplicate messages
> to /var/log/syslog.
>
> Wasin
>
>
>
> 2009/1/11 Iñaki Baz Castillo :
>> El Domingo, 11 de Enero de 2009, Wasin Thiengkunagrit escribió:
>>> Additionally you can
>>> redirect the log result to another file (which is not syslog) by  
>>> doing
>>> this steps
>>> 1. Set the "log_facility=LOG_LOCAL7"
>>> 2. edit file /etc/syslog.conf  by adding this line to the end of the
>>> file "local7.* /var/log/opensips"
>>> 3. create the initial log file with command "$echo "" > /var/log/ 
>>> opensips"
>>> 4. restart syslog deamon with command "$/etc/init.d/sysklogd  
>>> restart"
>>> 5. restart your OpenSips again this should log every messages into
>>> /var/log/opensips file
>>
>> Those steps make OpenSIPS log appearing in /var/log/opensips, but  
>> still
>> remains appearing in /var/log/syslog, at least in Debian Etch  
>> following step
>> by step your explanation.
>>
>> This is something I've never got (logging OpenSIPS to any file but  
>> syslog).
>>
>> Regards.
>>
>> --
>> Iñaki Baz Castillo
>>
>> ___
>> 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] OpenSIPS is not running, Erorr

2009-01-10 Thread Richard Revels
Khan,

Here is a link to a pretty nice document on SIP:

http://www.tm.uka.de/itm/uploads/folien/100/MMK-05-SIP-4up.pdf

Two very good tools for looking at SIP requests and replies are tshark  
and ngrep.  On the opensips proxy try running "ngrep -q -W byline port  
5060" from the command line.

Just for the record, that rewritehostport to the asterisk server looks  
pretty wrong.  I imagine there are a multitude of other problems and I  
don't think this problem is related to the symptoms you describe but  
fixing it might be a good place to start.

rewritehostport should be of the form rewritehostport("1.2.3.4:5060");  
where 1.2.3.4 is the IP and 5060 is the port that you want the request  
URI to contain.  Unless you do some type of over-ride this will also  
be where the message gets sent, which is probably exactly what you  
want to happen.

Richard


On Dec 28, 2008, at 2:18 PM, Khan Friend wrote:

> Bogdan,
>
> The problem is that I don't know much about SIP server and VoIP.  
> This is experimental project, I studied and successfully ran simple  
> OpenSIPS server. When I try to add Asterisk or NAT Traversal, I ran  
> into many problems. One of them is this (Asterisk config), I traced  
> the log file but not much luck understanding what part needs fixing.
>
> Please help me identify the root of the problem and how to fix. How  
> do i find SIP replies, what do i do to see them and capture them.
>
>
> Thanks in advance,
>
> Khan
>
> On Sun, Dec 28, 2008 at 4:33 AM, Bogdan-Andrei Iancu  > wrote:
> Hi Khan,
>
> your OpenSIPS runs ok - what you see are runtime errors, not startup  
> errors.
>
> The errors you see are indicating processing of SIP reply messages  
> that could not be routed - they were received with only one VIA and  
> they were not matching any local transaction.
>
> Can you identify the SIP replies triggering this error?
>
> Regards,
> Bogdan
>
> Khan Friend wrote:
> Hi guys,
>
> I am trying to troubleshoot errors in my OpenSIPS config file but  
> unable to understand what am i doing wrong.
>
> The log file shows as follows:
> Dec 26 21:38:02 [22302] INFO:usrloc:ul_init_locks: locks array size  
> 512
> Dec 26 21:38:02 [22302] INFO:registrar:mod_init: initializing...
> Dec 26 21:38:02 [22302] INFO:textops:mod_init: initializing...
> Dec 26 21:38:02 [22302] INFO:avpops:avpops_init: initializing...
> Dec 26 21:38:02 [22302] INFO:auth:mod_init: initializing...
> Dec 26 21:38:02 [22302] INFO:auth_db:mod_init: initializing...
> Dec 26 21:38:02 [22302] INFO:core:probe_max_receive_buffer: using a  
> UDP receive buffer of 214 kb
> Dec 26 21:38:56 [22303] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:38:57 [22308] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:38:58 [22306] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:38:59 [22304] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:39:00 [22303] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:39:10 [22308] ERROR:core:forward_reply: no 2nd via found  
> in reply
> Dec 26 21:39:11 [22306] ERROR:core:forward_reply: no 2nd via found  
> in reply
> D
>
> -- 
>
>
> My opensips.cfg is as follows:
>
> route{
>
># initial sanity checks -- messages with
># max_forwards==0, or excessively long requests
>
>if (!mf_process_maxfwd_header("10")) {
>sl_send_reply("483","Too Many Hops");
>exit;
>};
>
>if (msg:len >=  2048 ) {
>sl_send_reply("513", "Message too big");
>exit;
>};
>
># we record-route all messages -- to make sure that
># subsequent messages will go through our proxy; that's
># particularly good if upstream and downstream entities
># use different transport protocol
>
>if (!method=="REGISTER")
>record_route();
>
># subsequent messages withing a dialog should take the
># path determined by record-routing
>
>if (loose_route()) {
># mark routing logic in request
>append_hf("P-hint: rr-enforced\r\n");
>route(1);
>};
>
>if (!uri==myself) {
># mark routing logic in request
>append_hf("P-hint: outbound\r\n");
>route(1);
>};
>
># if the request is for other domain use UsrLoc
># (in case, it does not work, use the following command
># with proper names and addresses in it)
>if (uri==myself) {
>
>if (method=="REGISTER") {
>if (!www_authorize("", "subscriber")) {
>www_challenge("", "0");
>exit;
>};
>
>save("location");
>exit;
>};
>
># requests for Media server
>if(is_method("INVITE") && !has_totag() && uri=~"sip:\*9") {
>route(3);
>exit;
>}
>
># mark transaction if user is in voicemail group
>if(is_method("INVITE") && !has_totag()
>&& is_user_in("Request-URI","voicemail"))
>{
>xdbg("user [$ru] 

Re: [OpenSIPS-Users] About OpenSIP "The New Design"

2008-11-27 Thread Richard Revels
I didn't really have any plans to comment on the wish list being  
created as everyone has their own needs.  However, since you went  
there first, here is what I believe about XML.

I don't think there is a valid reason to ever have a file on disk that  
contains XML formatted data.  XML was thought up to provide a means  
for the Porno sites to make direct transfers of credit transactions  
from their DOS based computers to the bank mainframes without dropping  
any decimals.  Since that time, no valid use has ever been found for it.

If XML is going to be used, for the transfer of data from one computer  
system to another, it should be generated on the fly and ungenerated  
before saving on the far side.  I should never be forced to view XML  
formatted data.

Richard

On Nov 26, 2008, at 9:21 PM, Iñaki Baz Castillo wrote:

> Hi, I'd like to comment some ideas I've read in:
>  http://www.opensips.org/index.php?n=Development.NewDesign
>
> ---
> 2.2  Application Layer
> - separation between low level functionalities (transport,  
> registration, SIP,
> NAT, rr+loose_route, TM, dialog, presence, etc) and high level
> functionalities (routing, authentication, accounting, checks, DB,  
> LDAP, snmp,
> etc)
> - this will allow easy creation of the high-level functionalities  
> without
> getting into low level things: if I do a routing functionality, why  
> should I
> care about NAT traversal?? -> reduces the script complexity as it  
> will focus
> mainly on service creation, rather on making SIP to work)
> -
>
> Well, while it seems good, I consider it impossible  
> (unfortunatelly). Imagine
> the following case (it's a real case):
>
> - Two gateways to deliver/receive calls to/from PTSN: gw_A and gw_B.
> - gw_A allows Comedia mode (no STUN or RTP proxy required).
> - I just want to use RTP proty when routing calls to gw_B (needed).
> - So handling with NAT depends directly on routing basis.
>
> Other example (also real):
>
> - Local users alice and bob registered behind the same NAT router  
> (same public
> IP) with no STUN configured.
> - alice calls bob, the proxy detects that both are behind same NAT  
> router so
> allow direct RTP (no use of RTP proxy).
> - Now bob also registers from a device with public IP.
> - alice calls bob again (parallel forking now).
> - The branch with public IP needs RTP proxy since alice is behind NAT.
> - So handling NAT depends directly on each branch routing.
>
> Sincerelly I consider unfeasible a cool separation between low level  
> and high
> level functionalities. SIP, NAT and company is too complex to allow  
> an "easy"
> configuration splitted in abstract layers.
>
>
>
> I also read:
>
> --
> 2.1  Scripting
>
> - replace the custom scripting language with existing high level  
> programing
> languages (perl, php, python, JAVA, etc)
> - more than one type of language to be used
> --
>
> Really? can you imagin debugging a OpenSIPS script written in *any*  
> language?
>
>
> --
> - no special scripting skills will be required (as using common known
> languages)
> --
>
> ¿?¿? If you need to match a regular expression you need "some"  
> scripting
> skills. The same if you need to do a "case", "if"...
>
>
> --
> - using existing languages, the scripting become more powerful as it  
> has
> access to all libs for DB, variables, arrays, string ops, etc.
> --
>
> How would be the performance if OpenSIPS must run PHP/Python/Ruby  
> code for
> each message?
> Also there are cool functions in OpenSIPS modules, for
> example "loose_route()". Would you imagine implementing that funcion  
> in
> each "possible" high level language?
>
>
> --
> - Replace current scripting with XML
> ---
>
> Ahhh !
>
>
>
>
> Just my 2 cents, opinions? Regards.
>
>
>
> -- 
> Iñaki Baz Castillo
>
> ___
> 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] define variable problem

2008-11-16 Thread Richard Revels
I'm guessing modparam is inside a route and shouldn't be or assignment  
is outside a route and shouldn't be.

Sent from my iPhone

On Nov 16, 2008, at 6:26 AM, "chamo" <[EMAIL PROTECTED]> wrote:

>
> Nov 16 12:17:07 [49967] CRITICAL:core:yyerror: parse error in config
> file, line 166, column 7-16: syntax error
> Nov 16 12:17:07 [49967] CRITICAL:core:yyerror: parse error in config
> file, line 166, column 17-18: unknown config variable
> Nov 16 12:17:07 [49967] CRITICAL:core:yyerror: parse error in config
> file, line 167, column 1-9:
>
> line 166: $avp(s:a) = $fu + "@" + $fd;
> line 167: modparam("acc", "radius_extra", "User-Name=$avp(s:a);
> Called-Station-Id=$tu; Calling-Station-Id=$fu;
> Sip-Translated-Request-URI=$ru")
>
> i have also loaded module avpops.so
>
> it looks like in my build variables are not supported, do i need  
> compile
> it any special way ?
>
> Norman Brandinger  wrote / napísal(a):
>> Try using an AVP instead of a VAR:
>>
>> $avp(s:a) = $fu + "@" + $fd;
>>
>> modparam("acc", "radius_extra", "User-Name=$avp(s:a); ...")
>>
>> Regards,
>> Norm
>>
>> chamo wrote:
>>> hello i have silly question
>>>
>>> where could be problem here with this variable
>>> $var(a) = $fU + "@" + $fd;   #without ; is result same
>>> modparam("acc", "radius_extra", "User-Name=$var(a);
>>> Called-Station-Id=$tu; Calling-Station-Id=$fu;
>>> Sip-Translated-Request-URI=$ru")
>>>
>>> i am getting errors
>>>
>>> Nov 14 13:27:12 [14080] CRITICAL:core:yyerror: parse error in config
>>> file, line 165, column 7-14: syntax error
>>> Nov 14 13:27:12 [14080] CRITICAL:core:yyerror: parse error in config
>>> file, line 165, column 15-16: unknown config variable
>>> Nov 14 13:27:12 [14080] CRITICAL:core:yyerror: parse error in config
>>> file, line 167, column 1-9:
>>>
>>> thank you
>>>
>>> Regards
>>>
>>> Chamo
>>>
>>>
>>> ___
>>> 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