Re: [OpenSIPS-Users] opensips logging format

2017-04-19 Thread Benjamin Cropley
https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc87 and
https://www.opensips.org/Documentation/Script-CoreVar-2-2#toc91 should be
able to help

For example...

xlog("L_DBG","$time(%b-%d_%H-%M-%S).$Tsm");

All the best,
Ben Cropley

On Wed, Apr 19, 2017 at 3:59 PM, Ramachandran, Agalya (Contractor) <
agalya_ramachand...@comcast.com> wrote:

> Hi Bogdan/team,
>
>
>
> I have couple of  questions regarding the logging format for OpenSIPS logs.
>
>
>
> 1)  Is it possible to include milliseconds in the time stamp.
> Currently it is displaying till seconds ( Apr 18 15:05:53 ).
>
> 2)  Is it possible to log in standard ISO format such as
> "2017-04-18T15:05:53.0005" instead of “Apr 18 15:05:53”
>
>
>
> If there is a way to achieve the above two, let me know any configs to be
> added or so.
>
>
>
> Regards,
>
> Agalya
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
All the best,
Ben Cropley
07539 366 905
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
Sorry - just realised what you mean. You're saying do it like..

route{
# set vars back to null/init them..
$var(c)="";
$var(d)="";
$var(e)="";
$var(f)="";

if (method=="INVITE") {

if(is_present_hf("X-Info")){
# assign values to vars...
$var(c)=$hdr(X-Info);
$var(d)=$(var(c){s.select,2,;});
$var(e)=$(var(c){s.select,3,;});
$var(f)=$(var(c){s.select,4,;});
}

#Set the flag for counting the dialogs. We user flag=4 for counting
dialogs
setflag(2);
setflag(4);
xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n" );
xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );
xlog("L_NOTICE", " Source IP ($si) :  method ($rm) r-uri ($ru) :
callID $ci \n");

}
}

??

On Wed, Sep 14, 2016 at 3:40 PM, Benjamin Cropley <
benjamin.crop...@gmail.com> wrote:

> I was just following the doc :)
>
> "if you want to start using a script variable in a route, better
> initialize it with same value *(or reset it)*, otherwise you may inherit
> a value from a previous route that was executed by the same process."
>
> On Wed, Sep 14, 2016 at 3:23 PM, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi,
>>
>> Ideally you should init the vars before their usage, rather than trying
>> to reset afterwards. It is much safer.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 14.09.2016 16:59, Benjamin Cropley wrote:
>>
>> the value of script variables persists over any given OpenSIPS process.
>> Therefore, to ensure the value is null on every entry to the route (if a
>> subsequent packet is recieved on the same process) you must set the value
>> back to Null before the route is exited.
>>
>> eg..
>> route{
>> if (method=="INVITE") {
>> if(is_present_hf("X-Info")){
>> # assign values to vars...
>> $var(c)=$hdr(X-Info);
>> $var(d)=$(var(c){s.select,2,;});
>> $var(e)=$(var(c){s.select,3,;});
>> $var(f)=$(var(c){s.select,4,;});
>> }
>>
>> #Set the flag for counting the dialogs. We user flag=4 for
>> counting dialogs
>> setflag(2);
>> setflag(4);
>> xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n" );
>> xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );
>> xlog("L_NOTICE", " Source IP ($si) :  method ($rm) r-uri ($ru) :
>> callID $ci \n");
>>
>> # set vars back to null..
>> $var(c)="";
>> $var(d)="";
>> $var(e)="";
>> $var(f)="";
>> exit;
>> }
>> }
>>
>> I think this feature will have existed in both 1.6 and 1.11 (see
>> https://www.opensips.org/Documentation/Script-CoreVar-1-6#toc1 and
>> https://www.opensips.org/Documentation/Script-CoreVar-1-11#toc1). Maybe
>> something else is going on to make it 'work' in 1.6?
>>
>> On Wed, Sep 14, 2016 at 2:34 PM, Sasmita Panda 
>> wrote:
>>
>>> Hi All ,
>>>
>>>  I am using opensips-1.11 .
>>>
>>> My config file looks like bellow .
>>>
>>> *if (method=="INVITE") {*
>>>
>>>
>>> *if(is_present_hf("X-Info")) *
>>> *   {*
>>> *$var(c)=$hdr(X-Info);*
>>> *$var(d)=$(var(c){s.select,2,;});*
>>> *$var(e)=$(var(c){s.select,3,;});*
>>> *$var(f)=$(var(c){s.select,4,;});*
>>> *   }*
>>>
>>>
>>> *#Set the flag for counting the dialogs. We user flag=4 for
>>> counting dialogs*
>>> *setflag(2);*
>>> *setflag(4);*
>>> *xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c)
>>> \n" );*
>>> *xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n"
>>> );*
>>> *xlog("L_NOTICE", " Source IP ($si) :  method ($rm)
>>> r-uri ($ru) : callID $ci \n");*
>>> * }*
>>>
>>>
>>>What I am trying to do is , I am extracti

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
I was just following the doc :)

