[OpenSIPS-Users] use of is_from_gw directive from drouting module.

2013-05-14 Thread Miguel J.
Dear UserList Opensips:

I used drouting with OpenSips 1.8.0 release, the gateways list was
in the dr_gateways table and no ports where configurated in it. For
incoming calls wasn't necesary.

Now, I upgrade OpenSips to 1.9.1 release and for incoming calls from
a few providers, I can't do match they whith the "is_from_gw()"
directive. I tried in this diferents forms:

is_from_gw(), OpenSips start and providers with 5060-udp port
match fine, but a few providers who employ other random ports haven't
match.
is_from_gw("", "n"), OpenSips start but incoming calls haven't
match with the gateways on dr_gateways table.
is_from_gw("-1", "n"), OpenSips don't start.
is_from_gw("diferents_formats", "n"), OpenSips start but
incoming calls haven't match with the gateways on dr_gateways table.

Then I need to ask you...

¿How I have to use the is_from_gw directive with "n" parameter and
dr_gateways table with the list of incoming calls providers?.

¿Which is the field on the dr_gateways table where i can make match
with type parameter on the is_from_gw directive?.

Thanyou very much and best regards.

Miguel J. López.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Odd opensips REGISTER/INVITE behavior for many simultaneous users

2013-05-14 Thread James Tranovich
Addendum: we have a detailed log here:

https://gist.github.com/captdeaf/5580914

Thanks!

James


On Tue, May 14, 2013 at 3:56 PM, James Tranovich
wrote:

> Hello all --
>
> First, we love opensips :)
>
> Lately, we have been running into a strange issue which seems to be
> related to handling a ton of REGISTER messages. Basically, we have a test
> script that tries to simulate about 50 to 100 simultaneous calls; they all
> register en masse and then randomly start placing calls to another test
> number (after a random time interval). Every once in a while, though, an
> INVITE won't go through because opensips apparently can't find that phone
> number. Oddly enough, if we do an "opensipsctl online" immediately
> before/after, that command shows that, in fact, the recipient's number is
> present and presumably already registered. SIP logs/ngrep tracing confirm
> this.
>
> I was wondering if this is a known bug. This behavior only happens when
> registering a certain number of calls at once; if we test with a low number
> of calls (10, say), this behavior does not happen. It may be that we are
> spamming opensips with too many REGISTER messages (authentication is
> required, so two REGISTER messages are sent, the first w/o auth, the second
> with auth). But I don't see why opensips should have problems with this.
>
> Any thoughts on this? Is this a known issue already? (Searching for this
> issue didn't yield much). Thanks!
>
> James
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Odd opensips REGISTER/INVITE behavior for many simultaneous users

2013-05-14 Thread James Tranovich
Hello all --

First, we love opensips :)

Lately, we have been running into a strange issue which seems to be related
to handling a ton of REGISTER messages. Basically, we have a test script
that tries to simulate about 50 to 100 simultaneous calls; they all
register en masse and then randomly start placing calls to another test
number (after a random time interval). Every once in a while, though, an
INVITE won't go through because opensips apparently can't find that phone
number. Oddly enough, if we do an "opensipsctl online" immediately
before/after, that command shows that, in fact, the recipient's number is
present and presumably already registered. SIP logs/ngrep tracing confirm
this.

I was wondering if this is a known bug. This behavior only happens when
registering a certain number of calls at once; if we test with a low number
of calls (10, say), this behavior does not happen. It may be that we are
spamming opensips with too many REGISTER messages (authentication is
required, so two REGISTER messages are sent, the first w/o auth, the second
with auth). But I don't see why opensips should have problems with this.

