Re: [OpenSIPS-Users] OpenSIPs and Google talk

2012-07-25 Thread pa...@eremina.net
Are you sure that it is possible?

2012/7/26 goup2010 

> Hello,
>
> How to setup OpenSIPs to send calls to GoogleTalk?
>
> Thanks.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpproxy

2012-07-25 Thread dpa
Hello Bogdan

 

http://files.mail.ru/7HLCXK - here you can get faxcall and rtpproxy
communication.

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Wednesday, July 25, 2012 8:40 AM
To: dpa
Cc: 'OpenSIPS users mailling list'
Subject: Re: [OpenSIPS-Users] rtpproxy

 

Denis, if you are connecting to rtpproxy via an UDP connector, simply use
ngrep (on the configured port). If using a unixsock connector, switch to a
UDP one (rtpproxy_sock = udp:localhost:8899 and do a similar change in the
rtpproxy command line).

Regards,



Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 07/23/2012 12:02 PM, dpa wrote: 

Hello

 

To speak the truth I do not know how to do it.  

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Monday, July 23, 2012 12:54 PM
To: dpa
Cc: 'OpenSIPS users mailling list'
Subject: Re: [OpenSIPS-Users] rtpproxy

 

Hi Denis,

could you make a capture to see the comunication between opensips and
rtproxy ?

Regards,




Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 07/20/2012 01:11 PM, dpa wrote: 

Hello Bogdan

 

I am very sorry, last time I gave wrong information about the problem. Only
with "r" flag there is no fax stream through rtpproxy (last email I said
that everything is OK, but I made wrong test).

Here http://files.mail.ru/XF4J0L 

Is tcpdump of unsuccessful call.

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Tuesday, July 17, 2012 11:44 AM
To: dpa
Cc: 'OpenSIPS users mailling list'
Subject: Re: [OpenSIPS-Users] rtpproxy

 

Hi ,

Try only with "r" then.

Regards,





Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 07/17/2012 06:26 AM, dpa wrote: 

Hello Bogdan

 

I applied "r" and "a" flags and problem with fax disappeared, but I got
another problem. After I applied "ra" clients behind nat cannot hear caller
or callee (never mind who makes call).

Rtpproxy is working, i.e. it changes SDP body of INVITE and replies, but
there is no rtp stream.

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Thursday, July 12, 2012 7:01 PM
To: OpenSIPS users mailling list
Cc: dpa
Subject: Re: [OpenSIPS-Users] rtpproxy

 

Hi,

According to your trace the RTPproxy is properly inserted during the
re-INVITE. Try to put the "r" and "a" flags when using RTPproxy from script.

Regards,







Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 07/11/2012 04:32 PM, dpa wrote: 

Hello Bogdan

 

Thank you for answering. 

My case is 2).

First I have audio stream which is replaced later by another fax stream.

Here http://files.mail.ru/8BYVCQ

