Hello everybody,
I have implemented few features in my openser script. The features are like if a user
presses *86 followed by any number, that number will be his forwarded number when someone
calls him and he is busy. Similarly the code for forwarding on no-answer is *87 followed
by the number to which it should be forwarded.
I've tested these features using Eyebeam softphone and Audiocodoes MP series analog
gateways.
But while testing it with a linksys pap2 device, it does'nt work. The problem is
that as soon as the user dials *86 the phone gets disconnected and his forwarded number
becomes blank in the table where i store these numbers.
I dont understand how does the device recognises the code which is written in my openser
script.
Its like if the user dials any feature enabling code, before he enters the number the
call is disconnected.
Can anyone please help me in this regard or can anyone please guide me if they worked on
this kind of idea before.
the snippet of cfg is as below:
if(uri=~"sip:\*87[0-9]*@") {
if(isflagset(9)) { #--check if the feature is allowed for user--
log(1,"Entered *87 condition");
avp_db_query("select attribute from usr_preferences where
username='$fU' and attribute='fwd_noanswer'",
"$avp(i:91)");
if(!avp_check("$avp(i:91)",
"eq/fwd_noanswer/i")) {
strip(3);
avp_db_query("insert into usr_preferences
values('', '$fU', '', 'fwd_noanswer', '',
'$ruri', '')");
log(1,"Entered in DB");
sl_send_reply("200", "OK");
exit;
};
strip(3);
avp_db_query("update usr_preferences set value='$ruri' where
username='$fU' and attribute='fwd_noanswer'");
sl_send_reply("200", "OK");
exit;
};
sl_send_reply("403", "Forbidden");
exit;
};
Waiting for reply,
w/regards,
Jayesh
---------------------------------
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now