On 18/06/14 06:35, Sambhaji Gayake wrote:
> As you can see, it has Accept-Contact header before Contact header.
> Now if I use below expression to extract Contact header, it always
> gives me Accept-Contact value.
> 
> <ereg regexp=".*" search_in="hdr" header="Contact:" 
> assign_to="tempFarContact"/>
> 
> 
> Is there a way to make sure we get Contact header value instead of 
> Accept-Contact value?

Looks like the header matching has a bug, where it will match on
substrngs - so when looking at "Accept-Contact:", it sees the
"Contact:" and matches against that.

I think there are two workarounds for now:

* If Accept-Contact always comes before Contact, you could use the
occurence="2" parameter, to match the second such header instead of
the first. (I do mean occurence, not occurrence.)

* Otherwise, you could match within the message rather than the
header, but explicitly include the header in the match - something
like <ereg regexp="^Contact: (.*)$" assign_to="dummy,tempFarContact"/>
should work (with a <Reference variables="dummy" /> later on to stop
complaints about variables only being used once).

Best,
Rob

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to