[OpenSIPS-Users] E_DLG_STATE_CHANGED and missing values
Aleksandar Sosic
alex at canyan.io
Sat Mar 28 13:07:08 EST 2020
Hi Guys,
I'm new to OpenSIPS, been using kamailio for some time but I'm not
that of a SIP expert.
Let me explain you my issue here...I'm trying to make HTTP REST calls
to a service on an INVITE to check if the call can be made, then on
the begin event of a call and when the call is closed.
I've successfully done the first API call with this block of code in
the main `route`:
```
if (is_method("INVITE") && !has_totag()) {
$dlg_val(account_tag) = $fU;
route(rating_authorization);
}
```
Now I'm using the `E_DLG_STATE_CHANGED` like this:
```
event_route[E_DLG_STATE_CHANGED] {
if($param(new_state) == 4 ) {
route(rating_begin_transaction);
}
...
}
```
Which I'm not sure is correct. In Kamailio I just do this:
```
event_route[dialog:start] {
route(RATING_BEGIN_TRANSACTION);
}
```
So the problem here is that in the route `rating_begin_transaction` I
don't see these variables here:
```
xlog("L_NOTICE", "rating_begin_transaction :: $ci,
$dlg_val(account_tag), $fu, $tu \n");
```
They seem to be `<null>` but I need to pass them in the REST call:
```
Mar 27 22:12:50 [376] rating_begin_transaction :: <null>, <null>, <null>, <null>
```
What am I doing wrong here?
Thanks,
---
Aleksandar Sosic
More information about the Users
mailing list