added parsing of substate/retry-after
This commit is contained in:
parent
c1803bd705
commit
0178526e70
2 changed files with 11 additions and 5 deletions
|
@ -32,6 +32,7 @@ struct sipevent_substate {
|
|||
enum sipevent_subst state;
|
||||
enum sipevent_reason reason;
|
||||
struct pl expires;
|
||||
struct pl retry_after;
|
||||
struct pl params;
|
||||
};
|
||||
|
||||
|
|
|
@ -57,11 +57,6 @@ int sipevent_substate_decode(struct sipevent_substate *ss, const struct pl *pl)
|
|||
else
|
||||
ss->state = -1;
|
||||
|
||||
if (!sip_param_decode(&ss->params, "expires", ¶m))
|
||||
ss->expires = param;
|
||||
else
|
||||
ss->expires = pl_null;
|
||||
|
||||
if (!sip_param_decode(&ss->params, "reason", ¶m)) {
|
||||
|
||||
if (!pl_strcasecmp(¶m, "deactivated"))
|
||||
|
@ -83,6 +78,16 @@ int sipevent_substate_decode(struct sipevent_substate *ss, const struct pl *pl)
|
|||
ss->reason = -1;
|
||||
}
|
||||
|
||||
if (!sip_param_decode(&ss->params, "expires", ¶m))
|
||||
ss->expires = param;
|
||||
else
|
||||
ss->expires = pl_null;
|
||||
|
||||
if (!sip_param_decode(&ss->params, "retry-after", ¶m))
|
||||
ss->retry_after = param;
|
||||
else
|
||||
ss->retry_after = pl_null;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue