Skip to content

Instantly share code, notes, and snippets.

@caruizdiaz
Last active December 14, 2015 08:59
Show Gist options
  • Save caruizdiaz/5061580 to your computer and use it in GitHub Desktop.
Save caruizdiaz/5061580 to your computer and use it in GitHub Desktop.
Kamailio: modify "expires" attribute in Contact hdr.
$avp(s:contact) = $hdr(Contact);
# remove the proposed value
avp_subst("$avp(s:contact)", "/;expires=[0-9]+//gi");
# insert the value I want: 120.
append_to_reply("Contact: $avp(contact);expires=120\r\n");
sl_send_reply("200", "OK");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment