[Serusers] How can I change dial rulesbased on From:' header instead of R-RURI?

sip sip at arcdiv.com
Tue Dec 13 14:45:02 CET 2005


Right.... but this assumes it's a local user and he has control over that info. 

If the user's not local, you're sort of limited in what you can test for. 

N.

On Tue, 13 Dec 2005 13:32:49 +0000, Iqbal wrote
> but will you check each From: or will there be a regex for them, if 
> in groups I suggest is_usr_in setting, and then setflag, and then route
> 
> Iqbal
> 
> sip wrote:
> 
> >There are a couple of things you COULD do. 
> >
> >You could use search().... like...
> >
> >if(search("^From: something"))
> >...
> >
> >That could be a little tricky with getting the formatting correct, but is
doable. 
> >
> >You could also use AVPs... 
> >
> >avp_write("$from", "i:19");
> >if(avp_check("i:19", "eq/1234 at somewhere.com/i"))
> >...
> >
> >
> >Don't trust me on exact syntax, though, but that's the idea. 
> >
> >N.
> >
> >
> >On Tue, 13 Dec 2005 07:55:49 -0500, Leo Papadopoulos wrote
> >  
> >
> >>Normally I would call a statement like:
> >>
> >>If (uri=^sip:123456 at somewhere.com)
> >>	{
> >>	..do something
> >>	}
> >>
> >>I would like to implement a dial plan using the "From:" header.
> >>
> >>i.e.: 
> >>If (from_uri=^sip:123456 at somewhere.com)
> >>	{
> >>	..do something
> >>	}
> >>
> >>Anyone know if something like this exists?
> >>
> >>Leo P.
> >>
> >>_______________________________________________
> >>Serusers mailing list
> >>serusers at lists.iptel.org
> >>http://lists.iptel.org/mailman/listinfo/serusers
> >>    
> >>
> >
> >_______________________________________________
> >Serusers mailing list
> >serusers at lists.iptel.org
> >http://lists.iptel.org/mailman/listinfo/serusers
> >
> >.
> >
> >  
> >




More information about the sr-users mailing list