[Serusers] call fwd all with avp_ops question
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Apr 12 09:11:36 CEST 2005
insert some log messages (after each step) and debug functions (like
avp_print()) and try to localize the point where the script
misbehave...otherwise, on first look, it seams ok.
BTW - why do you do call fwd *if* the user if found either in location,
either in aliases?
bogdan
Steve Blair wrote:
>
> I'm trying to use avp_ops to implement call forward all but it is not
> working. I'm hoping this list can offer some suggestions.
>
> The idea is that a use turns call forward all on or off via the web
> page. This sets the flag callfwdall to y or n.
>
> If flag=y then the user must enter a phone number to which all calls
> will be forwarded.
>
> When a calls arrives for the users phone number callfwdall is checked,
> if = y then fwdaddr is written to r-uri and the call proceeds through the
> rest of the route blocks. This is so that any ACL checks can be done
> on the newly written r-uri so that user cannot forward to an otherwise
> inaccessible number.
>
> Well this isn't working. Here is a snippet from my config. All
> other calling
> is working fine.
>
>
> if (method=="INVITE")
> {
> if (lookup("location") | lookup("aliases") )
> {
> xlog("L_INFO", "\n[SER]: AVP LOAD: Checking callfwdall flag
> \n\n");
> if (avp_db_load("$ruri/username", "s:callfwdall")) {
> if (avp_check("s:callfwdall","eq/y/i")) {
> if (avp_db_load("$ruri/username", "s:fwdaaddr")) {
> avp_write("$ruri/username", "s:ocn");
> avp_pushto("$ruri/username", "s:fwdaaddr");
> rewritehostport("net.isc.upenn.edu:5060");
> xlog("L_INFO", "\n[SER]: AVP LOAD new ruri: Time: [%Tf]
> From uri <%fu> To < %tu> Method: <%rm> R-uri: <%ru>
> Contact Header: <%ct> \n\n");
> setflag(3);
> } else {
> xlog("L_INFO", "\n[SER]: AVP LOAD: no fwdaaddr \n\n");
> };
>
>
> Thanks,Steve
>
More information about the sr-users
mailing list