Re: [OpenSIPS-Users] high-availability - senario

2010-01-26 Thread Nigel Daniels
have you considerd using keepalived with vrrp instead ?

On Tue, Jan 26, 2010 at 7:03 AM, Julien Chavanton wrote:

>  I am configuring high-availability with heart-beat + LVS + ldirector
>
> I do not want to load balance but mostly make sure it will fail over
> quickly, I have found situation where the in LVS (UDP/TCP) connection never
> timeout when the remote IP send periodic OPTIONS request for example.
>
> I beleive I will have to set very low UDP/TCP time-out, however  with such
> a low time-out I can not load-balance so I will use weighted
> Round-Robin with very high priority 65535 on the active one and weith 1 on
> the passive server.
>
> Any other suggested way to cluster without load-balancing ?
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
Nigel Daniels
Network & Systems Administrator
ConnectAndSell inc.
(650)-533-2542
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Private IP in registered AOR causing failure

2010-01-26 Thread opensipslist

Hello Bogdan and Anca,

An mar., janv 26, 2010, Bogdan-Andrei Iancu schrieb:
>Just consulted with Anca (she is the presence guru) and 2 questions
>for you:
>
Thanks to Anca very much for such good work with the presence
modules. I'm excited to be able to use them correctly (thus my
troubleshooting and questions.)

>1) the BLA part is sending the SUBSCRIBEs based on user location
>and it is using the "received" field if present, so it should be
>ok. Unless you set in the bla module the "outbound" param - this
>will override the received info.
>
I know that at least some part of the BLA logic or presence logic
is indeed using the 'received' field, because OpenSIPS is sending
to the correct UAS 1/2 the time. It is equially clear that some
other part of BLA or presence is ignoring the 'received' field.
For each UAS which registers tcpdump shows two SUBSCRIBE messages.
One with the 'received' IP and one with the private IP.

My module parameters for presence and BLA are:

modparam("presence", "server_address", "sip:p...@name.host.tld")
modparam("presence_xml", "force_active", 1)
modparam("pua_bla", "server_address", "sip:p...@name.host.tld")
modparam("pua_bla", "default_domain", "name.host.tld")
modparam("pua_bla", "header_name", "Sender")

...so I'm not setting the 'outbound' parameter it seems, right?

I'm using:

  Solaris 11 x86 (nv-b91)
  OpenSIPS 1.6.0 with TLS

>2) the subscribe you posted - as you captured it, I supposed it
>exists on network. But I see that the transport in TLS (so TCP
>based), but how come you see the message if opensips is not able to
>open the TCP conn to the private IP..
>
Good question, but I showed you just how I was capturing traffic
to the private IP. You probably missed it, so here it is again:

>> After running a socket listener on 192.168.0.31 on the OpenSIPS host:
>>
>>$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr -
>>SUBSCRIBE sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm 
>> SIP/2.0
>>Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0
>>To: ;tag=ty6sjh9iz9
>>From: ;tag=6c9d4319c74d756e6b696-baa1
>>CSeq: 11 SUBSCRIBE
>>Call-ID: b1c04118-8...@86.90.39.44
>>Content-Length: 0
>>User-Agent: OpenSIPS (1.6.1-tls)
>>Max-Forwards: 70
>>Event: dialog;sla
>>Contact: 
>>Expires: 610
>>
It's plain old TCP/IP networking. First do a ifconfig to create
a virtual interface with IP 192.168.0.31, then set a static route,
and finally run software to listen on the TCP socket on the address.
This works as long as I do it on the same machine that OpenSIPS (the
presence modules) are running on.

Any ideas?

Thanks,
Brian

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


[OpenSIPS-Users] high-availability - senario

2010-01-26 Thread Julien Chavanton
I am configuring high-availability with heart-beat + LVS + ldirector
 
I do not want to load balance but mostly make sure it will fail over quickly, I 
have found situation where the in LVS (UDP/TCP) connection never timeout when 
the remote IP send periodic OPTIONS request for example.
 
I beleive I will have to set very low UDP/TCP time-out, however  with such a 
low time-out I can not load-balance so I will use weighted Round-Robin with 
very high priority 65535 on the active one and weith 1 on the passive server.
 
Any other suggested way to cluster without load-balancing ?
 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Parameters in b2bua

2010-01-26 Thread marie.gremillot
hello, I'm using B2bua and I'd like to put instead of the parameters something 
like &rU (the callee) in order to get back the first part of his SIP address 
(for instance bob when his SIP adress is sip:b...@ims.com) . But I don't know 
how to do it (when I tried to put &rU, I had many errors. So I add quote, but 
it uses "&rU" and not what &rU means )
I don't know if I'm clear ...


Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] permissions, pattern

2010-01-26 Thread Alexander
  Thank you very much, seems to work properly :)

2010/1/26 Bogdan-Andrei Iancu 

