I'm using OpenSER 1.2.2. I can't get the dispatcher to do failover.
Here's my module parameters...
modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
modparam("dispatcher", "force_dst", 1)
modparam("tm","fr_timer",3)
Here's my dispatcher list file:
1 sip:119.42.149.76:5099
1 sip:119.42.149.79:5099
And, my routing logic is below.
The first thing that I don't understand is that when I print $avp(i:271) I get "sip:119.42.149.76:5099". Where did the other IP address form the list file go? When I print $avp(i:273), I get "2" which is supposed to be the count of the number of items in the list. Where's the other IP gone? I only see one.
The failover routing doesn't work. When OpenSER fails to connect to the first IP, it goes into failure_route(11) like it is supposed to, but it DOES NOT try the other IP address (the one that is missing from $avp(i:271)). I have confirmed this by running ngrep on port 5060.
So... question is... why is the dispatcher only loading one entry from the dispatcher list file into the avp?
Doug.
route[10] {
xlog("L_INFO","Inbound Routing");
t_on_failure("11");
ds_select_dst("1","4");
xlog("L_INFO","---> $avp(i:271) $avp(i:272) $avp(i:273)");
forward();
xlog("L_INFO","Trying first route $dd $od $rd $td $br");
t_relay();
}
failure_route[11] {
xlog("L_INFO","First route failed. Trying second");
if(t_check_status("408") ){
ds_next_dst();
t_on_failure("12");
t_relay();
}
else {
t_reply("501", "Not Implemented");
}
}
failure_route[12] {
route(13);
}
route[13] {
xlog("L_INFO","CRAP");
return;
}
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Hi Jun Yin,
On Tue, Apr 22, 2008 at 12:00 PM, <serusers-request(a)lists.iptel.org> wrote:
> Message: 1
> Date: Mon, 21 Apr 2008 12:09:36 -0700
> From: "Jun Yin" <hansyin(a)gmail.com>
> Subject: [Serusers] how can we setup ser to route invite packet?
> To: serusers(a)lists.iptel.org
> Message-ID:
> <e776e0110804211209u6e8c81dcva09193074ca49ab5(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
> My enviroment is like this: phone1---proxy1-----proxy2-----phone2.
> phone1 register to proxy1, and phone2 register to proxy2, now I initiate
> call from phone1 to phone2, I noticed that phone1 just resolved proxy2's
> domain by itself and send invite to proxy2 directly, everything works fine.
> My question is : How can I force phone1 to send invite to proxy1 and then
> let proxy1 to route that invite packet to proxy2? Actually, I hope all
> packet between phone1 and phone2 can go through proxy1 and proxy2, include
> RTP. This behaviour was determined by phone's configuration or proxy's
> configuration?
-Signaling can be forced to go through the proxy, but not the media.
If you want non-end-to-end media, use a media proxy.
-Have a look at SIP trapezoid [1] [2] and decide what you want to go
through the proxy (via, R, RR) and what end-to-end
-Check your UAs' (i.e. phone) outbound proxy configuration.
[1] RFC 3261, Section 16.12.1.1
[2] http://www.iptel.org/sip_trapezoid
My two cents,
--
Victor Pascual Ávila
Hi,
I have heard that there are two main methods to allow failover with
openser - you can use heartbeat, which I believe is where a secondary
machine assumes the primary machines IP upon the primary not
responding to a ping. I understand the alternative is SRV records,
which use DNS to failover when a machine goes down.
What is the advantages/disadvantages of each? What are people
actually using in production with OpenSER?
Can anyone offer some advice on this?
TIA
Robert
Hello,
I have little problem with openser 1.3.1 and dispatcher (again).
according to dispatcher manual:
--
1.3.11. cnt_avp (str)
The name of the avp storing the number of destination addresses kept in
dst_avp avps.
--
So if I understand it correctly, in AVP (defined in cnt_avp) is stored
number/quantity of active destinations in current destination group.
but I have always initial number of destinations in this AVP (as defined
in dispatcher "destination list" config file). If I remove destination
from balancing list (failed GW), in this AVP is always same initial
value. I think it should change (in this case decrement by 1).
Is this correct?
Thanks :)
--
Miroslav Hostinsky
I'm trying to get a timestamp from the sql server with the following:
avp_delete("$(avp(s:rds_time))");
avp_db_query("SELECT time FROM usr_status WHERE
cid='$ci';","$(avp(s:rds_time))");
HOWEVER, even if the time field is "2008-04-21 15:06:33" the avp is only
filled with "2008". Any idea what's going on ??
- gojensen
UNINETT
Hello!
Have anyone tried the ringtone app on wesip page?
I rewrote it, however mine crashes, but so does wesip one. I'm suspecting
a bug somewhere else that those two application, but I'm having trouble
debugging, since it doesn't show exactly where is the problem:
----
SipProcessor [SipProcessor[4]] - error processing event...
java.lang.NullPointerException
at
com.voztele.sipservlet.deploy.rules.StandardSipServletMapping.evaluate(StandardSipServletMapping.java:39)
at
com.voztele.sipservlet.core.ConvergedHost.map(ConvergedHost.java:104)
at
com.voztele.sipservlet.core.SipHostMapper.map(SipHostMapper.java:123)
at
org.apache.catalina.core.ContainerBase.map(ContainerBase.java:967)
at
com.voztele.sipservlet.valves.ConvergedHostValve.invokeSipRequest(ConvergedHostValve.java:267)
at
com.voztele.sipservlet.valves.ConvergedHostValve.invokeSIP(ConvergedHostValve.java:126)
at
com.voztele.sipservlet.valves.ConvergedHostValve.invoke(ConvergedHostValve.java:104)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:124)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
at
com.voztele.sipservlet.valves.ConvergedEngineValve.invoke(ConvergedEngineValve.java:114)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
at
com.voztele.sipservlet.processor.SipProcessor.invokeContainer(SipProcessor.java:198)
at
com.voztele.sipservlet.processor.SipProcessor.processRequest(SipProcessor.java:142)
at
com.voztele.sipservlet.processor.SipProcessor.process(SipProcessor.java:272)
at
com.voztele.sipservlet.processor.SipProcessor.run(SipProcessor.java:253)
at java.lang.Thread.run(Thread.java:619)
----
How to discover what is blocking it from working?
--
(\__/)
(='.'=)
(")_(")
Hi friends,
I was trying to install Openser and Mediaproxy. but when i am starting media proxy using
/etc/init.d/mediaproxy star
I am getting some error in syslog.
Jan 22 12:18:27 hatifserver4 mediaproxy[14707]: warning: accounting is enabled but the accounting module is missing. accounting is not available!
Jan 22 12:18:27 hatifserver4 mediaproxy[14707]: Listening for commands on local socket `/var/run/mediaproxy.sock'
Jan 22 12:18:27 hatifserver4 mediaproxy[14707]: Listening for remote commands on `212.XXXXXXXXXXXXXx:25060'
Jan 22 12:18:27 hatifserver4 mediaproxy[14707]: Remote commands are allowed from: 212.XXXXXXXXXXXXXXXXXX, 127.0.0.1
Jan 22 12:18:27 hatifserver4 mediaproxy[14707]: Using IP address `XXXXXXXXXXXXX' for the RTP/RTCP proxy
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: Traceback (most recent call last):
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: File "/usr/local/mediaproxy/proxydispatcher.py", line 65, in <module>
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]:
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: import dispatcher
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: File "/usr/local/mediaproxy/modules/dispatcher.py", line 39, in <module>
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]:
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: from accounting import accounting, StopRecordSerializer, UnserializeError
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: File "/usr/local/mediaproxy/modules/accounting.py", line 17, in <module>
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]:
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: from radius import *
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: File "/usr/local/mediaproxy/modules/radius.py", line 10, in <module>
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]:
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: import pyrad.client
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: ImportError
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: :
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: No module named pyrad.client
Jan 22 12:18:27 hatifserver4 proxydispatcher[14710]: exiting.
this is our Mediaproxy.ini file i am not using any kind of accounting or radius in INI file
but i don't kow why it is shwoing accounting is enable
[Dispatcher]
start = yes
socket = /var/run/proxydispatcher.sock
group = openser
defaultProxy = /var/run/mediaproxy.sock
[MediaProxy]
start = yes
socket = /var/run/mediaproxy.sock
group = openser
listen = XXXXXXXXXXXXXx
allow = XXXXXXXXXXXXXXXXXXXXXXXXxx
proxyIP = XXXXXXXXXXXXXXXXXXXXXX
portRange = 20000:65000
TOS = 0xb8
idleTimeout = 60
holdTimeout = 3600
forceClose = 0
accounting = none
[Accounting]
accounting = none
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Hi,
I wish to re-compile OpenSER 1.2.3 - I previously had openser 1.1 on
the machine and then put on openser.1.2.3 - without a make uninstall
command, how is it possible to recompile. Using the command 'openser
-V' gives me the correct version, however, when I try and recompile it
does nothing and says openser is up to date. I tried removing
/usr/local/lib/openser to see if that would make it re-compile. Does
anyone know how to get it to re-compile and start from scratch when it
is already on the machine?
Thanks
Robert McNaught
Hi,
My enviroment is like this: phone1---proxy1-----proxy2-----phone2.
phone1 register to proxy1, and phone2 register to proxy2, now I initiate
call from phone1 to phone2, I noticed that phone1 just resolved proxy2's
domain by itself and send invite to proxy2 directly, everything works fine.
My question is : How can I force phone1 to send invite to proxy1 and then
let proxy1 to route that invite packet to proxy2? Actually, I hope all
packet between phone1 and phone2 can go through proxy1 and proxy2, include
RTP. This behaviour was determined by phone's configuration or proxy's
configuration?
I'm using ser 0.9.6 works as proxy and linphonec works as phone. I also
tried to use asterisk works as proxy but got same result.
Thanks in advance.
--
Rgds,
Hans Yin
Email: hansyin(a)gmail.com
MSN: hansyin(a)hotmail.com
Skype: hans_yin_vancouver