update Issue 238

Backporting fixes from https://code.google.com/p/mobicents/issues/detail?id=3262 and adding non regression test
(cherry picked from commit 29050775c340091b68b0caff1acc8f54300c5457)