[OpenSIPS-Users] OpenSIPS is not running, Erorr
Khan Friend
khansfriend at gmail.com
Sun Dec 28 20:18:49 CET 2008
Bogdan,
The problem is that I don't know much about SIP server and VoIP. This is
experimental project, I studied and successfully ran simple OpenSIPS server.
When I try to add Asterisk or NAT Traversal, I ran into many problems. One
of them is this (Asterisk config), I traced the log file but not much luck
understanding what part needs fixing.
Please help me identify the root of the problem and how to fix. How do i
find SIP replies, what do i do to see them and capture them.
Thanks in advance,
Khan
On Sun, Dec 28, 2008 at 4:33 AM, Bogdan-Andrei Iancu <bogdan at voice-system.ro
> wrote:
> Hi Khan,
>
> your OpenSIPS runs ok - what you see are runtime errors, not startup
> errors.
>
> The errors you see are indicating processing of SIP reply messages that
> could not be routed - they were received with only one VIA and they were not
> matching any local transaction.
>
> Can you identify the SIP replies triggering this error?
>
> Regards,
> Bogdan
>
> Khan Friend wrote:
>
>> Hi guys,
>>
>> I am trying to troubleshoot errors in my OpenSIPS config file but unable
>> to understand what am i doing wrong.
>>
>> The log file shows as follows:
>> Dec 26 21:38:02 [22302] INFO:usrloc:ul_init_locks: locks array size 512
>> Dec 26 21:38:02 [22302] INFO:registrar:mod_init: initializing...
>> Dec 26 21:38:02 [22302] INFO:textops:mod_init: initializing...
>> Dec 26 21:38:02 [22302] INFO:avpops:avpops_init: initializing...
>> Dec 26 21:38:02 [22302] INFO:auth:mod_init: initializing...
>> Dec 26 21:38:02 [22302] INFO:auth_db:mod_init: initializing...
>> Dec 26 21:38:02 [22302] INFO:core:probe_max_receive_buffer: using a UDP
>> receive buffer of 214 kb
>> Dec 26 21:38:56 [22303] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:38:57 [22308] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:38:58 [22306] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:38:59 [22304] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:39:00 [22303] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:39:10 [22308] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> Dec 26 21:39:11 [22306] ERROR:core:forward_reply: no 2nd via found in
>> reply
>> D
>>
>> --
>>
>>
>> My opensips.cfg is as follows:
>>
>> route{
>>
>> # initial sanity checks -- messages with
>> # max_forwards==0, or excessively long requests
>>
>> if (!mf_process_maxfwd_header("10")) {
>> sl_send_reply("483","Too Many Hops");
>> exit;
>> };
>>
>> if (msg:len >= 2048 ) {
>> sl_send_reply("513", "Message too big");
>> exit;
>> };
>>
>> # we record-route all messages -- to make sure that
>> # subsequent messages will go through our proxy; that's
>> # particularly good if upstream and downstream entities
>> # use different transport protocol
>>
>> if (!method=="REGISTER")
>> record_route();
>>
>> # subsequent messages withing a dialog should take the
>> # path determined by record-routing
>>
>> if (loose_route()) {
>> # mark routing logic in request
>> append_hf("P-hint: rr-enforced\r\n");
>> route(1);
>> };
>>
>> if (!uri==myself) {
>> # mark routing logic in request
>> append_hf("P-hint: outbound\r\n");
>> route(1);
>> };
>>
>> # if the request is for other domain use UsrLoc
>> # (in case, it does not work, use the following command
>> # with proper names and addresses in it)
>> if (uri==myself) {
>>
>> if (method=="REGISTER") {
>> if (!www_authorize("", "subscriber")) {
>> www_challenge("", "0");
>> exit;
>> };
>>
>> save("location");
>> exit;
>> };
>>
>> # requests for Media server
>> if(is_method("INVITE") && !has_totag() && uri=~"sip:\*9") {
>> route(3);
>> exit;
>> }
>>
>> # mark transaction if user is in voicemail group
>> if(is_method("INVITE") && !has_totag()
>> && is_user_in("Request-URI","voicemail"))
>> {
>> xdbg("user [$ru] has voicemail redirection enabled\n");
>> # backup R-URI
>> avp_pushto("$ru","$avp(i:10)");
>> #avp_write("$ruri","$avp(i:10)");
>> setflag(2);
>> };
>> # native SIP destinations are handled using our USRLOC DB
>> if (!lookup("location")) {
>> if(isflagset(2)) {
>> # route to Asterisk Media Server
>> prefix("1");
>> rewritehostport("192.168.1.11:5060 <
>> http://192.168.1.11:5060>");
>>
>> route(1);
>> } else {
>> sl_send_reply("404", "Not Found");
>> exit;
>> }
>> };
>> append_hf("P-hint: usrloc applied\r\n");
>> };
>>
>> route(1);
>> }
>>
>>
>> route[1] {
>> if(isflagset(2))
>> t_on_failure("1");
>>
>> if (!t_relay()) {
>> sl_reply_error();
>> };
>> exit;
>> }
>>
>>
>> # voicemail access
>> # - *98 - listen caller's voice messages, being prompted for pin
>> # - *981 - listen voice messages, being promted for mailbox and pin
>> # - *98XXXX - leave voice message to XXXX
>> #
>> route[3] {
>> # direct voicemail
>> if (uri =~ "sip:\*98@" ) {
>> rewriteuser("1");
>> xdbg("voicemail access\n");
>> } else if (uri =~ "sip:\*981@" ) {
>> strip(4);
>> rewriteuser("11");
>> } else if (uri =~ "sip:\*98.+@" ) {
>> strip(3);
>> prefix("1");
>> } else {
>> xlog("unknown media extension $rU\n");
>> sl_send_reply("404", "Unknown media service");
>> exit;
>> }
>>
>> # route to Asterisk Media Server
>> rewritehostport("192.168.1.11:5060 <http://192.168.1.11:5060>");
>> route(1);
>> }
>>
>> failure_route[1] {
>> if (t_was_cancelled()) {
>> xdbg("transaction was cancelled by UAC\n");
>> return;
>> }
>> # restore initial uri
>> avp_pushto("$ru","$avp(i:10)");
>> #avp_pushto("$ru", "i:10");
>> prefix("1");
>> # route to Asterisk Media Server
>> rewritehostport("192.168.1.11:5060 <http://192.168.1.11:5060>");
>> resetflag(2);
>> route(1);
>> }
>>
>>
>> Thank you,
>>
>>
>> Khan
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
--
Thank you,
Mr. Khan
Director Technical Resources, Research, and Deployment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081228/010190de/attachment-0001.htm
More information about the Users
mailing list