[OpenSIPS-Users] OpenSIPS+asterisk: cannot place call
Stefano Sasso
stesasso at gmail.com
Mon Sep 27 17:19:50 CEST 2010
2010/9/27 Stefano Sasso <stesasso at gmail.com>:
>> if (is_method("INVITE")) {
>> if (!ds_is_in_list("$si", "$sp")) ) /* if it's not from asterisk */
>> if (!ds_select_dst("1", "5")) {
>> ....
>>
>> } else
>> route(1); /* send it out */
>
> I inserted what you said, but now the destination rings, but the
> source has the call interrupted.
I also tried with the following configuration.
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if (ds_is_in_list("$si", "$sp")) {
xlog("RELAYING from dispatcher, method:$rm");
t_relay();
exit;
}
xlog("SIP route info: [$fu/$tu/$ru/$ci] METHOD: $rm");
if (!has_totag()) {
# initial request
record_route();
}
else {
# sequential request - obey the indicated route
loose_route();
t_relay();
exit;
}
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
xlog("First route:
[USER:$au/CALL-ID:$ci/FROM-TAG:$ft/FROM-URI:$fu/FROM-URI-USER:$fU/METHOD:$rm]");
if (is_method("REGISTER") || is_method("OPTIONS") ||
is_method("INVITE") || is_method("ACK")) {
xlog("- dispatching METHOD $rm");
if (!ds_select_dst("1", "5")) {
xlog("Service unavailable for ds_select_dst[$rm]");
send_reply("503","Service Unavailable");
exit;
}
}
else {
send_reply("405","Method Not Allowed");
exit;
}
# route the request
if (!t_relay()) {
sl_reply_error();
}
}
This time I cannot place the call, and asterisk is saying:
SIP/2002-0000000a is circuit-busy :(
any other hint?
I worked on it the whole day without getting it working :(
--
Stefano Sasso
http://stefano.dscnet.org/
More information about the Users
mailing list