is a tcpdump of unsuccessful call where you can see that rtpproxy doesn`t
proxy fax stream.

Rtpproxy (as an Opensips) is located on 213.170.100.150

 

From: users-boun...@lists.opensips.org
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, July 11, 2012 4:43 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] rtpproxy

 

Hi,

You may have 2 cases, not sure which is yours:

1) the 2 media sessions are in parallel in the same calls (you can have 2
-or more- RTP streams in the same SIP session). In this case, RTPproxy will
take care automatically of each RTP stream)

2) you have first one audio stream which is replaced by another FAX stream,
via a re-INVITE - in this case, if you the normal offer / answer for
RTPproxy also for the re-INVITE, it should be ok.

Regards,







Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 07/11/2012 11:42 AM, dpa wrote: 

Описание: cid:part1.00030104.06050802@opensips.org

Hello

 

There is one question about rtpproxy working.

If some UA using 2 different UDP ports for sending RTP and t38 fax packets
during one call session, whether rtpproxy is working (proxy both UDP
streams) in such case? 

 

Thank you for any help

 

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


Re: [OpenSIPS-Users] PBX sending calls to Opensips

2012-07-25 Thread Ali Pey
This would work too. Here though you do a db query for each call and can
slow down the performance if that's important to you. Examining usernames'
patterns can be faster.

You can also use the registered function instead of a db query:

if (registered("location","$fu")) {
xlog("caller is registered\n");
}

http://www.opensips.org/html/docs/modules/1.8.x/registrar.html#id293162

Regards,
Ali Pey

On Wed, Jul 25, 2012 at 4:23 PM, Schneur Rosenberg  wrote:

> I already did something similar look at snippet bellow so any call
> coming from a IP thats registered to our server will always do
> proxy_authorize(), other calls will assume that its a unauthenticated
> DID call or a call going to a local call
>
>  if (!(method=="REGISTER"))
> {
> avp_db_query("select username from location where
> contact regexp '$si' or received like
> 'sip:$si%'","$avp(is_registered)");
> }
> if (!(method=="REGISTER") && avp_check("$avp(is_registered)",
> "gt/1/g"))
> {
>if(!is_from_gw())
> {
> if (!proxy_authorize("sosglobal", "subscriber"))
> {
> append_hf("P-hint: Proxy auth failed\r\n");
> proxy_challenge("sosglobal", "0");
> exit;
> }
>
>
> }
>
>
> On Wed, Jul 25, 2012 at 8:48 PM, Ali Pey  wrote:
> > Schneur,
> >
> > You can examine the src_ip first to see if the call if from your pbx or
> not.
> > Then you can also examine to request-uri to distinguish the call between
> a
> > pstn call or a sip client - assuming your sip clients have a different
> sip
> > address/pattern than pstn numbers. Things like this:
> >
> > if ( src_ip == pbx1_ip || src_ip == pbx2_ip ){
> > # From PBXs
> > }
> >
> > if ($rU=~"^\+?[0-9]{3,18}") {
> > # request-uri is for a PSTN number, send the message to whatever
> > route(1)
> > }
> >
> > Basically you need to find a difference between the call attributes and
> > examine that, it can be the src_ip, ruri pattern, etc.
> >
> > Regards,
> > Ali Pey
> >
> > On Wed, Jul 25, 2012 at 9:41 AM, Schneur Rosenberg
> >  wrote:
> >>
> >> check_source_address won't work for me, my clients are behind Dynamic
> >> ip's, there is no way for me to know in advance their ip address
> >>
> >> On Mon, Jul 23, 2012 at 8:55 PM, Brett Nemeroff 
> >> wrote:
> >> > Scot,
> >> > the function "is_from_local" uses the From URI and as such, will not
> >> > work if
> >> > the originator mangles the from uri (as in the case of your example
> >> > below).
> >> >
> >> > A more secure way to do this that may suit your needs is to use the
> >> > permissions module and actually check the source IP of the request:
> >> >
> >> >
> >> >
> http://www.opensips.org/html/docs/modules/1.8.x/permissions.html#id293503
> >> >
> >> > Look at the "check_source_address" and or "get_source_group". Either
> of
> >> > these can compare the source IP of the originator to a known list.
> From
> >> > there, you can perform script logic based on where the request came
> >> > from.
> >> >
> >> > Hope that helps!
> >> > -Brett
> >> >
> >> >
> >> > On Mon, Jul 23, 2012 at 11:38 AM, Schneur Rosenberg
> >> >  wrote:
> >> >>
> >> >> I'm using opensips as a registrar server and as a loadbalancer, all
> >> >> phones are registered to opensips and all incoming and outgoing calls
> >> >> go to Asterisk boxes via load balancing, therefore I have 3 kinds of
> >> >> calls going to opensips,
> >> >> 1) outgoing calls coming from one of the phones Registered to
> opensips,
> >> >> 2) incoming calls (we allow all incoming calls no matter from where
> >> >> they come, I call them unauthenticated DID)
> >> >> 3) Calls ringing to a phone registered to opensips, the Asterisk
> boxes
> >> >> will send the calls to the phone either after getting a call from a
> >> >> DID, or when a internal user wants to call another internal user
> >> >>
> >> >> The way I differentiate between the calls is  I do a  if
> >> >> (!(method=="REGISTER") && is_from_local()) this will check
> credentials
> >> >> and send call to asterisk to process outgoing call, then I do a  else
> >> >> if ((method=="INVITE"))  which will check if the call is going to a
> >> >> local phone by doing  if (!lookup("location", "m")) if that fails
> that
> >> >> it assumes its a incoming did call, and it will send it to asterisk
> >> >> with a prefix so asterisk knows its a unauthenticated incoming call,
> >> >> bellow I pasted a skeleton of the code I'm using.
> >> >>
> >> >> Everything worked fine, until I connected a PBX to my opensips, then
> >> >> the from came in with the address of the PBX and the  is_from_local()
> >> >> test was not true, so it did not work, I had the same problem when
> >> >> sending a call from a SPA3000 and blocking caller id, in that case it
> >> >> also obscured the from address, as follows "From: Anonymous
> >> >> ;tag=ea

Re: [OpenSIPS-Users] PBX sending calls to Opensips

2012-07-25 Thread Schneur Rosenberg
I already did something similar look at snippet bellow so any call
coming from a IP thats registered to our server will always do
proxy_authorize(), other calls will assume that its a unauthenticated
DID call or a call going to a local call

 if (!(method=="REGISTER"))
{
avp_db_query("select username from location where
contact regexp '$si' or received like
'sip:$si%'","$avp(is_registered)");
}
if (!(method=="REGISTER") && avp_check("$avp(is_registered)", "gt/1/g"))
{
   if(!is_from_gw())
{
if (!proxy_authorize("sosglobal", "subscriber"))
{
append_hf("P-hint: Proxy auth failed\r\n");
proxy_challenge("sosglobal", "0");
exit;
}


}


On Wed, Jul 25, 2012 at 8:48 PM, Ali Pey  wrote:
> Schneur,
>
> You can examine the src_ip first to see if the call if from your pbx or not.
> Then you can also examine to request-uri to distinguish the call between a
> pstn call or a sip client - assuming your sip clients have a different sip
> address/pattern than pstn numbers. Things like this:
>
> if ( src_ip == pbx1_ip || src_ip == pbx2_ip ){
> # From PBXs
> }
>
> if ($rU=~"^\+?[0-9]{3,18}") {
> # request-uri is for a PSTN number, send the message to whatever
> route(1)
> }
>
> Basically you need to find a difference between the call attributes and
> examine that, it can be the src_ip, ruri pattern, etc.
>
> Regards,
> Ali Pey
>
> On Wed, Jul 25, 2012 at 9:41 AM, Schneur Rosenberg
>  wrote:
>>
>> check_source_address won't work for me, my clients are behind Dynamic
>> ip's, there is no way for me to know in advance their ip address
>>
>> On Mon, Jul 23, 2012 at 8:55 PM, Brett Nemeroff 
>> wrote:
>> > Scot,
>> > the function "is_from_local" uses the From URI and as such, will not
>> > work if
>> > the originator mangles the from uri (as in the case of your example
>> > below).
>> >
>> > A more secure way to do this that may suit your needs is to use the
>> > permissions module and actually check the source IP of the request:
>> >
>> >
>> > http://www.opensips.org/html/docs/modules/1.8.x/permissions.html#id293503
>> >
>> > Look at the "check_source_address" and or "get_source_group". Either of
>> > these can compare the source IP of the originator to a known list. From
>> > there, you can perform script logic based on where the request came
>> > from.
>> >
>> > Hope that helps!
>> > -Brett
>> >
>> >
>> > On Mon, Jul 23, 2012 at 11:38 AM, Schneur Rosenberg
>> >  wrote:
>> >>
>> >> I'm using opensips as a registrar server and as a loadbalancer, all
>> >> phones are registered to opensips and all incoming and outgoing calls
>> >> go to Asterisk boxes via load balancing, therefore I have 3 kinds of
>> >> calls going to opensips,
>> >> 1) outgoing calls coming from one of the phones Registered to opensips,
>> >> 2) incoming calls (we allow all incoming calls no matter from where
>> >> they come, I call them unauthenticated DID)
>> >> 3) Calls ringing to a phone registered to opensips, the Asterisk boxes
>> >> will send the calls to the phone either after getting a call from a
>> >> DID, or when a internal user wants to call another internal user
>> >>
>> >> The way I differentiate between the calls is  I do a  if
>> >> (!(method=="REGISTER") && is_from_local()) this will check credentials
>> >> and send call to asterisk to process outgoing call, then I do a  else
>> >> if ((method=="INVITE"))  which will check if the call is going to a
>> >> local phone by doing  if (!lookup("location", "m")) if that fails that
>> >> it assumes its a incoming did call, and it will send it to asterisk
>> >> with a prefix so asterisk knows its a unauthenticated incoming call,
>> >> bellow I pasted a skeleton of the code I'm using.
>> >>
>> >> Everything worked fine, until I connected a PBX to my opensips, then
>> >> the from came in with the address of the PBX and the  is_from_local()
>> >> test was not true, so it did not work, I had the same problem when
>> >> sending a call from a SPA3000 and blocking caller id, in that case it
>> >> also obscured the from address, as follows "From: Anonymous
>> >> ;tag=ea3ee097cd947aeeo0." , the only
>> >> reference of the user or domain was in the RPID field  and calls did
>> >> not go through.
>> >>
>> >> Is there anyway to check if a source IP is registered to our system
>> >> and only then it should send a 407? this way if I have a BPX
>> >> registered it will then ask for credentials, all others it will assume
>> >> that either a call to the local phone or unauthenticated DID, I
>> >> understand that I wont be able to send calls to the system only if
>> >> registration was done before, but I have no problem with that,  I
>> >> could do it with avp_db_query() on the subscriber table, but I want to
>> >> know if there is a better way.
>> >>
>> >>

[OpenSIPS-Users] OpenSIPs and Google talk

2012-07-25 Thread goup2010
Hello,

How to setup OpenSIPs to send calls to GoogleTalk?

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


Re: [OpenSIPS-Users] PBX sending calls to Opensips

2012-07-25 Thread Ali Pey
Schneur,

You can examine the src_ip first to see if the call if from your pbx or
not. Then you can also examine to request-uri to distinguish the call
between a pstn call or a sip client - assuming your sip clients have a
different sip address/pattern than pstn numbers. Things like this:

if ( src_ip == pbx1_ip || src_ip == pbx2_ip ){
# From PBXs
}

if ($rU=~"^\+?[0-9]{3,18}") {
# request-uri is for a PSTN number, send the message to whatever
route(1)
}

Basically you need to find a difference between the call attributes and
examine that, it can be the src_ip, ruri pattern, etc.

Regards,
Ali Pey

On Wed, Jul 25, 2012 at 9:41 AM, Schneur Rosenberg  wrote:

> check_source_address won't work for me, my clients are behind Dynamic
> ip's, there is no way for me to know in advance their ip address
>
> On Mon, Jul 23, 2012 at 8:55 PM, Brett Nemeroff 
> wrote:
> > Scot,
> > the function "is_from_local" uses the From URI and as such, will not
> work if
> > the originator mangles the from uri (as in the case of your example
> below).
> >
> > A more secure way to do this that may suit your needs is to use the
> > permissions module and actually check the source IP of the request:
> >
> >
> http://www.opensips.org/html/docs/modules/1.8.x/permissions.html#id293503
> >
> > Look at the "check_source_address" and or "get_source_group". Either of
> > these can compare the source IP of the originator to a known list. From
> > there, you can perform script logic based on where the request came from.
> >
> > Hope that helps!
> > -Brett
> >
> >
> > On Mon, Jul 23, 2012 at 11:38 AM, Schneur Rosenberg
> >  wrote:
> >>
> >> I'm using opensips as a registrar server and as a loadbalancer, all
> >> phones are registered to opensips and all incoming and outgoing calls
> >> go to Asterisk boxes via load balancing, therefore I have 3 kinds of
> >> calls going to opensips,
> >> 1) outgoing calls coming from one of the phones Registered to opensips,
> >> 2) incoming calls (we allow all incoming calls no matter from where
> >> they come, I call them unauthenticated DID)
> >> 3) Calls ringing to a phone registered to opensips, the Asterisk boxes
> >> will send the calls to the phone either after getting a call from a
> >> DID, or when a internal user wants to call another internal user
> >>
> >> The way I differentiate between the calls is  I do a  if
> >> (!(method=="REGISTER") && is_from_local()) this will check credentials
> >> and send call to asterisk to process outgoing call, then I do a  else
> >> if ((method=="INVITE"))  which will check if the call is going to a
> >> local phone by doing  if (!lookup("location", "m")) if that fails that
> >> it assumes its a incoming did call, and it will send it to asterisk
> >> with a prefix so asterisk knows its a unauthenticated incoming call,
> >> bellow I pasted a skeleton of the code I'm using.
> >>
> >> Everything worked fine, until I connected a PBX to my opensips, then
> >> the from came in with the address of the PBX and the  is_from_local()
> >> test was not true, so it did not work, I had the same problem when
> >> sending a call from a SPA3000 and blocking caller id, in that case it
> >> also obscured the from address, as follows "From: Anonymous
> >> ;tag=ea3ee097cd947aeeo0." , the only
> >> reference of the user or domain was in the RPID field  and calls did
> >> not go through.
> >>
> >> Is there anyway to check if a source IP is registered to our system
> >> and only then it should send a 407? this way if I have a BPX
> >> registered it will then ask for credentials, all others it will assume
> >> that either a call to the local phone or unauthenticated DID, I
> >> understand that I wont be able to send calls to the system only if
> >> registration was done before, but I have no problem with that,  I
> >> could do it with avp_db_query() on the subscriber table, but I want to
> >> know if there is a better way.
> >>
> >> If there is there a better solution then the above solution please let
> me
> >> know
> >>
> >> if (!(method=="REGISTER") && is_from_local())
> >> {
> >>#check credentials
> >> }
> >>  else if ((method=="INVITE"))   #unathenticated did or call
> >> going to phone registered to opensips
> >> {
> >>
> >> if (!lookup("location", "m"))   #calling local phone
> >> {
> >>  #send to phone registered to opensips
> >> }
> >> else
> >> {
> >>  #incoming did send call to asterisk to process
> >> }
> >> }
> >> else
> >> {
> >>#outgoing calls route continues here
> >> }
> >> ...
> >>
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> >
> > ___

Re: [OpenSIPS-Users] RTP Proxy module.

2012-07-25 Thread Sebastian Sastre
Hello,

>
> Im trying to configure RTP proxy for the following scenario.
>
> I have opensips in the border server between my public ipaddress and my
> internal. So that ETH0 has public IP and eth1 has private.
>
> I set mhomed=1 so that packets are forwarded correctly and the call does
> connect.
>
> First of all, is this possible with rtpproxy and opensips? I know
> Mediaproxy is not able to bind like that.
>
> The RTP proxy command I'm using is
>
> rtpproxy -f -l PUBLIC-IP/192.168.3.18 -s udp:127.0.0.1:12221 -F
>
> Opensips Config looks like this.
>
> if (is_method("INVITE")){
> ##xlog("-> Route(0) - New Incomming Invite request
>  to [$ru]\n");
> if (check_source_address("1")) {
> record_route();
> create_dialog();
>
> if (load_balance("1","channels")){
>
> # dst URI points to the new
> destination
> #ahora le sacamos el prefijo
>
> dp_translate("1","$ruri.user/$ruri.user");
>
> #xlog("-> Route(0) - $ruri.user
> going to call to $du\n");
> $ru = "sip:" + $rU + "@" + $dd +
> ":" + $dp;
> $avp(dst) = $dd;
>
> engage_rtp_proxy("ie");
> route(1);
> }
> else{
>   xlog("-> Route(0) - Did not find
> available GWs\n");
> sl_send_reply("500", "All is
> full");
> }
> }
> else{
>   xlog("-> IP not in address table \n");
> sl_send_reply("503","IP not in address
> table");
> }
> }
>
> When is tart open sips, it connects to RTP Proxy with no problems.
>
> When the invite is sent out to the internal ip it correctly sets c= on the
> body but i don't see rtpproxy doing anything nor i get audio in any
> direction.
>
> rtpproxy leaves no logs, or errors or anything.
>
> am i doing something wrong here?
>
> thanks
>
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] PBX sending calls to Opensips

2012-07-25 Thread Schneur Rosenberg
check_source_address won't work for me, my clients are behind Dynamic
ip's, there is no way for me to know in advance their ip address

On Mon, Jul 23, 2012 at 8:55 PM, Brett Nemeroff  wrote:
> Scot,
> the function "is_from_local" uses the From URI and as such, will not work if
> the originator mangles the from uri (as in the case of your example below).
>
> A more secure way to do this that may suit your needs is to use the
> permissions module and actually check the source IP of the request:
>
> http://www.opensips.org/html/docs/modules/1.8.x/permissions.html#id293503
>
> Look at the "check_source_address" and or "get_source_group". Either of
> these can compare the source IP of the originator to a known list. From
> there, you can perform script logic based on where the request came from.
>
> Hope that helps!
> -Brett
>
>
> On Mon, Jul 23, 2012 at 11:38 AM, Schneur Rosenberg
>  wrote:
>>
>> I'm using opensips as a registrar server and as a loadbalancer, all
>> phones are registered to opensips and all incoming and outgoing calls
>> go to Asterisk boxes via load balancing, therefore I have 3 kinds of
>> calls going to opensips,
>> 1) outgoing calls coming from one of the phones Registered to opensips,
>> 2) incoming calls (we allow all incoming calls no matter from where
>> they come, I call them unauthenticated DID)
>> 3) Calls ringing to a phone registered to opensips, the Asterisk boxes
>> will send the calls to the phone either after getting a call from a
>> DID, or when a internal user wants to call another internal user
>>
>> The way I differentiate between the calls is  I do a  if
>> (!(method=="REGISTER") && is_from_local()) this will check credentials
>> and send call to asterisk to process outgoing call, then I do a  else
>> if ((method=="INVITE"))  which will check if the call is going to a
>> local phone by doing  if (!lookup("location", "m")) if that fails that
>> it assumes its a incoming did call, and it will send it to asterisk
>> with a prefix so asterisk knows its a unauthenticated incoming call,
>> bellow I pasted a skeleton of the code I'm using.
>>
>> Everything worked fine, until I connected a PBX to my opensips, then
>> the from came in with the address of the PBX and the  is_from_local()
>> test was not true, so it did not work, I had the same problem when
>> sending a call from a SPA3000 and blocking caller id, in that case it
>> also obscured the from address, as follows "From: Anonymous
>> ;tag=ea3ee097cd947aeeo0." , the only
>> reference of the user or domain was in the RPID field  and calls did
>> not go through.
>>
>> Is there anyway to check if a source IP is registered to our system
>> and only then it should send a 407? this way if I have a BPX
>> registered it will then ask for credentials, all others it will assume
>> that either a call to the local phone or unauthenticated DID, I
>> understand that I wont be able to send calls to the system only if
>> registration was done before, but I have no problem with that,  I
>> could do it with avp_db_query() on the subscriber table, but I want to
>> know if there is a better way.
>>
>> If there is there a better solution then the above solution please let me
>> know
>>
>> if (!(method=="REGISTER") && is_from_local())
>> {
>>#check credentials
>> }
>>  else if ((method=="INVITE"))   #unathenticated did or call
>> going to phone registered to opensips
>> {
>>
>> if (!lookup("location", "m"))   #calling local phone
>> {
>>  #send to phone registered to opensips
>> }
>> else
>> {
>>  #incoming did send call to asterisk to process
>> }
>> }
>> else
>> {
>>#outgoing calls route continues here
>> }
>> ...
>>
>> ___
>> 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] call duration problem

2012-07-25 Thread Stefano Pisani

That seems to be fine.
Are you sure that the call duration are more than OK-BYE time?

s

Il 25/07/2012 14:02, Francisco Franco ha scritto:

I am using this options

/# - acc params -

modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)

modparam("acc", "detect_direction", 0)

modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)

modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_url", "mysql://opensips:***@localhost/opensips")
modparam("acc", "aaa_url", "radius:/etc/opensips/radius/client.conf")
modparam("acc", "aaa_flag", 1)
modparam("acc", "aaa_missed_flag", 2)
modparam("acc", "aaa_extra", "User-Name=$Au; \
 Calling-Station-Id=$from; \
 Called-Station-Id=$to; \
Sip-Translated-Request-URI=$ru; \
 Sip-RPid=$avp(s:rpid); \
 Source-IP=$avp(s:source_ip); \
Source-Port=$avp(s:source_port); \
SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
Canonical-URI=$avp(s:can_uri); \
Billing-Party=$avp(s:billing_party); \
Divert-Reason=$avp(s:divert_reason); \
 User-Agent=$hdr(user-agent); \
 Contact=$hdr(contact); \
 Event=$hdr(event); \
 ENUM-TLD=$avp(s:enum_tld)")/
___
Francisco Franco Gallego
Analista Programador
Grupo IdeaSoluciones.com
Calle Jerónimo Santa Fe, 80 1º
30800 Lorca (Murcia) España
Tlf: +34 968 970 037
El 24/07/12 20:53, Stefano Pisani escribió:

Try using this option

modparam("acc", "early_media", 0)

regards,
s

Il 24/07/2012 19:55, Francisco Franco ha scritto:

Hi,

I have opensips 1.6 runing with mediaproxy and have a  problem with 
call duration accounting.


The session duration that is stored in database is total time from 
call start ringing, but for billing correctly, time should be start 
when callee pick up.


How can i solve it?

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




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


Re: [OpenSIPS-Users] call duration problem

2012-07-25 Thread Francisco Franco

I am using this options

/# - acc params -

modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)

modparam("acc", "detect_direction", 0)

modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)

modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_url", "mysql://opensips:***@localhost/opensips")
modparam("acc", "aaa_url", "radius:/etc/opensips/radius/client.conf")
modparam("acc", "aaa_flag", 1)
modparam("acc", "aaa_missed_flag", 2)
modparam("acc", "aaa_extra", "User-Name=$Au; \
 Calling-Station-Id=$from; \
 Called-Station-Id=$to; \
 Sip-Translated-Request-URI=$ru; \
 Sip-RPid=$avp(s:rpid); \
 Source-IP=$avp(s:source_ip); \
Source-Port=$avp(s:source_port); \
SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
 Canonical-URI=$avp(s:can_uri); \
Billing-Party=$avp(s:billing_party); \
Divert-Reason=$avp(s:divert_reason); \
 User-Agent=$hdr(user-agent); \
 Contact=$hdr(contact); \
 Event=$hdr(event); \
 ENUM-TLD=$avp(s:enum_tld)")/

___
Francisco Franco Gallego
Analista Programador
Grupo IdeaSoluciones.com
Calle Jerónimo Santa Fe, 80 1º
30800 Lorca (Murcia) España
Tlf: +34 968 970 037

El 24/07/12 20:53, Stefano Pisani escribió:

Try using this option

modparam("acc", "early_media", 0)

regards,
s

Il 24/07/2012 19:55, Francisco Franco ha scritto:

Hi,

I have opensips 1.6 runing with mediaproxy and have a  problem with 
call duration accounting.


The session duration that is stored in database is total time from 
call start ringing, but for billing correctly, time should be start 
when callee pick up.


How can i solve it?

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


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