[OpenSIPS-Users] Custom E164 Dialplan on CDRTool

2011-08-30 Thread Mike Tesliuk
Hello Guys,


Im trying to change the E164 rule used by cdrtool to charge my calls (is a
test enviroment), i create on library/cdr_generic.php the class E164_Brazil

Below the code that i insert on cdr_generic


class E164_Brazil extends E164 {
function E164_Brazil ($intAccessCode='00',
$natAccessCode='55[1-9][1-9]',$CountryCode='',$ENUMtldRegexp=([2-9]{7,}))
{
$this-regexp_international =
/^.$intAccessCode.([1-9][0-9]{5,})\$/;
$this-regexp_national  =
/^.$natAccessCode.([2-9][0-9]{6,})\$/;
$this-CountryCode  = trim($CountryCode);
$this-ENUMtldRegexp= trim($ENUMtldRegexp);
}
}

Just to jusitfy the Brazil country code is 55 and our area codes are
[1-9][1-9], later we have the number with 8 digits start from 2


I put on my global.inc datasource (opensips section) the value

E164_class = E164_Brazil,

i  reload cdrtool, i restart cdrtool, but all my calls are not billed (all
are on-net to cdrtool)

Id *Start Time* *Flow* *SIP Caller* *Location* *Sip Proxy* *Apps* *SIP
Destination* *Dur* *Price* *KBIn* *KBOut* *Status* *Codecs*
1Nhttp://ser1.ultra.net.br/CDRTool/callsearch.phtml?cdr_source=opensips_radiuscdr_table=radacct201108order_by=RadAcctIdorder_type=DESCbegin_datetime=1314659280end_datetime=1314744900maxrowsperpage=15action=search#
2011-08-30
09:57:51 on-net MY_USER@MY_SERVER
audio 55113544@MY_SERVER 00:05
37.89 92.97 Ok (200) G711u

If i try to call with internation prefix (00) i get my call billed correctly


 Have sombody an idea about where is my mistake ?


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


[OpenSIPS-Users] Automatic acceptance of calls for some users

2011-08-30 Thread Carmelo D
Hi all

In my system I have about twenty SIP clients all registered to the same
OpenSIPS. Only two of these clients have high priority and should be served
as fast as possible.

The idea was to implement a logic so that for these two clients I have
automatic call acceptance. Other calls from other callers have to be handled
as usual (the callee accept the call if wanted). Any hints/links about
possible implementations?

Thank you in advance,
Carmelo
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] avp set in branch_route

2011-08-30 Thread Jeff Pyle
Hello,

If an avp is set in a branch_route, does that avp still exist if a 
failure_route catches a negative reply and sends the call back into request 
routing for a serial fork?  Or, does the avp go away once that branch goes away?


- Jeff


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


Re: [OpenSIPS-Users] avp set in branch_route

2011-08-30 Thread Dave Singer
avps are per transaction. A branch is just part of a transaction.
Until the transaction is terminated the avp stays active. Be aware
that a call's avp is write-able in all branches and assigning a value
to an existing avp pushes the new value on the top of the avp array.
Calls do not go back to request routing after any reply or failure.
Assuming you set to trigger all routing block types as in route below,
the order is route, branch route, reply route, failure route.
route {
  .
  do_routing(1);
  route(my_stuff);
  t_relay;
  exit;
}
on_branch[tb]{
  #each branch runs through here (assuming triggered as above.) after
the exit is hit.
}
on_reply[tr]{
  #all replies received hit here but not communication timeouts.
  #avps written here are not saved unless avpops param is set to
}
on_failure[tf] {
  #all avps (except from on_reply if appropriate avpops param is not
set) and only pseudo vars from the winning branch are available
here.
  #from here you can kick off another serial/parallel fork.
  #you can call any custom named route block with route(my_stuff).
  #Be sure that what is in that route block can be used by the
  # primary route mode (REQUEST_ROUTE, ONREPY_ROUTE,
  # FAILURE_ROUTE, etc) it is being called from. Example, you
  # wouldn't call route(my_stuff) (see below) from an ONREPLY_ROUTE
  # block because it contains t_relay which can not be used in that route
  # block mode. Calling from the wrong one will cause config check test
  # to warn of config error.
  if(use_next_gw()) {
route(my_stuff);
  }
}

route[my_stuff] {
  t_on_reply(tr);
  t_on_branch(tb);
  t_on_failure(tf);
  t_relay();
  exit;
}

On Tue, Aug 30, 2011 at 8:54 AM, Jeff Pyle jp...@fidelityvoice.com wrote:
 Hello,

 If an avp is set in a branch_route, does that avp still exist if a 
 failure_route catches a negative reply and sends the call back into request 
 routing for a serial fork?  Or, does the avp go away once that branch goes 
 away?


 - Jeff


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




-- 
David Singer

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


[OpenSIPS-Users] Pre append area code to dialed phone number

2011-08-30 Thread Mike O'Connor
Hi All

I need to pre append an area code to phone numbers as configuring the
clients dial plans is driving me mad.

How do I update just the phone number in an invite. The match is
complicated as each state in Australia has a different set of prefixes
which would require the addition of a different area code.

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