[OpenSIPS-Users] [Kamailio-Users] Question about redirect if user is not online "EDIT AVPOPS"

Ali Jawad ali.jawad at splendor.net
Tue Sep 23 10:36:10 CEST 2008


Hi 
Thanks for the hint

I did try the following:

####### AVPOPS Section
modparam("avpops","avp_url","mysql://openser:xyxyxy@xxxxxxxxxxxx/openser
")
modparam("avpops","avp_table","usr_preferences")

In the route statement I did add 

                if(avp_db_load("$ruri/username","s:callfwd")){
                    avp_pushto("$ruri","s:callfwd");
                    route(8);
                    exit;
                };

I got this error

Sep 23 09:21:03 [340] ERROR:avpops:parse_avp_db: error - bad avp flags
Sep 23 09:21:03 [340] ERROR:avpops:fixup_db_avp: parse failed
Sep 23 09:21:03 [340] ERROR:core:fix_actions: fixing failed (code=-1) at
cfg line 307
Sep 23 09:21:03 [340] CRITICAL:core:fix_expr: fix_actions error

Please Advice.
-----Original Message-----
From: Andrew Pogrebennyk [mailto:andrew.pogrebennyk at portaone.com] 
Sent: 2008-09-22 16:32
To: Ali Jawad
Cc: opensipusers
Subject: Re: [OpenSIPS-Users] [Kamailio-Users] Question about redirect
if user is not online

Ali,
Check the avpops module:
http://www.opensips.org/html/avpops.html
You can put the call forwarding settings into the usr_preference table:
username: your_subscriber_id
attribute: callfwd
type: 0
value: sip:userid at asterisk.domain.com

And then use several simple statements to push this AVP to the SIP 
packet changing the original Request-URI to the new one.
if(avp_db_load("$ruri/username","s:callfwd")){
	avp_pushto("$ruri","s:callfwd");
	route(1);
	exit;
};

The following link has all the variables you can assign the values to 
marked in red:
http://www.opensips.org/index.php?n=Resources.DocsCoreVar
Hope it helps.

Ali Jawad wrote:
> Hi
> I got the below fixed, however I do need to achieve something else as
> well. When I forward the call to asterisk I need asterisk to forward
it
> in turn to my cellphone number. Where an how should I re-write the DID
> number of my SIP packet that acts as the destination URI to my cell
> phone number.

-- 
Sincerely,
Andrew Pogrebennyk

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Users mailing list