[Serusers] redirecting based on m= line in SDP

Greger V. Teigre greger at teigre.com
Mon Sep 18 09:32:08 CEST 2006


Look at the mangle module.
g-)

sip wrote:
> I don't know for certain if the textops module can read the SDP 
> headers (I think it can), but your best bet is likely using the 
> search() function from textops.
>
>
> Basic format is:  
>
> if(search("some regular expression here"))
> {
>   do whatever it is you want
> };
> *
>
> On Fri, 15 Sep 2006 00:18:43 -0700, Scott Keagy wrote*
> > What would folks recommend as the most efficient in terms of 
> processing, and most efficient in terms of understanding/coding in 
> SER, for how to do this? I'm not up to speed on SER-specific functions 
> and ways of doing things yet.
> >  
> > One way I thought of is using the exec_msg function, passing the 
> whole SIP message to a simple external script that searches for a 
> specific pattern in the m= line and returns 0 if it's found or -1 if 
> it's not found.
> >  
> > Are there other more straightforward ways to do this or is this 
> about as elegant as it's going to get? Obvious shortcoming is you can 
> only choose between two codec or payload types, but this is sufficient 
> for my purposes.
> >  
> > Regards,
> > Scott
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060918/9c903dd6/attachment.htm>


More information about the sr-users mailing list