> Well, as time as you want a to check against a fix value "like $fU ==
> 123456" , you can use the "info" field - during the check for IP, the
> "info" field (an opaque string from module point of view) is loaded into
> script (into an AVP) - this value will be available in script after the
> check_source_address(), so you can compare it against $fU
>
> Regards,
> Bogdan
>
>
> Alexander wrote:
> >   Yes. For example, I would like to allow requests without
> > authorization from IP 192.168.3.4 for username ($fU) 123456. It would
> > be nice to have such ability. I've read documentation on permissions
> > module, but found no way solve this task :(
> >
> > 2010/1/26 Bogdan-Andrei Iancu  > >
> >
> > Hi Alexander,
> >
> > You mean to have the "pattern" parameter as variable also ?
> >
> > Regards,
> > Bogdan
> >
> > Alexander wrote:
> > >   Hi all!
> > >
> > >   Can I use pseudo-variables as pattern argument in
> > check_address()? I
> > > would like to check $fU variable, but check_address() treats it as
> > > "$fU", not as user part of From-URI.
> > >
> >
> 
> > >
> > > ___
> > > 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


[OpenSIPS-Users] B2BUA - Opensips crash on b2b_init_request("top hiding");

2010-01-26 Thread Max Mühlbronner
Hello everyone,

I have a problem with opensips 1.6.1-notls, everything else worked fine 
but at this point i can not get the b2bua module (topology hiding 
scenario) to work.
Lately i have added the b2bua module and while testing Opensips crashes 
whenever a request hits b2b_init. I thought it could be an 
misconfiguration on my side,
but could not find anything wrong. I tried many things but could not 
find any solution, now i see there is also an open bug which describes 
the same problem:
Does anyone else have these issues or similar crashes with b2bua, or any 
ideas to verify if this could be a valid bug?

- *opensips crashes on reply recieved to b2bua - ID: 2937441


Looking forward to any ideas.

Best Regards

Max M.

*

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


Re: [OpenSIPS-Users] permissions, pattern

2010-01-26 Thread Bogdan-Andrei Iancu
Well, as time as you want a to check against a fix value "like $fU == 
123456" , you can use the "info" field - during the check for IP, the 
"info" field (an opaque string from module point of view) is loaded into 
script (into an AVP) - this value will be available in script after the 
check_source_address(), so you can compare it against $fU

Regards,
Bogdan


Alexander wrote:
>   Yes. For example, I would like to allow requests without 
> authorization from IP 192.168.3.4 for username ($fU) 123456. It would 
> be nice to have such ability. I've read documentation on permissions 
> module, but found no way solve this task :(
>
> 2010/1/26 Bogdan-Andrei Iancu  >
>
> Hi Alexander,
>
> You mean to have the "pattern" parameter as variable also ?
>
> Regards,
> Bogdan
>
> Alexander wrote:
> >   Hi all!
> >
> >   Can I use pseudo-variables as pattern argument in
> check_address()? I
> > would like to check $fU variable, but check_address() treats it as
> > "$fU", not as user part of From-URI.
> >
> 
> >
> > ___
> > 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


Re: [OpenSIPS-Users] permissions, pattern

2010-01-26 Thread Alexander
  Yes. For example, I would like to allow requests without authorization
from IP 192.168.3.4 for username ($fU) 123456. It would be nice to have such
ability. I've read documentation on permissions module, but found no way
solve this task :(

2010/1/26 Bogdan-Andrei Iancu 

> Hi Alexander,
>
> You mean to have the "pattern" parameter as variable also ?
>
> Regards,
> Bogdan
>
> Alexander wrote:
> >   Hi all!
> >
> >   Can I use pseudo-variables as pattern argument in check_address()? I
> > would like to check $fU variable, but check_address() treats it as
> > "$fU", not as user part of From-URI.
> > 
> >
> > ___
> > 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] siptrace with microseconds accuracy

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Josip,

you need to make some changes in the sip_msg structure (to add a field 
to hold the received timestamp + usecs) and to add some code in the 
receive_msg() functions to set the time fields when the message is received.

Regards,
Bogdan

Josip Djuricic wrote:
> Hi,
>
> Tnx done it and it works as expected.
>
> Just a thought though...perhaps there is a way to get this time somehow when
> the message is really processed instead of taking current time? It would be
> more precise.
>
> Best regards,
>
> Josip
>
>
>
>
> -Original Message-
> From: users-boun...@lists.opensips.org
> [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Monday, January 25, 2010 2:41 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] siptrace with microseconds accuracy
>
> Hi Josip,
>
> You need to change the code to make the siptrace module to insert in 
> table a new field, the microseconds (tv_usec field from gettimeofday() ).
>
> With pure scripting is not possible.
>
> Regards,
> Bogdan
>
> Josip Djuricic wrote:
>   
>> Hit there,
>>
>>  
>>
>> I'm thinking of implementing micorseconds accuracy for siptrace log. 
>> Any advice to kep it clean as possible?
>>
>>  
>>
>> Thought of using gettimeofday() function.
>>
>>  
>>
>> Best regards,
>>
>>  
>>
>> Josip
>>
>> 
>>
>> ___
>> 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


Re: [OpenSIPS-Users] permissions, pattern

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Alexander,

You mean to have the "pattern" parameter as variable also ?

Regards,
Bogdan

Alexander wrote:
>   Hi all!
>
>   Can I use pseudo-variables as pattern argument in check_address()? I 
> would like to check $fU variable, but check_address() treats it as 
> "$fU", not as user part of From-URI.
> 
>
> ___
> 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


Re: [OpenSIPS-Users] mi_xmlrpc - Display name in From header

2010-01-26 Thread Chris Maciejewski
Hi Bogdan,

Yes, it works great and looks "pretty" now.

Thanks a lot!
Chris

2010/1/26 Bogdan-Andrei Iancu :
> Hi Chris,
>
> That is correct according to SIP grammar, but just to look "good" I made
> a new change to fix add the space - please update again from SVN.
>
> Regards,
> Bogdan
>
> Chris Maciejewski wrote:
>> Hi Bogdan,
>>
>> Just tested patch from SVN and it works for me now.
>>
>> There is only small issue. It now removes space between display name
>> and URI part, so for example:
>>
>> From: "Test User" ;
>>
>> becomes:
>>
>> From: "Test User";
>>
>> Best regards,
>> Chris
>>
>> 2010/1/25 Bogdan-Andrei Iancu :
>>
>>> Hi Chris,
>>>
>>> Found the problem and fixed it. Please updated from SVN and give it a try.
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Chris Maciejewski wrote:
>>>
 Hi Bogdan,

 Thanks for your help.

 XML MI command attached.

 Please let me know if I can help somehow in fixing this issue (testing
 patches etc.)

 Best regards,
 Chris

 2010/1/15 Bogdan-Andrei Iancu 


> Hi Chris,
>
> It seams that the t_uac MI function fails to properly detect the display
> name and adds an extra pare of angle brackets...Could you send the
> complete MI command you are using - I will try to reproduce and debug 
> this.
>
> Thanks & Regards,
> Bogdan
>
> Chris Maciejewski wrote:
>
>
>> Hi,
>>
>> I am trying to include "display name" in a From header (ie. 'From:
>> "Test User" '), when sending local messages with
>> mi_xmlrpc (openSIPs 1.5.3).
>>
>> Already tried many options, but I always end up with 'From: <"Test
>> User" >' which obviously fails.
>>
>> My XML headers parameter:
>> ...
>>  
>>   
>>    From: Test User 
To:
>> 
Content-Type: text/html;
>> charset=utf-8

>>   
>>  
>> 
>>
>> Results in the following SIP packet:
>>
>> MESSAGE sip:10...@example.com SIP/2.0.
>> Via: SIP/2.0/UDP 10.10.10.1:5065;branch=z9hG4bK40b7.e646756.0.
>> To: .
>> From: > >;tag=a6eba7f2b7ff5072ce4465fa3b4415e6-e309.
>> 
>>
>> Any suggestions how to solve this issue very much appreciated.
>>
>> Kind regards,
>> Chris
>>
>> ___
>> 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] Call Forward on Busy but not to feature server

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Mike,

why you say that "$ru =$avp(s:callfwdbusy); " does not work ? have you 
tried to print the $ru after the assignment to see if RURI was indeed 
changed?

Regards,
Bogdan


Mike O'Connor wrote:
> Thank Bogdan
>
> So those functions are not going to work, and set '$ru =
> $avp(s:callfwdbusy);' does not work.
>
> How do I achieve what I'm trying to do ?
>
> Mike
>
> On 8/01/10 7:46 PM, Bogdan-Andrei Iancu wrote:
>   
>> Hi Mike,
>>
>> rewriteuri / sethostport functions do not accept pseudo variables - only 
>> static strings.
>>
>> if you want to push data from variables, use the pseudo-vars to write into :
>> $ru = $avp(i:1);   # set whole URI
>> $rd = $avp(i:1);   # set domain
>> $rU = $avp(i:1);   # set username
>>
>> Regards,
>> Bogdan
>>
>> Mike O'Connor wrote:
>>   
>> 
>>> 'Hi All
>>>
>>> The follow does not work, I've never seen an example of anyone trying 
>>> to use avp's to do this. All the example I've seen do a 'sethostport' 
>>> to a static address and then a t_relay.
>>>
>>> ##  sethostport("192.168.2.100:5060");
>>> ##  # do not set the missed call flag again
>>> ##  t_relay();
>>>
>>> In the code below $avp(s:callfwdbusy) is currently resolving to ' 
>>> sip:500101@'
>>>
>>> failure_route[ONFAILURE_ROUTE] {
>>> if (t_was_cancelled()) {
>>> exit;
>>> }
>>>
>>> if (t_check_status("486|408")) {
>>> if (is_avp_set("$avp(s:callfwdbusy)")) {
>>> if (is_avp_set("$avp(s:callfwdbusy)"))  {
>>> $ru = $avp(s:callfwdbusy); < -- 
>>> Comments about this line below
>>> t_relay();
>>> }
>>> }
>>> }
>>> }
>>>
>>> I've tried a number of command for the line with the comment.
>>>
>>> rewriteuri("$avp(s:callfwdbusy)";
>>>
>>> This seemed to be the best option but opensips required "" arround it, 
>>> but once there it does not convert this string to a value.
>>>
>>> Again any help is appreciated.
>>>
>>> Cheers
>>> Mike
>>>
>>>
>>>
>>>
>>> 
>>>
>>> ___
>>> 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


Re: [OpenSIPS-Users] Storing modules parameters on AVP, as much as I can

2010-01-26 Thread Bogdan-Andrei Iancu
Hi,

it is nothing fancy, just load the value from DB (via avp_db_load / 
avp_db_query - avpops module) and push into the fr_timer_avp before t_relay.

Regards,
Bogdan

Mouncif Benniane wrote:
> Bogdan,
>
> How can I use option # 2 to set fr_timer_avp from Mysql DB? any example?
> Thanks
>
> On Thu, Jul 23, 2009 at 2:37 AM, Bogdan-Andrei Iancu 
> mailto:bog...@voice-system.ro>> wrote:
>
> Hi Ricardo,
>
> For 1) you can simply use M4 plus some perl script.
>
> in you opensips.m4 file, put the params you want to load via DB as m4
> macros (defines). using a small perl script you can generate the
> rules.m4 file (the file containing the definitions) for DB content:
>
> 
> |   parama   |  value  |
> 
> |  debug |   3 |
> |log_stderror|   no|
> 
>
> going into rules.m4 :
>
> define(`debug', `3')
> define(`log_stderror', `no')
>
> So, at a restart, run the script to generate the M4 definition
> from DB,
> and run m4 to generate the final cfg file...
>
> Just an idea how to do it now :)
>
> Regards,
> Bogdan
>
> Ricardo Martins wrote:
> > Hi Bogdan.
> >
> > The first option would be enough. I don't think that's an issue a
> > restarting procedure just after changing parameters. DanB just wrote
> > me indicating an script generator solution. Do you think that
> would be
> > possible to use another solution?
> >
> > About the second option, I know that I can do it with
> fr_timer_avp or
> > fr_inv_timer_avp, right?
> >
> > Regards, Ricardo.
> >
> >
> > Bogdan-Andrei Iancu escreveu:
> >> Hi Ricardo,
> >>
> >> there are things here:
> >>
> >> 1) how to set the value of the parameters (via DB, instead of
> >> statically hardcoding in cfg)
> >>
> >> 2) dynamic changing of the module params without restart.
> >>
> >> What case are you refering at?
> >>
> >> Regards,
> >> Bogdan
> >>
> >> Ricardo Martins wrote:
> >>> Hi all! Do anybody knows if there is a trick to store the modules
> >>> parameters on database/avps? I want to give the opensips
> >>> administrator all the flexibility I can without having to edit cfg
> >>> text file.
> >>>
> >>> I know that there is some specific parameters where you can do
> that
> >>> like fr_inv_timer or fr_timer for tm module but I'm talking about
> >>> storing other parameters that don't have an specific avp
> enable mode
> >>> like T1 and T2, for example.
> >>>
> >>> Do anybody has any clue?
> >>>
> >>> Regards! Ricardo.
> >>>
> >>> ___
> >>> 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


Re: [OpenSIPS-Users] lookup "b" flag - one registration at a time

2010-01-26 Thread Bogdan-Andrei Iancu
I do not think this is related to the registrar update, but rather to 
the "permissions" fixes from today (see rev 6539).

I did some tests and seams to work ok - if you want, you can privately 
send me the dump of the address table and the IP which does not match, 
just to check what is going on.

Regards,
Bogdan

Jeff Pyle wrote:
> Bogdan,
>
> I didn't catch it before, but it appears the update seems to have broken the 
> following:
>
> if (check_source_address("1","$avp(s:peer_uuid)")) { 
>   .. do stuff  ..
> }
>
> The check_source_address returns false.  As a temporary workaround I've added 
> lines the following lines:
>
> if ($si == '2.3.4.5') {
>   .. do stuff ..
> } else if ($si == '2.3.4.6') {
>   .. do the same stuff .. {
> } else if ...
>
>
> - Jeff
>
>
> On Jan 25, 2010, at 11:49 PM, Jeff Pyle wrote:
>
>   
>> Bogdan,
>>
>> Early results have this update working perfectly.
>>
>>
>> - Jeff
>>
>>
>> On Jan 25, 2010, at 10:29 AM, Jeff Pyle wrote:
>>
>> 
>>> Bogdan,
>>>
>>> Will do.  Thanks.
>>>
>>>
>>>
>>> - Jeff
>>>
>>>
>>> On Jan 25, 2010, at 9:35 AM, Bogdan-Andrei Iancu wrote:
>>>
>>>   
 Hi Jeff,

 See revision #6527 on trunk - if you could run some more tests on it and 
 report if works ok, it will be great.

 Regards,
 Bogdan

 Jeff Pyle wrote:
 
> The "f" flag sounds fantastic.  Thanks.
>
>
> - Jeff
>
>
> On Jan 18, 2010, at 9:24 AM, Bogdan-Andrei Iancu wrote:
>
>
>   
>> Hi Jeff,
>>
>> Jeff Pyle wrote:
>>
>> 
>>> Iñaki,
>>>
>>> On Jan 9, 2010, at 5:00 PM, Iñaki Baz Castillo wrote:
>>>
>>>
>>>
>>>   
 El Sábado, 9 de Enero de 2010, Jeff Pyle escribió:


 
> Hello,
>
> The docs say that when using the "b" flag with lookup() when multiple
> records are present, it will load only the one with the highest q.  
> What
> if the q is the same for all?  How does it decide which to use?
>
>
>   
 I've not tested it with multiple users sharing same "q". however it 
 should 
 fetch all the users with highest "q", not just one of them.


 
>>> Perhaps I'm asking the wrong question.  I'm looking to allow only one 
>>> registration per user in the sense that if a second successful 
>>> registration comes in it will replace tne existing one.  My approach so 
>>> far is to use a max_contacts=2 and the lookup() function with the "b" 
>>> flag to retrieve only one. 
>>>
>>>   
>> maybe without the "b" flag as the "b" flag will return you all the 
>> registered contacts.
>>
>> 
>>> max_contacts=1 returns a 503 to the new "replacement" registration 
>>> request, so that's out.
>>>
>>> Perhaps the hot ticket is to run an all-DB mode running a manual mysql 
>>> query with avp_db_query after successful REGISTER authentication but 
>>> before the save() so we can remove any existing registrations before 
>>> the new one is saved.  Thoughts?
>>>
>>>
>>>   
>> No way - the SIP contact matching is much to complicated to do it at DB 
>> level.
>>
>>
>> As I found that kind of behaviour was more and more asked by people, I 
>> will add a new flag "f" to force at save() time the override of the 
>> existing contacts if the max_contacts() was exceeded.
>>
>> Regards,
>> Bogdan
>>
>> 
>>> - Jeff
>>>
>>>
>>>
>>> ___
>>> 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
>>
>> 
> Regards,
> 
> Jeff Pyle
> Director, Voice Engineering
> Fidelity Voice & Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 
> 44122
> P: 216-245-4106
> F: 216-595-0706
> E: jp...@fidelityvoice.com
>
> Visit us at http://www.fidelityvoice.com
>
> 2008 & 2009 Inductee to the prestigious Weatherhead 100
>
>
>
> 
>
> 
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


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

Re: [OpenSIPS-Users] Problem with mmgeoip.so

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Leoida,

found a bug in the module - please update from svn and give it another try.

Regards,
Bogdan

Леонид Наседкин wrote:
> Hi. Bogdan.
>
> I got a new trouble. Please look at the last string in log. How can I 
> get a normal output?
>
> if (mmg_lookup("lon:lat:cc:reg","$si","$avp(lat_lon)")) {
> xdbg("GEOIP: $(avp(lat_lon)[0]) $(avp(lat_lon)[1]) $(avp(lat_lon)[2]) 
> $(avp(lat_lon)[3]) $(avp(lat_lon)[4]) $avp(lat_lon)");
> }
>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: 
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: ipaddr:'x.x.x.x'; 
> fields:'lon:lat:cc:reg'.
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: 
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lon] 82.934402
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: 
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lat] 55.041100
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: 
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[cc] RU
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: 
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[reg] 53
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: GEOIP: 3215296676 
> 3215296676 3215296676 3215296676 3215296676
>
>
>
>
> 2010/1/25 Bogdan-Andrei Iancu  >
>
> Hi Leonid,
>
> Use quotes for 2nd and 3rd parameters of the function ->
> f(mmg_lookup("lon:lat","$si","$avp(lat_lon)")) {
>
> Regards,
> Bogdan
>
> Леонид Наседкин wrote:
> > Hi there.
> > I tried to use mmgeoip.so with configuration from example
> > opensips 1.6.1
> >
> > loadmodule "mmgeoip.so"
> > modparam("mmgeoip",
> > "mmgeoip_city_db_path","/usr/share/GeoIP/GeoLiteCity.dat")
> > ...
> > if(mmg_lookup("lon:lat",$si,$avp(lat_lon))) {
> > xlog("L_INFO","Source IP latitude:$(avp(lat_lon)[0])\n");
> > xlog("L_INFO","Source IP longitude:$(avp(lat_lon)[1])\n");
> > };
> >
> > ls -la /usr/share/GeoIP/GeoLiteCity.dat
> > -rw-r--r-- 1 root root 28543655 2010-01-25 11:15
> > /usr/share/GeoIP/GeoLiteCity.dat
> >
> > I got some errors:
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config
> > file, line 300, column 26-43: syntax error
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config
> > file, line 300, column 43-44: bad arguments for command 
> >
> > What is wrong?
> >
> >
> > --
> > WBR, Leonid Nasedkin
> >
> >
> 
> >
> > ___
> > 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
>
>
>
>
> -- 
> WBR, Leonid Nasedkin
> cell: +7 923 731 0077
> icq: 256816
> skype: leonidnasedkin
> 
>
> ___
> 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


[OpenSIPS-Users] permissions, pattern

2010-01-26 Thread Alexander
  Hi all!

  Can I use pseudo-variables as pattern argument in check_address()? I would
like to check $fU variable, but check_address() treats it as "$fU", not as
user part of From-URI.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] lookup "b" flag - one registration at a time

2010-01-26 Thread Jeff Pyle
Bogdan,

I didn't catch it before, but it appears the update seems to have broken the 
following:

if (check_source_address("1","$avp(s:peer_uuid)")) { 
  .. do stuff  ..
}

The check_source_address returns false.  As a temporary workaround I've added 
lines the following lines:

if ($si == '2.3.4.5') {
  .. do stuff ..
} else if ($si == '2.3.4.6') {
  .. do the same stuff .. {
} else if ...


- Jeff


On Jan 25, 2010, at 11:49 PM, Jeff Pyle wrote:

> Bogdan,
> 
> Early results have this update working perfectly.
> 
> 
> - Jeff
> 
> 
> On Jan 25, 2010, at 10:29 AM, Jeff Pyle wrote:
> 
>> Bogdan,
>> 
>> Will do.  Thanks.
>> 
>> 
>> 
>> - Jeff
>> 
>> 
>> On Jan 25, 2010, at 9:35 AM, Bogdan-Andrei Iancu wrote:
>> 
>>> Hi Jeff,
>>> 
>>> See revision #6527 on trunk - if you could run some more tests on it and 
>>> report if works ok, it will be great.
>>> 
>>> Regards,
>>> Bogdan
>>> 
>>> Jeff Pyle wrote:
 The "f" flag sounds fantastic.  Thanks.
 
 
 - Jeff
 
 
 On Jan 18, 2010, at 9:24 AM, Bogdan-Andrei Iancu wrote:
 
 
> Hi Jeff,
> 
> Jeff Pyle wrote:
> 
>> Iñaki,
>> 
>> On Jan 9, 2010, at 5:00 PM, Iñaki Baz Castillo wrote:
>> 
>> 
>> 
>>> El Sábado, 9 de Enero de 2010, Jeff Pyle escribió:
>>> 
>>> 
 Hello,
 
 The docs say that when using the "b" flag with lookup() when multiple
 records are present, it will load only the one with the highest q.  
 What
 if the q is the same for all?  How does it decide which to use?
 
 
>>> I've not tested it with multiple users sharing same "q". however it 
>>> should 
>>> fetch all the users with highest "q", not just one of them.
>>> 
>>> 
>> Perhaps I'm asking the wrong question.  I'm looking to allow only one 
>> registration per user in the sense that if a second successful 
>> registration comes in it will replace tne existing one.  My approach so 
>> far is to use a max_contacts=2 and the lookup() function with the "b" 
>> flag to retrieve only one. 
>> 
> maybe without the "b" flag as the "b" flag will return you all the 
> registered contacts.
> 
>> max_contacts=1 returns a 503 to the new "replacement" registration 
>> request, so that's out.
>> 
>> Perhaps the hot ticket is to run an all-DB mode running a manual mysql 
>> query with avp_db_query after successful REGISTER authentication but 
>> before the save() so we can remove any existing registrations before the 
>> new one is saved.  Thoughts?
>> 
>> 
> No way - the SIP contact matching is much to complicated to do it at DB 
> level.
> 
> 
> As I found that kind of behaviour was more and more asked by people, I 
> will add a new flag "f" to force at save() time the override of the 
> existing contacts if the max_contacts() was exceeded.
> 
> Regards,
> Bogdan
> 
>> - Jeff
>> 
>> 
>> 
>> ___
>> 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
> 
 
 Regards,
 
 Jeff Pyle
 Director, Voice Engineering
 Fidelity Voice & Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 
 44122
 P: 216-245-4106
 F: 216-595-0706
 E: jp...@fidelityvoice.com
 
 Visit us at http://www.fidelityvoice.com
 
 2008 & 2009 Inductee to the prestigious Weatherhead 100
 
 
 
 
 
 
 
 ___
 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] parser errors

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Jeff,

First error (parsing the TO hdr) means a \" char was present in an 
enclosed URI (<>)  - form the log, the TO hdr indeed looks bogus..
The second error is related to the first one - when the 400 reply was 
received and opensips tried to parse it, it came across the bogus TO hdr 
-> the parse_headers failed (and parsing of the reply) failed as the TO 
parsing failed.

The fact you see it several time is because probably the sender of this 
400 reply is doing retransmission as no ACK is sent back.

Regards,
Bogdan

Jeff Pyle wrote:
> Hello,
>
> Every once in a while I see errors like the following pop up in the syslog 
> from v1.6:
>
> Jan 25 15:56:47 host /usr/local/sbin/opensips[21478]: ERROR:core:parse_to: 
> unexpected char ["] in status 6: <<"Caller Name" 
> > . 
> Jan 25 15:56:47 host /usr/local/sbin/opensips[21478]: 
> ERROR:core:get_hdr_field: bad to header 
> Jan 25 15:56:47 host /usr/local/sbin/opensips[21478]: 
> INFO:core:parse_headers: bad header field 
>  > ntent-Length: 
> 013c4-4ea00-34f09b27-4ea00=z9hG4bK98broa203gs0dgsov701sd000qir3.1age= 400 SIP Parser Error : Unexpected '/', line 7, column 42
>
> In this particular instance I see the same data three times, each time a few 
> seconds apart and handled by a different Opensips child process number.
>
> I'm trying to determine what exactly caused this.  The message indicates a 
> problem parsing the To header, and it certainly looks pretty banged up there. 
>  But then the last line seems to indicate a problem with a 400 Parser Error 
> message itself?
>
>
> Thanks,
> Jeff
>
>
> ___
> 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


Re: [OpenSIPS-Users] Private IP in registered AOR causing failure

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Brian,

Just consulted with Anca (she is the presence guru) and 2 questions for you:

1) the BLA part is sending the SUBSCRIBEs based on user location and it 
is using the "received" field if present, so it should be ok. Unless you 
set in the bla module the "outbound" param - this will override the 
received info.

2) the subscribe you posted - as you captured it, I supposed it exists 
on network. But I see that the transport in TLS (so TCP based), but how 
come you see the message if opensips is not able to open the TCP conn to 
the private IP..

Regards,
Bogdan


opensipsl...@encambio.com wrote:
> Hello Bogdan,
>
> An ven., janv 22, 2010, Bogdan-Andrei Iancu schrieb:
>   
>> opensipsl...@encambio.com wrote:
>> 
>>> An jeu., janv 21, 2010, opensipsl...@encambio.com schrieb:
>>>   
 An mer., janv 20, 2010, Bogdan-Andrei Iancu schrieb:
 
> opensipsl...@encambio.com wrote:
>   
 After running a socket listener on 192.168.0.31 on the OpenSIPS host:

$ socat TCP4-LISTEN:2310,bind=192.168.0.31,reuseaddr -
SUBSCRIBE 
 sip:mylogin-os...@192.168.0.31:2310;transport=tls;line=2acy67zm SIP/2.0
Via: SIP/2.0/TCP 86.90.39.44;branch=G4z9hb82dK8.f144.0
To: ;tag=ty6sjh9iz9
From: ;tag=6c9d4319c74d756e6b696-baa1
CSeq: 11 SUBSCRIBE
Call-ID: b1c04118-8...@86.90.39.44
Content-Length: 0
User-Agent: OpenSIPS (1.6.1-tls)
Max-Forwards: 70
Event: dialog;sla
Contact: 
Expires: 610

 I'm trying to implement presence by using the presence,
 presence_xml, pua, and pua_bla modules.

 So it seems that one of these modules (see event dialog;sla) is
 getting the contact from the locations table (in AAA on our server)
 and ignoring the Received header.

 OpenSIPS replies to messages from UACs such as INVITE and CANCEL
 properly, and opens connections to the IP in Received. This problem
 is limited to the SUBSCRIBES sent from one of the presence modules.
 
 
>>> ...and similar SUBSCRIBE messages (sent from one of the presence
>>> modules) are not having this problem. They are almost the same as
>>> the one above, but simply don't have a to tag.
>>>
>>>   
>> So you have problems with a SUBSCRIBE that is internally generated
>> by one of the presence modules? It is not a proxied request, right?
>>
>> 
> Problem
> I know I have a problem because tcpdump shows that OpenSIPS is
> trying to reach a private IP address across the Internet.
>
> Workaround
> It seems that one of the presence modules is responsible for that,
> because when I remove bla_handle_notify() and bla_set_flag() from
> the route script, then the attempted private IP connections stop.
>
> Proxied request
> ...and because I see no SUBSCRIBE (event dialog;sla) messages coming
> from all the connected UAs (in their logs), it is quite clear that
> some presence module of OpenSIPS is creating the SUBSCRIBEs.
>
> Guesses
> At first I was sure it was the pua_bla, but after looking at the
> code I see that pua_bla uses other presence modules (pua, presence,
> presence_xml?) So it could be that another one is constructing or
> sending the SUBSCRIBE without observing the 'Received' header, and
> thus using a private IP instead.
>
> Greetings,
> Brian
>
> ___
> 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


Re: [OpenSIPS-Users] uac_replace_from in branch_route