"if you want to start using a script variable in a route, better initialize
it with same value *(or reset it)*, otherwise you may inherit a value from
a previous route that was executed by the same process."

On Wed, Sep 14, 2016 at 3:23 PM, Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> Ideally you should init the vars before their usage, rather than trying to
> reset afterwards. It is much safer.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 14.09.2016 16:59, Benjamin Cropley wrote:
>
> the value of script variables persists over any given OpenSIPS process.
> Therefore, to ensure the value is null on every entry to the route (if a
> subsequent packet is recieved on the same process) you must set the value
> back to Null before the route is exited.
>
> eg..
> route{
> if (method=="INVITE") {
> if(is_present_hf("X-Info")){
> # assign values to vars...
> $var(c)=$hdr(X-Info);
> $var(d)=$(var(c){s.select,2,;});
> $var(e)=$(var(c){s.select,3,;});
> $var(f)=$(var(c){s.select,4,;});
> }
>
> #Set the flag for counting the dialogs. We user flag=4 for
> counting dialogs
> setflag(2);
> setflag(4);
> xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n" );
> xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );
> xlog("L_NOTICE", " Source IP ($si) :  method ($rm) r-uri ($ru) :
> callID $ci \n");
>
> # set vars back to null..
> $var(c)="";
> $var(d)="";
> $var(e)="";
> $var(f)="";
> exit;
> }
> }
>
> I think this feature will have existed in both 1.6 and 1.11 (see
> https://www.opensips.org/Documentation/Script-CoreVar-1-6#toc1 and
> https://www.opensips.org/Documentation/Script-CoreVar-1-11#toc1). Maybe
> something else is going on to make it 'work' in 1.6?
>
> On Wed, Sep 14, 2016 at 2:34 PM, Sasmita Panda  wrote:
>
>> Hi All ,
>>
>>  I am using opensips-1.11 .
>>
>> My config file looks like bellow .
>>
>> *if (method=="INVITE") {*
>>
>>
>> *if(is_present_hf("X-Info")) *
>> *   {*
>> *$var(c)=$hdr(X-Info);*
>> *$var(d)=$(var(c){s.select,2,;});*
>> *$var(e)=$(var(c){s.select,3,;});*
>> *$var(f)=$(var(c){s.select,4,;});*
>> *   }*
>>
>>
>> *#Set the flag for counting the dialogs. We user flag=4 for
>> counting dialogs*
>> *setflag(2);*
>> *setflag(4);*
>> *xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n"
>> );*
>> *xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n"
>> );*
>> *xlog("L_NOTICE", " Source IP ($si) :  method ($rm)
>> r-uri ($ru) : callID $ci \n");*
>> * }*
>>
>>
>>What I am trying to do is , I am extracting "X-Info" from
>> INVITE message and printing it in logs in place of "$var(c)" . When an
>> INVITE message doesn't have "X-Info" header it prints "" in place of
>> "$var(c)" in logs .
>>
>>
>>  * This is working fine in opensips-1.6 . For each and every
>> call the $var(c) is getting updated . *
>>
>>   *I am facing some problem in opensips-1.11 . For example :
>> When I am doing a call which has "X-Info"  it prints the value
>> corresponding to that . In the next call , lets the INVITE message don't
>> have "X-Info" , for this rather than printing "" in place of
>> "$var(c)"  **its printing the previous value .*
>>
>>
>> *  I am not getting why this is happening . Please help me . I think
>> the variable is getting saved somewhere and getting printed again and again
>> .  *
>>
>>   How can I solve this problem . Its very critical for me . It will
>> affect my CDR . Please help me .
>>
>> *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
>>
>>
>
>
> --
> All the best,
> Ben Cropley
> 07539 366 905
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>


-- 
All the best,
Ben Cropley
07539 366 905
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
the value of script variables persists over any given OpenSIPS process.
Therefore, to ensure the value is null on every entry to the route (if a
subsequent packet is recieved on the same process) you must set the value
back to Null before the route is exited.

eg..
route{
if (method=="INVITE") {
if(is_present_hf("X-Info")){
# assign values to vars...
$var(c)=$hdr(X-Info);
$var(d)=$(var(c){s.select,2,;});
$var(e)=$(var(c){s.select,3,;});
$var(f)=$(var(c){s.select,4,;});
}

#Set the flag for counting the dialogs. We user flag=4 for counting
dialogs
setflag(2);
setflag(4);
xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n" );
xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );
xlog("L_NOTICE", " Source IP ($si) :  method ($rm) r-uri ($ru) :
callID $ci \n");

# set vars back to null..
$var(c)="";
$var(d)="";
$var(e)="";
$var(f)="";
exit;
}
}

I think this feature will have existed in both 1.6 and 1.11 (see
https://www.opensips.org/Documentation/Script-CoreVar-1-6#toc1 and
https://www.opensips.org/Documentation/Script-CoreVar-1-11#toc1). Maybe
something else is going on to make it 'work' in 1.6?

On Wed, Sep 14, 2016 at 2:34 PM, Sasmita Panda  wrote:

> Hi All ,
>
>  I am using opensips-1.11 .
>
> My config file looks like bellow .
>
> *if (method=="INVITE") {*
>
>
> *if(is_present_hf("X-Info"))*
> *   {*
> *$var(c)=$hdr(X-Info);*
> *$var(d)=$(var(c){s.select,2,;});*
> *$var(e)=$(var(c){s.select,3,;});*
> *$var(f)=$(var(c){s.select,4,;});*
> *   }*
>
>
> *#Set the flag for counting the dialogs. We user flag=4 for
> counting dialogs*
> *setflag(2);*
> *setflag(4);*
> *xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n"
> );*
> *xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n"
> );*
> *xlog("L_NOTICE", " Source IP ($si) :  method ($rm)
> r-uri ($ru) : callID $ci \n");*
> * }*
>
>
>What I am trying to do is , I am extracting "X-Info" from
> INVITE message and printing it in logs in place of "$var(c)" . When an
> INVITE message doesn't have "X-Info" header it prints "" in place of
> "$var(c)" in logs .
>
>
>  * This is working fine in opensips-1.6 . For each and every call
> the $var(c) is getting updated . *
>
>   *I am facing some problem in opensips-1.11 . For example : When
> I am doing a call which has "X-Info"  it prints the value corresponding to
> that . In the next call , lets the INVITE message don't have "X-Info" , for
> this rather than printing "" in place of "$var(c)"  **its printing
> the previous value .*
>
>
> *  I am not getting why this is happening . Please help me . I think
> the variable is getting saved somewhere and getting printed again and again
> .  *
>
>   How can I solve this problem . Its very critical for me . It will
> affect my CDR . Please help me .
>
> *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
>
>


-- 
All the best,
Ben Cropley
07539 366 905
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] What does mean "a=inactive"?

2016-09-07 Thread Benjamin Cropley
I would start by looking at a trace. Is it A changing the SDP attribute? or
is OpenSIPS doing it?

Inactive obviously means "Keep the session live, but dont send me any
audio, and I won't send you any audio".

I've seen that happen once, when both end points couldnt establish a
codec.. due to processing error or something like that, but instead of
sending an appropriate error, it just connects the call and send that.

Hope that helps,
Ben Cropley

On Thu, Sep 1, 2016 at 1:12 PM, Rodrigo Pimenta Carvalho 
wrote:

>
>
> Dear OpenSIPS users;
>
> I'm not sure if the following question is about OpenSIPS, or SIP, or SDP,
> but...
>
> I have 2 softphones (Microsip) with SIP UAC: in phone A and in phone B.
> There is a SIP Proxy (OpenSIPS) between they too.
>
>
> When A calls B, I can see the SIP messages (via wireshark) and in some
> moment A sends a SIP UPDATE do B.
>
> The SIP UPDATE has SDP with lines like this:
>
>
> v=0
> o=- 3681643549 3681643550 IN IP4 XXX.YYY.240.204
> s=pjmedia
> b=AS:84
> t=0 0
> a=X-nat:1
> m=audio 64568 RTP/AVP 110 8 101
> c=IN IP4 XXX.YYY.240.204
> b=TIAS:64000
> a=rtpmap:110 speex/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ice-ufrag:139d7049
> a=ice-pwd:692c4a80
> a=rtcp:64571 IN IP4 XXX.YYY.240.204
> a=candidate:Sc0a81485 1 UDP 1862270975 XXX.YYY.240.204 64568 typ srflx
> raddr 192.168.20.133 rport 64568
> a=candidate:Sc0a81485 2 UDP 1862270974 XXX.YYY.240.204 64571 typ srflx
> raddr 192.168.20.133 rport 64571
> a=remote-candidates:1 XXX.YYY.240.71 64993 2 XXX.YYY.240.71 64996
> *a=sendrecv*
>
> However, if I replace the SIP Proxy with another one containing the same
> software (Same OpenSIPS, database, network, etc. Just hardware is
> different) and run the same call (A calls B), that "*a=sendrecv*" in SIP
> UPDATE changes to "*a=inactive*". If the peers are still the same, how
> could a media attribute changes?
>
>
> I have no idea what could cause this difference related to media
> attribute! Could OpenSIPS take care of this case?
>
> Could someone here give me some examples of what could cause an
> "a=inactive", so that I will have a point to start my analyze of the
> problem?
>
> I will also take a look in the SIP RFC to get some hint.
>
> Any hint will be very very helpful!
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
All the best,
Ben Cropley
07539 366 905
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips switch from SQL to NoSQL

2016-07-13 Thread Benjamin Cropley
You don't have to explicitly define a schema when you insert a document
into MongoDB.

For example, you could create a MongoDB database, and then immediately do
an insert into an insert into a collection without even creating it or a
'schema'.

Maybe you should do some reading about MongoDB and NoSQL in general, as a
basic understanding should have answered that question :)

https://docs.mongodb.com/manual/faq/fundamentals/

On Wed, Jul 13, 2016 at 2:44 PM, feroze waris 
wrote:

> Hi,
>
> Can anyone tell me how to move opensips DB from SQL to NoSQL. I have seen
> a module name db_cachedb which has a support for mongodb but how to move
> mysql schema to mongodb schema.
>
> Regards
> Feroze
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
All the best,
Ben Cropley
07539 366 905
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips as proxy, config problem on INVITES

2016-06-08 Thread Benjamin Cropley
There's quite a lot of trace to go through there, but this screams that
you're looping to me.. I suggest you look at the routing on the OTHER
boxes, see if you can spot something that might be doing that.

On Tue, May 31, 2016 at 11:07 AM, Saioa Perurena <
saioa.perur...@enigmedia.es> wrote:

> Hi,
>
> We have only one proxy Opensips (version 1.11) that does all the work
> (register's, invite's, tls conection...) on a DMZ behind a firewall.
>
> We want to move that to a new schema, with one Opensips (version 2.1)
> as a frontend that handles the tls connections (with a public ip) on
> the DMZ, and another Opensips (version 1.11) at the backend (with
> private ip), but we are not able to complete the invite signaling
> correctly. Register, message, options worked ok, but we have problems
> with the invite.
> The invite request arrives to the callee, and the OK answers arrives
> to the caller, but the caller does not send and ACK to this OK, so the
> callee keeps sending OK until it send a BYE because of timeout.
>
> Any idea of where is the problem or what am i doing wrong?? Any advice
> will be appreciated!!
>
> I attach the sip_trace log and the Opensips script of the frontend server:
>
> Caller: sip:u1iupzg...@jipubnx2ef.bell.enigmedia.eu
> Callee: d27p6ui...@jipubnx2ef.bell.enigmedia.eu
> Opensips frontend ip: internal -> 192.168.3.35, external -> 192.168.1.18
> Opensips backend ip: internal -> 192.168.2.6
>
>
>
>
>
>
> ___
> 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] Regarding siptrace module .

2016-04-29 Thread Benjamin Cropley
Sasmita,

Does you config LITERALLY say.. *listen=0.0.0.0:5506
 AS 54.211.x.y:5506 *??

..



On Fri, Apr 29, 2016 at 3:30 PM, Sasmita Panda  wrote:

> Then what IP will I set there . We are running like this and there is no
> problem we are facing yet .
>
> I cant put the public ip over there . If I will put the private ip then
> While forwarding HEP packets to any other IP it wont work .
>
> There is an option I will set only the port=5506 and so that it will work
> on all the interfaces (public and private ) .
>
> But giving the port , I am facing another problem . If there is more than
> one port then how will I give multiple ports ?
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
> On Fri, Apr 29, 2016 at 7:20 PM, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Sasmita,
>>
>> OpenSIPS does not support 0.0.0.0 IP. You need to have an explicit IP
>> there.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 29.04.2016 11:46, Sasmita Panda wrote:
>>
>> Hi All ,
>>
>>  I am trying to integrate HOMER with opensips . I am using opensips
>> as my capture agent and forwarding the HEP packets to the capture server
>> which is kamailio .
>>
>>   My opensips is running on AWS EMI . Where there is a public and a
>> private IP of the machine . So we used to writein the bellow format in the
>> opensips config .
>>
>>
>> *"listen=0.0.0.0:5506  AS 54.211.x.y:5506 " *
>>
>>Second part is the public ip , and that get used for publishing
>> any message out side . the first part is for internal use .
>> With this if I am trying to forward the HEP packet through siptrace
>> module , I had configured like bellow .
>>
>> #load siptrcae module for trace node ---
>> modparam("siptrace", "duplicate_uri", "sip:107.170.x.y:9060")
>> modparam("siptrace", "duplicate_with_hep", 1)
>> modparam("siptrace", "trace_to_database", 0)
>> modparam("siptrace", "trace_flag", 22)
>> modparam("siptrace", "trace_on", 1)
>> #HEPv2 == timestamp will be included to HEP header
>> modparam("siptrace", "hep_version", 2)
>>
>>In "107.170.x.y:9060" my kamailio is running . But when I am
>> trying to forward the packets its giving error .
>>
>> *"ERROR:siptrace:pipport2su: host <0.0.0.0> is not an IP"  . *
>>
>>   If I am changing my opensips config to *"listen=**54.211.x.y:5506
>> AS **54.211.x.y:5506 " *then its running fine .
>>
>>
>>   How will I get read of this error without changing my listen IP and
>> port line ?
>> Is there anything I can do in the siptrace module to use the public ip
>> only rather than using " *0.0.0.0* " ?
>>
>>
>> *Thanks & Regards*
>> *Sasmita Panda*
>> *Network Testing and Software Engineer*
>> *3CLogic , ph:07827611765*
>>
>>
>> ___
>> 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


