Hi,
not sure how is generating this, but it's not a valid SIP URI:
<: 17322180369@myserver-ipaddress:5090>
regards,
bogdan
Hi Bogdan
I have redirecting the user if not available to to Voice mail of Asterisk
that run on myserver-ipaddress:5090
i have integrated OpenSer+Asterisk
so when the local user not availble it should go to Voice mail
but when iam dialing from X-lite call going out.
but when iam dialing from Sipura the call Going to voice mail .. why iam not
sure
here is my openser.cfg looks like
-----------
modparam("uac","credential","99999:provider.com:99999")
# ------------------------- request routing logic -------------------
route {
#check for old messages: could mean a problem withthe DNS entries or some
other loop-causer...
if (!mf_process_maxfwd_header("10"))
{
xlog("L_WARN", "WARNING: Too many hops\n");
sl_send_reply("483", "Too many hops, forward count exceeded
limit\n");
return;
};
#check for extremely large messages; we don't need a sip dos attack
if (msg:len >= 2048)
{
xlog("L_WARN", "WARNING: Message too large, >= 2048 bytes\n");
sl_send_reply("513", "Message too large, exceeded limit\n");
return;
};
#record everything besides registers and acks
if(method!="REGISTER" && method!="ACK")
{
setflag(1);
};
#do not send to voicemail if BYE or CANCEL
#is used to end call before user pickup or timeout
if(method=="CANCEL" || method=="BYE")
{
setflag(10);
};
#grant route if route headers already present
if (loose_route())
{
route(1);
return;
};
#Always require authentication, which could result in a PSTN, ie $$$
if (method=="REGISTER")
{
if(!www_authorize("mydomain.com", "subscriber"))
{
www_challenge("mydomain.com", "0");
return;
}
else
{
if (!check_to())
{
sl_send_reply("401", "Unauthorized");
return;
};
#Save into user database, used below when checkingif user is available
xlog("L_INFO", "REGISTER: User Authenticated Correctly\n");
save("location");
return;
};
};
#}
if (method=="INVITE")
{
if(uri=~"sip:\*98@.*")
#if(uri=~"sip:\*86@.*")
{
#authorize if a call is going to PSTN
if(!proxy_authorize("mydomain.com", "subscriber"))
{
proxy_challenge("mydomain.com", "0");
return;
};
xlog("L_INFO", "CALL: Call to check voicemail\n");
rewritehostport("myserver-ipaddress:5090");
}
else
{
if (does_uri_exist())
{
#Call is to sip client, so do nothing but route
xlog("L_INFO", "CALL: Sip client\n");
if (!lookup("location"))
{
# sl_send_reply("404", "Not Found");
# log(1, "ERROR: User Not Found\n");
rewritehostport("myserver-ipaddress:5090");
t_relay();
return;
};
}
else
{
#authorize if a call is going to PSTN
if(!proxy_authorize("mydomain.com", "subscriber"))
{
proxy_challenge("mydomain.com", "0");
return;
};
#Call destination is PSTN, so send it to the gateway (
Net.com)
xlog("L_INFO", "CALL: PSTN gateway1\n");
rewritehostport("provider-ip:5060");
};
};
#Make sure that all subsequent requests go through us;
record_route();
}
else
{
if (does_uri_exist())
{
#Call is to sip client, so do nothing but route
xlog("L_INFO", "CALL: Sip client\n");
if (!lookup("location"))
{
# sl_send_reply("404", "Not Found");
# log(1, "ERROR: User Not Found\n");
rewritehostport("myserver-ipaddress:5090");
t_relay();
return;
};
}
else
{
#Call destination is PSTN, so send it to the gateway (
Net.com)
xlog("L_INFO", "CALL: PSTN gateway2\n");
rewritehostport("provider-ip:5060");
};
record_route();
};
#ALL PROCESSING IS DONE, SO ROUTE
route(1);
}
route[1]
{
#send the call outward
if(method=="INVITE" && !isflagset(10))
{
t_on_failure("2");
};
if (!t_relay())
{
xlog("L_WARN", "ERROR: t_relay failed");
sl_reply_error();
};
}
failure_route[2]
{
if(!t_was_cancelled())
{
revert_uri();
rewritehostport("myserver-ipaddress:5090");
append_branch();
#PREVENT SOME CRAZY VOICEMAIL LOOP
xlog("L_INFO", "INFO: CALL TO VOICEMAIL");
setflag(10);
route(1);
}
}
ram