2010-01-26 Thread Bogdan-Andrei Iancu
I see - well, if you see some abnormal messages (FROM hdrs) please let 
me know.

Regards,
Bogdan

Jeff Pyle wrote:
> Bogdan,
>
> I'm not sure yet.  I don't think so, but it would explain some intermittent 
> issues I haven't been able to isolate yet.
>
>
> - Jeff
>
>
> On Jan 26, 2010, at 3:30 AM, Bogdan-Andrei Iancu wrote:
>
>   
>> Hi Jeff,
>>
>> if you call uac_replace_() only from branch route, than you 
>> assumption is correct. Do you have issues with this?
>>
>> Regards,
>> Bogdan
>>
>> Jeff Pyle wrote:
>> 
>>> Hello,
>>>
>>> I make use of the uac_replace_from() function in branch_routes.  My 
>>> thinking here is that if the outbound INVITE were to return on a failure 
>>> route and serially fork out another branch route, running the 
>>> uac_replace_from() function again would not cause any harm because none of 
>>> its changes would be reflected ... since it was a branch route.
>>>
>>> Is this logic correct?
>>>
>>>
>>>
>>> Thanks,
>>> Jeff
>>>
>>>
>>> ___
>>> 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


Re: [OpenSIPS-Users] uac_replace_from in branch_route