Re: [OpenSIPS-Users] Problem using a shared usrloc table with NAT Ping (OPTIONS) on both opensips instances

2016-04-18 Thread Benjamin Cropley
Maybe you can use the nat_keepalive function of the nat_traversal module
instead of automatic keep alive checks?



On Mon, Apr 18, 2016 at 11:07 AM, Max Mühlbronner  wrote:

> I just found this bug which turned into a feature request (from 2012)
> someone else had exactly the same problem:
>
> https://sourceforge.net/p/opensips/feature-requests/99/
>
>
> @Bogdan, if for whatever reason the table is being shared by two Opensips
> instances (In my case it's not for balancing/failover at all but just for
> having the registrations for two servers in one central place for checking
> with external scripts/other optimizations...)
>
> Shouldn't each instance check whether it's his client or not before
> sending the keepalive/OPTIONS pings? This would fix the problems in
> scenarios like mine and i would guess there are a lot of people with the
> same problem: but they probably never noticed it, or never will.
>
>
> Best Regards
>
>
> Max M.
>
> On 07.04.2016 13:00, Max Mühlbronner wrote:
>
>> Hi,
>>
>> I experienced something weird: I got two servers sharing the same
>> location table. (usrloc module)
>>
>> My problem is: both servers got nathelper ping (OPTIONS) enabled. The
>> Opensips instance A has it's own clients and instance B also...
>>
>> Now as the location database/table is being shared by both servers the
>> NAT Pings from Instance B are also sent for clients which are registered on
>> instance A.
>>
>> I did not find any solution to tell Opensips A/B to only ping "their"
>> registered clients. The force_socket option of nathelper will not solve my
>> issue as both servers got their own socket/IP.
>>
>> Is there any workaround for my situation? (Nat ping does not take the
>> socket/IP of the registered client into account?)
>>
>>
>> Best 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


Re: [OpenSIPS-Users] Opensips Multi instance issue on SIP TLS

2016-04-08 Thread Benjamin Cropley
Feroze,

Are any other lines of logging printed just above it?

Ben

On Fri, Apr 8, 2016 at 3:48 PM, feroze waris 
wrote:

> Ben
>
> I have put the address of my interface
>
> Regards
> Feroze
>
> On Fri, Apr 8, 2016 at 7:39 PM, Benjamin Cropley <
> benjamin.crop...@gmail.com> wrote:
>
>> Feroze
>>
>> Can I just check.. in the listen variable have you put the address of
>> your interface or 1.2.3.4?
>>
>> You need to put your address.. not 1.2.3.4
>>
>> On Fri, Apr 8, 2016 at 3:30 PM, feroze waris 
>> wrote:
>>
>>> Hi ben
>>>
>>> As you said i have enabled the listen=tls:1.2.3.4:5061 on receiving
>>> proxy as well.  Now i am getting the following error in this case
>>>
>>> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:msg_send: send() for
>>> proto 3 failed
>>> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:t_forward_nonack:
>>> sending request failed
>>> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:w_t_relay:
>>> t_forward_nonack failed
>>>
>>>
>>> regards
>>> Feroze
>>>
>>> On Fri, Apr 8, 2016 at 1:15 PM, Benjamin Cropley <
>>> benjamin.crop...@gmail.com> wrote:
>>>
>>>> Feroze,
>>>>
>>>> I think you misunderstood :)
>>>>
>>>> I was saying, the URI has ;transport=tls, but the receiving server
>>>> probably doesn't have a port open to listen for it.. Don't remove this if
>>>> you want to use TLS, as by using rewrite() you're effectively breaking TLS
>>>> ;)
>>>>
>>>> In the documentation it says if you dont specify a listen= variable,
>>>> then it will listen on 'all interfaces'. It doesn't say whether it will
>>>> listen to UDP TCP and TLS. But I would guess it's possibly only UDP and 
>>>> TCP.
>>>>
>>>> Therefore, make sure on the servers receiving the packets that you
>>>> specifically set a tls listening interface with listen = tls:
>>>> 1.2.3.4:5061
>>>>
>>>> Good luck
>>>> Ben
>>>>
>>>>
>>>> On Fri, Apr 8, 2016 at 7:29 AM, feroze waris >>> > wrote:
>>>>
>>>>> Hi ben
>>>>>
>>>>> I have checked the traces and you were right that there was transport
>>>>> = tls in RURI when request forwards from load balancer  to 2 opensips
>>>>> instances . I have replaced the RURI using rewrite() function and removed
>>>>> the transport parameter but the issue remains and i am getting the same
>>>>> error
>>>>>
>>>>>
>>>>> regards
>>>>> Feroze
>>>>>
>>>>> On Thu, Apr 7, 2016 at 1:09 PM, Benjamin Cropley <
>>>>> benjamin.crop...@gmail.com> wrote:
>>>>>
>>>>>> Wild guess here, based on what I've read..
>>>>>>
>>>>>> It might be your request URI is explicitly declaring which protocol
>>>>>> to use, and OpenSIPS has no interface configured for that protocol.. eg.
>>>>>> ;transport=tls is added to the request URI but there's no listen = tls:
>>>>>> 1.2.3.4:5061
>>>>>>
>>>>>> I know it's tricky to look at a trace for TLS. But have a look at
>>>>>> http://wiki.snom.com/FAQ/How_to_decode_TLS_calls_using_wireshark
>>>>>>
>>>>>> Good luck
>>>>>> Ben
>>>>>>
>>>>>> On Wed, Apr 6, 2016 at 6:24 PM, feroze waris <
>>>>>> feroze.chaud...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi ben
>>>>>>>
>>>>>>> yes i am load balancing the Register and Invite request to two proxy
>>>>>>> servers using dispatcher module but all three servers (i.e load balncer 
>>>>>>> and
>>>>>>> two opensips servers) are sharing same opensips database.
>>>>>>> This issue is not occurring in UDP call but on TLS this error
>>>>>>> occurs.
>>>>>>>
>>>>>>> Regards
>>>>>>> Feroze
>>>>>>>
>>>>>>> On Wed, Apr 6, 2016 at 7:34 PM, Benjamin Cropley <
>>>>>>> benjamin.crop...@gmail.com> wrote:
>>>>>>>
>>>>&

Re: [OpenSIPS-Users] Opensips Multi instance issue on SIP TLS

2016-04-08 Thread Benjamin Cropley
Feroze

Can I just check.. in the listen variable have you put the address of your
interface or 1.2.3.4?

You need to put your address.. not 1.2.3.4

On Fri, Apr 8, 2016 at 3:30 PM, feroze waris 
wrote:

> Hi ben
>
> As you said i have enabled the listen=tls:1.2.3.4:5061 on receiving proxy
> as well.  Now i am getting the following error in this case
>
> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:msg_send: send() for
> proto 3 failed
> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:t_forward_nonack:
> sending request failed
> Apr  8 14:08:12 localhost OPENSIPS[623]: ERROR:tm:w_t_relay:
> t_forward_nonack failed
>
>
> regards
> Feroze
>
> On Fri, Apr 8, 2016 at 1:15 PM, Benjamin Cropley <
> benjamin.crop...@gmail.com> wrote:
>
>> Feroze,
>>
>> I think you misunderstood :)
>>
>> I was saying, the URI has ;transport=tls, but the receiving server
>> probably doesn't have a port open to listen for it.. Don't remove this if
>> you want to use TLS, as by using rewrite() you're effectively breaking TLS
>> ;)
>>
>> In the documentation it says if you dont specify a listen= variable, then
>> it will listen on 'all interfaces'. It doesn't say whether it will listen
>> to UDP TCP and TLS. But I would guess it's possibly only UDP and TCP.
>>
>> Therefore, make sure on the servers receiving the packets that you
>> specifically set a tls listening interface with listen = tls:1.2.3.4:5061
>>
>> Good luck
>> Ben
>>
>>
>> On Fri, Apr 8, 2016 at 7:29 AM, feroze waris 
>> wrote:
>>
>>> Hi ben
>>>
>>> I have checked the traces and you were right that there was transport =
>>> tls in RURI when request forwards from load balancer  to 2 opensips
>>> instances . I have replaced the RURI using rewrite() function and removed
>>> the transport parameter but the issue remains and i am getting the same
>>> error
>>>
>>>
>>> regards
>>> Feroze
>>>
>>> On Thu, Apr 7, 2016 at 1:09 PM, Benjamin Cropley <
>>> benjamin.crop...@gmail.com> wrote:
>>>
>>>> Wild guess here, based on what I've read..
>>>>
>>>> It might be your request URI is explicitly declaring which protocol to
>>>> use, and OpenSIPS has no interface configured for that protocol.. eg.
>>>> ;transport=tls is added to the request URI but there's no listen = tls:
>>>> 1.2.3.4:5061
>>>>
>>>> I know it's tricky to look at a trace for TLS. But have a look at
>>>> http://wiki.snom.com/FAQ/How_to_decode_TLS_calls_using_wireshark
>>>>
>>>> Good luck
>>>> Ben
>>>>
>>>> On Wed, Apr 6, 2016 at 6:24 PM, feroze waris >>> > wrote:
>>>>
>>>>> Hi ben
>>>>>
>>>>> yes i am load balancing the Register and Invite request to two proxy
>>>>> servers using dispatcher module but all three servers (i.e load balncer 
>>>>> and
>>>>> two opensips servers) are sharing same opensips database.
>>>>> This issue is not occurring in UDP call but on TLS this error occurs.
>>>>>
>>>>> Regards
>>>>> Feroze
>>>>>
>>>>> On Wed, Apr 6, 2016 at 7:34 PM, Benjamin Cropley <
>>>>> benjamin.crop...@gmail.com> wrote:
>>>>>
>>>>>> Feroze,
>>>>>>
>>>>>> Are you load balancing REGISTER *and *INVITE requests to different
>>>>>> nodes?
>>>>>>
>>>>>> If so, then unless you share location information between the
>>>>>> Registrars, then they wont all know where to route INVITEs.
>>>>>>
>>>>>> Ben
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 6, 2016 at 3:20 PM, feroze waris <
>>>>>> feroze.chaud...@gmail.com> wrote:
>>>>>>
>>>>>>> Hello
>>>>>>>
>>>>>>> I have one load balancer connected to 2 opensips server
>>>>>>> Request is balancing through dispatcher module on load balancer
>>>>>>> the problem is when Register request of B party lands on different
>>>>>>> server than that server at which A Party sends invite request the call
>>>>>>> drops and i am getting following error
>>>>>>> Apr  6 07