Any thoughts on this? Is this a known issue already? (Searching for this
issue didn't yield much). Thanks!

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


Re: [OpenSIPS-Users] Need config file manipulation help

2013-05-14 Thread Priyaranjan Nayak
Hi All,

Now opensips is forwarding to next hop(Server).While sending
REGISTER message to server it is using only one port opensips.This is
happening after modifying below statement in routing logic of
opensips.cfg.

if(is_method("REGISTER"))
{
#sl_send_reply("400","priyaranjan");
t_relay("tcp:116.114.34.56:443");
exit();
}
else
{
xlog("incoming request\n");
t_relay("tcp:116.114.34.56:443");
exit();
}

 But my requirement is while sending REGISTER message to server it
should use one port from opensips  for one user.i.e For different user
opensips should send from different port to server. kindly let me know
what could be change in opensips.cfg's file ?


Bogdan-Andrei Iancu, thanks for reply.


Thanks
Priyaranjan


>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


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


[OpenSIPS-Users] Check if local user is registered and not busy

2013-05-14 Thread Adam Raszynski
Hi all,

I would like to know is it possibble to check in OpenSIPS if user that is
destination of a call is registered and not busy (no other calls to same
username) without sending INVITE request?

I need this to create some kind of dynamic routing with busy detection

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


Re: [OpenSIPS-Users] OpenSIPS.org web site REFURBISH - FIRST PHASE - Completed

2013-05-14 Thread Bogdan-Andrei Iancu
Hi Saul,

Re-structuring the site as classes of info and menus was the first step
; next steps is to update and refurbish the content and re-structure the
documentation part.

In other words, the content of the home page is to be update ! :)

Regards,

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


On 05/14/2013 03:25 PM, Saúl Ibarra Corretgé wrote:
> []
> As for the content, the news seem to be repeated: they are displayed as 
> headlines at the top of the page and also on the bar to the right. I'd leave 
> only the bar on the right, so the first thing newcomers see on the website is 
> "What OpenSIPS is".
>
> My 2 cents :-)

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


Re: [OpenSIPS-Users] Need config file manipulation help

2013-05-14 Thread Bogdan-Andrei Iancu
Hello Priyaranjan,

Take a look into OpenSIPS logs to check for the errors coresponding to
your INVITE processing - they will give information on the failure
behind the 477/TM error.

Regards,

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


On 05/13/2013 01:01 PM, Priyaranjan Nayak wrote:
> Hi All,
>
>  I am using opensips as a B2BUA. one tool is sending request to
> opensips and opensips forward it to main proxy. I have modified little
> bit   routing logic in config file.
>
> if(is_method("REGISTER"))
> {
> t_relay("tcp:116.114.34.56:443 ");
> exit();
> }
>
>
> When tool sending REGISTER to opensips,then opensips replies with
> "SIP/2.0 477 Send failed (477/TM)" to tool.
> kindly let me know what could be done in config for forwarding to
> 116.114.34.56:443  ?
>
> -- 
> Thanks
> Priyaranjan
>
>
>
> ___
> 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] Detect failed SIP server

2013-05-14 Thread Bogdan-Andrei Iancu
Hello Chen-Che,

I guess you doing some wrong AVP ops - so you need to set the 2 AVPs
(for the 2 timers) before the t_relay() and keep thme untouched while
setting up the call (during the transaction lifetime).

Regards,

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


On 05/13/2013 11:33 AM, microx wrote:
> Hi Bogdan-Andrei,
>
> According to your suggestion, I did find "DBG:tm:_set_fr_retr: FR_TIMER =
> 32" and "DBG:tm:reply_received: FR_INV_TIMER = 32" in the logs. However,
> when I search "timeout", the following log info are retrieved. It seems my
> configuration has a flaw and thus the fr_timer_avp is replaced with fr_timer
> again. The complete log is attached. Please help take a look. Thanks so
> much.
>
> fr_timer_avp.log
> 
>   
>
> Best regards,
> Chen-Che
>
> DBG:tm:set_timer: relative timeout is 50
> DBG:tm:set_timer: relative timeout is 32
> DBG:tm:set_timer: relative timeout is 50
> DBG:tm:set_timer: relative timeout is 32
> DBG:tm:utimer_routine: timer routine:4,tl=0x7fce1217e9b8
> next=0x7fce1217b0e0, timeout=75150
> DBG:tm:utimer_routine: timer routine:4,tl=0x7fce1217b0e0 next=(nil),
> timeout=75150
> DBG:dialog:get_dlg_timeout: invalid AVP value, use default timeout
> DBG:tm:set_timer: relative timeout is 50
> DBG:tm:set_timer: relative timeout is 32
> DBG:tm:utimer_routine: timer routine:4,tl=0x7fce12182450 next=(nil),
> timeout=75220
> DBG:tm:set_timer: relative timeout is 100
> DBG:tm:set_timer: relative timeout is 32
> DBG:tm:set_timer: relative timeout is 32
> DBG:dialog:get_dlg_timeout: invalid AVP value, use default timeout
> DBG:tm:set_timer: relative timeout is 50
> DBG:tm:set_timer: relative timeout is 10
>
>
>
>
>
> --
> View this message in context: 
> http://opensips-open-sip-server.1449251.n2.nabble.com/Detect-failed-SIP-server-tp7585427p7586290.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.org web site REFURBISH - FIRST PHASE - Completed