2010-01-26 Thread Jeff Pyle
Bogdan,

I'm not sure yet.  I don't think so, but it would explain some intermittent 
issues I haven't been able to isolate yet.


- Jeff


On Jan 26, 2010, at 3:30 AM, Bogdan-Andrei Iancu wrote:

> Hi Jeff,
> 
> if you call uac_replace_() only from branch route, than you 
> assumption is correct. Do you have issues with this?
> 
> Regards,
> Bogdan
> 
> Jeff Pyle wrote:
>> Hello,
>> 
>> I make use of the uac_replace_from() function in branch_routes.  My thinking 
>> here is that if the outbound INVITE were to return on a failure route and 
>> serially fork out another branch route, running the uac_replace_from() 
>> function again would not cause any harm because none of its changes would be 
>> reflected ... since it was a branch route.
>> 
>> Is this logic correct?
>> 
>> 
>> 
>> Thanks,
>> Jeff
>> 
>> 
>> ___
>> 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] Error in module permission with db_text

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Leonid,

Thanks for testing - I uploaded the fix on the 1.6 branch also.

Regards,
Bogdan

Леонид Наседкин wrote:
> Hi, Bogdan.
> Its working now. Thanks. 
>
> 2010/1/26 Bogdan-Andrei Iancu  >
>
> Hi Leonid,
>
> An official fix is available on SVN trunk (rev 6534). I would
> really appreciate if you could give it a try and test - if ok, I
> will do the backport.
>
> Thanks and regards,
> Bogdan
>
>
> Bogdan-Andrei Iancu wrote:
>
> Ok, I will investigate to come up with an official fix.
>
> Thanks and regards,
> Bogdan
>
> Леонид Наседкин wrote:
>  
>
> Hi Bogdan
> Thank you. Its working now.
>
> 2010/1/15 Bogdan-Andrei Iancu  
>  >>
>
>Hi Leonid,
>
>Looks like there is a compatibility bug between
> permission and
>db_text modules when comes to DB data typesGive me
> couple of
>days to sort this out.
>
>In the mean while, if you want to use db_text for
> permissions,
>please use the attached patch.
>
>Thanks and regards,
>Bogdan
>
>
>Леонид Наседкин wrote:
>
>Hi there.
>I'm trying to use permission module with db_text,
> and it's not
>working, and I can't understand what's wrong.
>Opensips 1.6.1 svnrevision: 2:6509
>
>In opensips.cfg:
>loadmodule "db_text.so"
>modparam("db_text", "db_mode", 0)
>loadmodule "permissions.so"
>modparam("permissions","db_url",
> "text:///etc/opensips/dbtext")
>
>In /etc/opensips/dbtext/address:
>id(int,auto) grp(int) ip(str) mask(int) port(int)
> proto(str)
>pattern(str,null) context_info(str,null)
>10:1:10.100.0.0:23:5060:udp::
>20:1:10.110.0.0:23:5060:udp::
>30:1:10.120.0.0:23:5060:udp::
>
>LOG:
>
>DBG:core:init_mod: initializing module permissions
>DBG:permissions:mod_init: initializing...
>WARNING:permissions:parse_config_file: file not found:
>/etc/opensips/permissions.allow
>WARNING:permissions:mod_init: default allow file
>(/etc/opensips/permissions.allow) not found =>
> empty rule set
>WARNING:permissions:parse_config_file: file not found:
>/etc/opensips/permissions.deny
>WARNING:permissions:mod_init: default deny file
>(/etc/opensips/permissions.deny) not found => empty
> rule set
>DBG:core:find_mod_export: found  in module
>db_text [/usr/lib/opensips/modules/]
>DBG:core:db_bind_mod: using db bind api for db_text
>INFO:db_text:dbt_init: using database at:
> /etc/opensips/dbtext/
>DBG:db_text:dbt_cache_get_db: looking for db
>/etc/opensips/dbtext/!
>DBG:db_text:dbt_cache_get_db: new db!
>DBG:db_text:dbt_load_file: request for table [version]
>DBG:db_text:dbt_load_file: db is
> [/etc/opensips/dbtext/]
>DBG:db_text:dbt_load_file: loading file
>[/etc/opensips/dbtext//version]
>DBG:db_text:dbt_table_new: mtime is 1263556066
>DBG:db_text:dbt_load_file: column[0] is STR!
>DBG:db_text:dbt_load_file: column[1] is INT!
>DBG:db_text:dbt_query: new res with 1 cols
>DBG:db_text:dbt_result_new: new res with 1 cols
>DBG:core:db_new_result: allocate 28 bytes for
> result set at
>0x816b044
>DBG:core:db_allocate_columns: allocate 16 bytes for
> result
>columns at 0x816aedc
>DBG:core:db_allocate_rows: allocate 28 bytes for
> result rows
>and values at 0x816b090
>DBG:core:db_free_columns: freeing result columns at
> 0x816aedc
>DBG:core:db_free_rows: freeing 1 rows
>DBG:core:db_free_row: freeing row values at 0x816b098
>DBG:core:db_free_rows: freeing rows at 0x816b090
>DBG:core:db_free_result: freeing result set at
> 0x816b044
>DBG:db_text:dbt_loa

Re: [OpenSIPS-Users] uac_replace_from in branch_route

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Jeff,

if you call uac_replace_() only from branch route, than you 
assumption is correct. Do you have issues with this?

Regards,
Bogdan

Jeff Pyle wrote:
> Hello,
>
> I make use of the uac_replace_from() function in branch_routes.  My thinking 
> here is that if the outbound INVITE were to return on a failure route and 
> serially fork out another branch route, running the uac_replace_from() 
> function again would not cause any harm because none of its changes would be 
> reflected ... since it was a branch route.
>
> Is this logic correct?
>
>
>
> Thanks,
> Jeff
>
>
> ___
> 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


Re: [OpenSIPS-Users] INVITE not forwarded, call fails

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Lorenzo,

your third case is more or less part of second one - if the client is 
doing a lousy job, the server should take care and perform the NAT 
traversal on its side.

If you have issues with nathelper module, just let me know :)

Regards,
Bogdan

lorenzo wrote:
> On 25/01/10 12:08, Bogdan-Andrei Iancu wrote:
>   
>> Hi Lorenzo,
>>
>> When comes to NAT traversal, you can do it in two ways:
>>
>> 1) on the client (UAC) side - the client is doing the signalling in such 
>> a way that the server "sees" the traffic as coming from a public IP. 
>> This is actually STUN approach -> the server has 0 capabilities in 
>> handling NAT.
>>
>> 2)  on the server side - the client has 0 capabilities in handling NAT 
>> traversal and the whole task must be done by server. In this case you 
>> need to configure opensips to do the nat traversal - to correct both 
>> signalling and RTP for coping with NAt.
>>
>> My understanding is you tried the first approach, but it fails due poor 
>> STUN/NAT working. So, you what to move into 2), right ? IF so, take a 
>> look at the nathelper module.
>> 
>
>
> Hi Bogdan!
>
> i think there's a third case, which is when a client does make use of
> STUN, but is behind a symmetric NAT.
>
> since the UAC may not be aware of that, the UAS should try and fix the
> situation by fixing the contact header, after checking it's different
> from the address in the ip header of course :)
>
> i think this is the case i'm in.
>
> anyway, thanks for the tip, i'll take a deeper look at the nathelper module.
>
>   
>> Regards,
>> Bogdan
>> 
>
> thanks,
> Lorenzo
>
>
> ___
> 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


