[Serusers] HELP: AVPOPS serial forking
Java Rockx
javarockx at yahoo.com
Mon Jan 10 21:45:56 CET 2005
Hi all.
I'm trying to "uncomplicate" my ser.cfg and part of this is coming up with a simplistic way to
handle failover to voicemail and unconditional call forwarding (forward busy and forward no answer
are also needed, but I'll do this later).
So serial forking seems perfect for this job but I'm having trouble getting it working.
I added the "type" to usr_preferences as described in the avpops README. And my ser.cfg was
modified similar to example 8.4 in the avpops online documentation at
http://www.voice-system.ro/docs/avpops/ar01s08.html#ex_serial_forking
My partial ser.cfg is below. Can anyone tell me why ser will not route calls? I just get dead air
when I dial a number. I can see in my MySQL logs that avpops is querying the database - but I
don't see how it is putting the read DB values in to the $serial_fork AVP. I also see plenty of
errors regarding media_proxy - so I know my code is messed up.
Many Thanks!
Paul
modparam("avpops", "avp_url", "mysql://ser:heslo@localhost/ser")
modparam("avpops", "avp_table", "usr_preferences")
modparam("avpops", "avp_aliases", "serial_fork=i:665")
route {
### all the usual stuff
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:")){
sl_send_reply("479", "We don't forward to private IP addresses");
break;
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (method=="INVITE") {
# a hack to get the user's voicemail URI in to avp
# since the voicemail server is an external server
if (is_user_in("Request-URI", "voicemail")) {
rewritehostport("11.22.33.44:5060");
avp_write("$ruri", "$serial_fork");
revert_uri();
};
# load the "callfwd" attribute, if any, for the called party
avp_db_load("$to/username", "s:callfwd");
t_on_failure("1");
t_on_reply("1");
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
# if caller hung up then don't sent to voicemail or forward
if (t_check_status("487")) {
break;
};
if (avp_pushto("$ruri", "$serial_fork")) {
avp_delete("$serial_fork");
t_on_failure("1");
t_relay();
};
}
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
More information about the sr-users
mailing list