Re: [OpenSIPS-Users] Opensips SIP trunk call handling

2016-04-08 Thread Benjamin Cropley
No problem.

If that's all you want to do, then just include it within a route{} block
and you should be good to go.

I will say, of that's all you want to do, when you 'load balance the invite
to FS', FS will respond with a 100 trying - and at the minute your script
will reply to FS with a 405..

Perhaps you should spend some time reading about SIP, as it'll help you
more easily implement stuff on OpenSIPS

On Fri, Apr 8, 2016 at 10:12 AM, Francjos <35...@heb.be> wrote:

> Thank you for redirecting me to the tutorial. I picked up a part of what i
> need,i think i can adjust it to my needs but the problem i still have is
> where to include the logic of load balancing in opensips.cfg. The logic is
> the following:
>
>  if (is_method("INVITE")) {
> if (!load_balance("1","pstn","1")) {
> send_reply("503","Service Unavailable");
> exit;
> }
> }
> else if (is_method("REGISTER")) {
> if (!ds_select_dst("1", "0")) {
> send_reply("503","Service Unavailable");
> exit;
> }
> }
> else {
> send_reply("405","Method Not Allowed");
> exit;
> }
>
> So that Opensips can routes calls to the write Freeswitch.
>
> Thanks again.
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602558.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] Opensips SIP trunk call handling

2016-04-08 Thread Benjamin Cropley
Franjos,

Have you read
http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration
?

Versions are a little out of date, but I think it looks correct still

Ben

On Fri, Apr 8, 2016 at 9:27 AM, Francjos <35...@heb.be> wrote:

> Thanks .Can you please give me more details on how i have to proceed.
> Thanks again
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602556.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] Opensips Multi instance issue on SIP TLS

2016-04-08 Thread Benjamin Cropley
Feroze,

I think you misunderstood :)

I was saying, the URI has ;transport=tls, but the receiving server probably
doesn't have a port open to listen for it.. Don't remove this if you want
to use TLS, as by using rewrite() you're effectively breaking TLS ;)

In the documentation it says if you dont specify a listen= variable, then
it will listen on 'all interfaces'. It doesn't say whether it will listen
to UDP TCP and TLS. But I would guess it's possibly only UDP and TCP.

Therefore, make sure on the servers receiving the packets that you
specifically set a tls listening interface with listen = tls:1.2.3.4:5061

Good luck
Ben


On Fri, Apr 8, 2016 at 7:29 AM, feroze waris 
wrote:

> Hi ben
>
> I have checked the traces and you were right that there was transport =
> tls in RURI when request forwards from load balancer  to 2 opensips
> instances . I have replaced the RURI using rewrite() function and removed
> the transport parameter but the issue remains and i am getting the same
> error
>
>
> regards
> Feroze
>
> On Thu, Apr 7, 2016 at 1:09 PM, Benjamin Cropley <
> benjamin.crop...@gmail.com> wrote:
>
>> Wild guess here, based on what I've read..
>>
>> It might be your request URI is explicitly declaring which protocol to
>> use, and OpenSIPS has no interface configured for that protocol.. eg.
>> ;transport=tls is added to the request URI but there's no listen = tls:
>> 1.2.3.4:5061
>>
>> I know it's tricky to look at a trace for TLS. But have a look at
>> http://wiki.snom.com/FAQ/How_to_decode_TLS_calls_using_wireshark
>>
>> Good luck
>> Ben
>>
>> On Wed, Apr 6, 2016 at 6:24 PM, feroze waris 
>> wrote:
>>
>>> Hi ben
>>>
>>> yes i am load balancing the Register and Invite request to two proxy
>>> servers using dispatcher module but all three servers (i.e load balncer and
>>> two opensips servers) are sharing same opensips database.
>>> This issue is not occurring in UDP call but on TLS this error occurs.
>>>
>>> Regards
>>> Feroze
>>>
>>> On Wed, Apr 6, 2016 at 7:34 PM, Benjamin Cropley <
>>> benjamin.crop...@gmail.com> wrote:
>>>
>>>> Feroze,
>>>>
>>>> Are you load balancing REGISTER *and *INVITE requests to different
>>>> nodes?
>>>>
>>>> If so, then unless you share location information between the
>>>> Registrars, then they wont all know where to route INVITEs.
>>>>
>>>> Ben
>>>>
>>>>
>>>> On Wed, Apr 6, 2016 at 3:20 PM, feroze waris >>> > wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> I have one load balancer connected to 2 opensips server
>>>>> Request is balancing through dispatcher module on load balancer
>>>>> the problem is when Register request of B party lands on different
>>>>> server than that server at which A Party sends invite request the call
>>>>> drops and i am getting following error
>>>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:update_uac_dst:
>>>>> failed to fwd to af 2, proto 3  (no corresponding listening socket)
>>>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:t_forward_nonack:
>>>>> failure to add branches
>>>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:w_t_relay:
>>>>> t_forward_nonack failed
>>>>>
>>>>> I am using Openisps version 2.1.1 and using TLS on it
>>>>>
>>>>>
>>>>> Regards
>>>>> Feroze
>>>>>
>>>>> ___
>>>>> 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] Opensips Multi instance issue on SIP TLS

2016-04-07 Thread Benjamin Cropley
Wild guess here, based on what I've read..

It might be your request URI is explicitly declaring which protocol to use,
and OpenSIPS has no interface configured for that protocol.. eg.
;transport=tls is added to the request URI but there's no listen = tls:
1.2.3.4:5061

I know it's tricky to look at a trace for TLS. But have a look at
http://wiki.snom.com/FAQ/How_to_decode_TLS_calls_using_wireshark

Good luck
Ben

On Wed, Apr 6, 2016 at 6:24 PM, feroze waris 
wrote:

> Hi ben
>
> yes i am load balancing the Register and Invite request to two proxy
> servers using dispatcher module but all three servers (i.e load balncer and
> two opensips servers) are sharing same opensips database.
> This issue is not occurring in UDP call but on TLS this error occurs.
>
> Regards
> Feroze
>
> On Wed, Apr 6, 2016 at 7:34 PM, Benjamin Cropley <
> benjamin.crop...@gmail.com> wrote:
>
>> Feroze,
>>
>> Are you load balancing REGISTER *and *INVITE requests to different
>> nodes?
>>
>> If so, then unless you share location information between the Registrars,
>> then they wont all know where to route INVITEs.
>>
>> Ben
>>
>>
>> On Wed, Apr 6, 2016 at 3:20 PM, feroze waris 
>> wrote:
>>
>>> Hello
>>>
>>> I have one load balancer connected to 2 opensips server
>>> Request is balancing through dispatcher module on load balancer
>>> the problem is when Register request of B party lands on different
>>> server than that server at which A Party sends invite request the call
>>> drops and i am getting following error
>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:update_uac_dst: failed
>>> to fwd to af 2, proto 3  (no corresponding listening socket)
>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:t_forward_nonack:
>>> failure to add branches
>>> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:w_t_relay:
>>> t_forward_nonack failed
>>>
>>> I am using Openisps version 2.1.1 and using TLS on it
>>>
>>>
>>> Regards
>>> Feroze
>>>
>>> ___
>>> 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] Opensips Multi instance issue on SIP TLS

2016-04-06 Thread Benjamin Cropley
Feroze,

Are you load balancing REGISTER *and *INVITE requests to different nodes?

If so, then unless you share location information between the Registrars,
then they wont all know where to route INVITEs.

Ben


On Wed, Apr 6, 2016 at 3:20 PM, feroze waris 
wrote:

> Hello
>
> I have one load balancer connected to 2 opensips server
> Request is balancing through dispatcher module on load balancer
> the problem is when Register request of B party lands on different server
> than that server at which A Party sends invite request the call drops and i
> am getting following error
> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:update_uac_dst: failed
> to fwd to af 2, proto 3  (no corresponding listening socket)
> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:t_forward_nonack:
> failure to add branches
> Apr  6 07:58:31 localhost OPENSIP[1793]: ERROR:tm:w_t_relay:
> t_forward_nonack failed
>
> I am using Openisps version 2.1.1 and using TLS on it
>
>
> Regards
> Feroze
>
> ___
> 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