Re: [OpenSIPS-Users] mi_xmlrpc - Display name in From header

2010-01-26 Thread Bogdan-Andrei Iancu
Hi Chris,

That is correct according to SIP grammar, but just to look "good" I made 
a new change to fix add the space - please update again from SVN.

Regards,
Bogdan

Chris Maciejewski wrote:
> Hi Bogdan,
>
> Just tested patch from SVN and it works for me now.
>
> There is only small issue. It now removes space between display name
> and URI part, so for example:
>
> From: "Test User" ;
>
> becomes:
>
> From: "Test User";
>
> Best regards,
> Chris
>
> 2010/1/25 Bogdan-Andrei Iancu :
>   
>> Hi Chris,
>>
>> Found the problem and fixed it. Please updated from SVN and give it a try.
>>
>> Regards,
>> Bogdan
>>
>> Chris Maciejewski wrote:
>> 
>>> Hi Bogdan,
>>>
>>> Thanks for your help.
>>>
>>> XML MI command attached.
>>>
>>> Please let me know if I can help somehow in fixing this issue (testing
>>> patches etc.)
>>>
>>> Best regards,
>>> Chris
>>>
>>> 2010/1/15 Bogdan-Andrei Iancu 
>>>
>>>   
 Hi Chris,

 It seams that the t_uac MI function fails to properly detect the display
 name and adds an extra pare of angle brackets...Could you send the
 complete MI command you are using - I will try to reproduce and debug this.

 Thanks & Regards,
 Bogdan

 Chris Maciejewski wrote:

 
> Hi,
>
> I am trying to include "display name" in a From header (ie. 'From:
> "Test User" '), when sending local messages with
> mi_xmlrpc (openSIPs 1.5.3).
>
> Already tried many options, but I always end up with 'From: <"Test
> User" >' which obviously fails.
>
> My XML headers parameter:
> ...
>  
>   
>From: Test User 
To:
> 
Content-Type: text/html;
> charset=utf-8

>   
>  
> 
>
> Results in the following SIP packet:
>
> MESSAGE sip:10...@example.com SIP/2.0.
> Via: SIP/2.0/UDP 10.10.10.1:5065;branch=z9hG4bK40b7.e646756.0.
> To: .
> From:  >;tag=a6eba7f2b7ff5072ce4465fa3b4415e6-e309.
> 
>
> Any suggestions how to solve this issue very much appreciated.
>
> Kind regards,
> Chris
>
> ___
> 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


Re: [OpenSIPS-Users] Problem with mmgeoip.so

2010-01-26 Thread Леонид Наседкин
Hi. Bogdan.

I got a new trouble. Please look at the last string in log. How can I get a
normal output?

if (mmg_lookup("lon:lat:cc:reg","$si","$avp(lat_lon)")) {
xdbg("GEOIP: $(avp(lat_lon)[0]) $(avp(lat_lon)[1])
$(avp(lat_lon)[2]) $(avp(lat_lon)[3]) $(avp(lat_lon)[4]) $avp(lat_lon)");
}

Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: ipaddr:'x.x.x.x';
fields:'lon:lat:cc:reg'.
Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lon] 82.934402
Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lat] 55.041100
Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[cc] RU
Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[reg] 53
Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: GEOIP: 3215296676
3215296676 3215296676 3215296676  3215296676




2010/1/25 Bogdan-Andrei Iancu 

> Hi Leonid,
>
> Use quotes for 2nd and 3rd parameters of the function ->
> f(mmg_lookup("lon:lat","$si","$avp(lat_lon)")) {
>
> Regards,
> Bogdan
>
> Леонид Наседкин wrote:
> > Hi there.
> > I tried to use mmgeoip.so with configuration from example
> > opensips 1.6.1
> >
> > loadmodule "mmgeoip.so"
> > modparam("mmgeoip",
> > "mmgeoip_city_db_path","/usr/share/GeoIP/GeoLiteCity.dat")
> > ...
> > if(mmg_lookup("lon:lat",$si,$avp(lat_lon))) {
> > xlog("L_INFO","Source IP latitude:$(avp(lat_lon)[0])\n");
> > xlog("L_INFO","Source IP longitude:$(avp(lat_lon)[1])\n");
> > };
> >
> > ls -la /usr/share/GeoIP/GeoLiteCity.dat
> > -rw-r--r-- 1 root root 28543655 2010-01-25 11:15
> > /usr/share/GeoIP/GeoLiteCity.dat
> >
> > I got some errors:
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config
> > file, line 300, column 26-43: syntax error
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config
> > file, line 300, column 43-44: bad arguments for command 
> >
> > What is wrong?
> >
> >
> > --
> > WBR, Leonid Nasedkin
> >
> > 
> >
> > ___
> > 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
>



-- 
WBR, Leonid Nasedkin
cell: +7 923 731 0077
icq: 256816
skype: leonidnasedkin
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users