2013-05-14 Thread Saúl Ibarra Corretgé
Hi Alex!

On May 14, 2013, at 2:11 PM, Alex Ionescu wrote:

> Hi all,
> 
> We are happy to announce that we have re-organized the web site 
> (www.opensips.org) as grouping, menus etc.
> This is just the first step of a more complex process of refurbishing. We 
> would like to ask you to report any broken links or other issues that you may 
> found.
> Also, your suggestions and opinions are very much welcome.
> 

Good work, the new layout looks much nicer! A small nit: the "GO" button is 
taller than the textbox next to it.

As for the content, the news seem to be repeated: they are displayed as 
headlines at the top of the page and also on the bar to the right. I'd leave 
only the bar on the right, so the first thing newcomers see on the website is 
"What OpenSIPS is".

My 2 cents :-)

--
Saúl Ibarra Corretgé
AG Projects




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


[OpenSIPS-Users] OpenSIPS.org web site REFURBISH - FIRST PHASE - Completed

2013-05-14 Thread Alex Ionescu

Hi all,

We are happy to announce that we have re-organized the web site 
(www.opensips.org ) as grouping, menus etc.
This is just the first step of a more complex process of refurbishing. 
We would like to ask you to report any broken links or other issues that 
you may found.

Also, your suggestions and opinions are very much welcome.

Best regards,
Alex Ionescu
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need configuration help for opensips.cfg

2013-05-14 Thread Bogdan-Andrei Iancu
Hi Priyaranjan,

In order to have that Route handled by OpenSIPS, you need to take out
from your script the check for pre-loaded routed.

Regards,

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


On 05/13/2013 09:18 AM, Priyaranjan Nayak wrote:
>
> Hi All,
>
> I need to run opensips as a B2BUA in tcp. One tool is sending
> REGISTER to opensips ,then opensips should send to main proxy.For this
> requirement I added Route
>  i.e  Route:  in REGISTER
> .when REGISTER comes to opensips ,it is not forwarding to main proxy.
> Opensips is sending  status: 403  preload Route denied (0 binding ) to
> that tool. kindly let me know what could be done ?
>
> -- 
> Thanks
> Priyaranjan
>
>
> ___
> 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] Registrar not saving received from Path header

2013-05-14 Thread Nathaniel L Keeling III

Hello Bogdan,

here is the output from opensips's og file of the save() with the patch 
and the code snippet from the opensips.cfg. I did not see any ant logs 
with "xXx". Also,I have usrloc's db_mode set to 3.


##
# Try to save the Register's requests location information
##

xlog("SAVING THE SUBSCRIBER INTO THE LOCATION TABLE 
");

if (!save("location","p1"))
{
xlog("L_ERR", "ERR:callerid:$ci|end|System error trying to save 
Register's request location");

sl_reply_error();
}

##
# Subscriber's register request was successfully authenticated
# and saved
##

xlog("L_NOTICE", "NOTICE:callerid:$ci|end|The subscriber has 
successfully registered with Akan Voice");

exit;


Thanks

Nathaniel
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 292666 
local1.debug] DBG:core:parse_msg: SIP Request:
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 776402 
local1.debug] DBG:core:parse_msg:  method:  
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 700387 
local1.debug] DBG:core:parse_msg:  uri: 
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 641661 
local1.debug] DBG:core:parse_msg:  version: 
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 497291 
local1.debug] DBG:core:parse_headers: flags=2
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 232,  = 
; state=16
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_via: end of header reached, state=5
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 636936 
local1.debug] DBG:core:parse_headers: via found, flags=2
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 481110 
local1.debug] DBG:core:parse_headers: this is the first via
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 1, name=, 
body=
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 499462 
local1.debug] DBG:core:parse_msg:  first  via:  
<209.252.110.38:5060(5060)>
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 573780 
local1.debug] DBG:core:parse_msg: ;
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 937246 
local1.debug] DBG:core:parse_msg: 
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 979351 
local1.debug] DBG:core:parse_msg: exiting
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 911547 
local1.debug] DBG:core:receive_msg: After parse_msg...
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 451678 
local1.debug] DBG:core:receive_msg: preparing to run routing scripts...
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 497291 
local1.debug] DBG:core:parse_headers: flags=40
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 234,  = 
<208.54.44.246>; state=6
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 235,  = 
<12985>; state=6
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 202288 
local1.debug] DBG:core:parse_via_param: found param type 232,  = 
; state=16
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_via: end of header reached, state=5
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 636936 
local1.debug] DBG:core:parse_headers: via found, flags=40
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 903840 
local1.debug] DBG:core:parse_headers: parse_headers: this is the second via
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 1, name=, 
body=
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387 
local1.debug] DBG:core:parse_headers: header field type 8, name=, 
body=<30>
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 218084 
local1.debug] DBG:core:parse_to: end of header reached, state=10
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 841317 
local1.debug] DBG:core:parse_to: display={}, ruri={sip:nkeel...@akanvoice.com}
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 993225 
local1.debug] DBG:core:get_hdr_field:  [30]; 
uri=[sip:nkeel...@akanvoice.com] 
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 159376 
local1.debug] DBG:core:get_hdr_field: to body [^M
May 13 18:32:58 kwesi-chicago-registrar1 ]
May 13 18:32:58 kwesi-chicago-registrar1 OpenSips[16233]: [ID 994387

[OpenSIPS-Users] Sip server dipping/advice

2013-05-14 Thread M.Khaled W Chehab
Hi,

 

 

I am using opensips 1.8.x with do_routing module ,and trying to implement
the US  dipping service in my script

I am sending the call to the dipping sip server gateway and receive the 302
message containing  the LRN number  ,

As as result I can have the rn number but I am sending the invite  to the
dipping provider twice ,please can you advice how to setup it in the right
way  

if ($rU=~"^.") {

route(7);

route(1);

exit;

 

route[1] {

if (subst_uri('/(sip:.*);nat=yes/\1/')) {

setbflag(6);

}

 

if (isflagset(5)) {

   search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

}

 

# for INVITEs enable some additional helper routes

if (is_method("INVITE")) {

 

 

t_on_branch("2");

t_on_reply("2");

t_on_failure("1");

avp_db_query("UPDATE `opensips`.`invites` set `trunkip`
='$rd' where  `CALLID` = '$ci' ");

 

} else if (is_method("BYE")) {

setflag(1); # do accounting ...

setflag(3); #transaction falis

setflag(4); #CDR Table

xlog("Route 1
Bye---");

   

} else if (is_method("ACK")) {

# call answered an ACKed, start billing here

 

} else if (is_method("CANCEL")) {

# call cancelled by caller, do clean up here' ");

}

 

if (!t_relay()) {

xlog("L_INFO", "--Debug Customer
ID:$avp(Cusid)/IP:$si--#11###Reply: $T_reply_code\n");

 

send_reply("500","Internal Error");

};

 

exit;

}

 

route[7]{

if (!do_routing("$avp(Cusid)","FW")) {

drop();

exit;

}

}

 

 

route[6] {

if ( use_next_gw() ) {

$var(prefix) =
$(avp(gw_attrs){csv.value,1});

$rU = $var(prefix) + $avp(dst);

xlog("L_INFO", "--Debug Customer
ID:$avp(Cusid)/IP:$si-Calling number to Next Provier $rU\n");

setflag(26); #Missed calls

t_on_failure("1");

t_relay();

exit;

}

}

 

 

branch_route[2] {

xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-new
branch at $ru\n");

route(7);

}

 

 

failure_route[1] {

 

 

 if (!t_check_status("302")) {

if (!next_routing()){

xlog("L_INFO", "LRN - Unable to DIP");

t_reply("500","Unable to DIP");

exit;

}

xlog("L_INFO", "LRN - Unable to DIP - Trying Next");

t_on_failure("1");

t_relay();

exit;  

}

 

if (!$(ct.fields(uri){param.value,rn})){

   xlog("L_INFO", "LRN - No redirect
information found");

route(1);

  }else if
($(ct.fields(uri){param.value,rn}) == $tU){

  xlog("L_INFO", "LRN - Returned same number, no need to
redirect");

route(1);

  }else{ 

xlog("LRN-$rU---Else lRN
$avp(lrnct)-");

$rU=$avp(lrnct);   

xlog("LRN-$rU---Else lRN
$avp(lrnct)-");

 

 route(1);

   

}



if (!t_check_status("487")) {

#$avp(failure_count) = $avp(failure_count) + 1;
480|486|603

route(6);

}

}

 

 

}

 

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


Re: [OpenSIPS-Users] trying to use the drouting module

2013-05-14 Thread Mark Lassing
Hello Bogdan-Andrei,

Thank you for pointing me in the right direction on how to handle sequential 
requests.
My setup is working now!

--

Regards,

Mark



Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Namens Bogdan-Andrei Iancu
Verzonden: vrijdag 10 mei 2013 18:36
Aan: OpenSIPS users mailling list
Onderwerp: Re: [OpenSIPS-Users] trying to use the drouting module

Hello Mark,

Your script does not handle sequential request (like BYE) at all. I would 
strongly suggest to follow this webinar 
http://www.opensips.org/Documentation/Webinars#toc12 in order to understand the 
record routing and loose routing mechanisms in SIP. After that, you need to 
change your script accordingly (you can check the default opensips script - the 
part with the loose_route() function ).

Regards,

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

On 05/10/2013 06:36 PM, Mark Lassing wrote: 
Hi all,
 
I am trying to use the drouting module, 
this is working as expected, calls get passed to the right gw, call setup and 
audio is all working fine, 
but the bye request packets do not seem to be relayed to the destination gw, 
causing lot of retransmits.
 
How to solve this issue ? If more informations is needed please feel free to 
ask me.
 
--
 
Mark
 
 Global 
debug=6
log_stderror=no
log_facility=LOG_LOCAL0
fork=yes
children=4
auto_aliases=no
listen=udp:213.***.***.***:5060
disable_tcp=no
 
### Modules Section 
 
#set module path
mpath="/usr/lib/opensips/modules/"
loadmodule "db_mysql.so"
 
 
 DROUTING module
loadmodule "drouting.so"
modparam("drouting", "db_url", "mysql://*:*@localhost/opensips")
modparam("drouting", "probing_interval", 60)
modparam("drouting", "probing_from", "sip:probe@q.*.**")
modparam("drouting", "probing_method", "OPTIONS")
modparam("drouting", "probing_reply_codes", "501, 403, 404")
modparam("drouting", "use_domain", 1)
 
 Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timer", 5)
modparam("tm", "fr_inv_timer", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)
 
 SIGNALING module
loadmodule "signaling.so"
 
 StateLess module
loadmodule "sl.so"
 
 SIP MSG OPerationS module
loadmodule "sipmsgops.so"
 
 Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 1)
 
 MAX ForWarD module
loadmodule "maxfwd.so"
 
 
 
### Routing Logic 
 
# main request routing logic
 
route{
    if (!mf_process_maxfwd_header("10")) {
    sl_send_reply("483","Too Many Hops");
    exit;
    }
 
    if (method == "INVITE") {
                setflag(1);    
record_route();
                
xlog("INBOUND CALL,$dd,$ru,$ci,$fn,$fu,$tU@$td");
    route(10);
    exit;
    }
 
}
 
 
route[10] {
 
    if (!do_routing("0")) { 
 
    xlog("do_routing: No rules matching the URI\n");
    send_reply("503","No rules matching the URI");
    exit;
    }
 
if (is_method("INVITE")) { 
t_on_failure("10");
    }
    route(1);
}
 
 
route[1] {
  xlog("route(1)\n");
# sl_send_reply("100", "Trying");
  if(!t_relay())
  {
 sl_reply_error();
  }
}
 
 
failure_route[10] {
    xlog("DEBUG: DROUTING failure route active\n");
    if (t_was_cancelled()) {
        exit;
    }
    if (t_check_status("[34][0-9][0-9]")) {
        exit;
    }
 
    if (use_next_gw()) {
        t_relay();
        exit;
    } else {
    t_reply ("503", "Service not available");
        exit;
    }
}
 
 


___
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