Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
Hello,
avps are lasting for the duration of the transaction. In route withindlg you handle already another transaction than the initial invite, so the avp is gone. Try to use $dlg_var(...) for this case -- check also if there is no $dlg(...) var that returns the state of the dialog and you can reuse.
Cheers, Daniel
On 16/02/15 18:08, Igor Potjevlesch wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch < igor.potjevlesch@gmail.com> wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] Envoyé : lundi 16 février 2015 18:36 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch < igor.potjevlesch@gmail.com> wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
*De :* Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] *Envoyé :* lundi 16 février 2015 18:36 *À :* 'Kamailio (SER) - Users Mailing List' *Objet :* RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
*De :* sr-users [mailto:sr-users-bounces@lists.sip-router.org sr-users-bounces@lists.sip-router.org] *De la part de* Muhammad Shahzad *Envoyé :* lundi 16 février 2015 18:27 *À :* Kamailio (SER) - Users Mailing List *Objet :* Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch < igor.potjevlesch@gmail.com> wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Indeed, RR could do the job. But it will not be easy to get the value after. It could be possible with regex I guess.
I will look at htable too. It's looks to be easier than dialog.
For AVPOPS, why not. I'm just afraid with the delay.
Many thanks for all these suggestions.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:05 À : Muhammad Shahzad Objet : Re: [SR-Users] Syntax issue?
Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.
If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Muhammad Shahzad
Sent: Monday, February 16, 2015 12:55 PM
To: Kamailio (SER) - Users Mailing List
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com ] Envoyé : lundi 16 février 2015 18:36 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I just tried with RR but it didn't really match what I want to do.
HTAble with Call-ID+From-tag is a really interesting idea. I start reading the documentation of the module.
Have you an example of what this might look like?
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:22 À : Igor Potjevlesch Objet : Re: [SR-Users] Syntax issue?
It's pretty straightforward using the right transformations on $hdr(Record-Route). Have a look at the transformations docs.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Igor Potjevlesch
Sent: Monday, February 16, 2015 1:17 PM
To: 'Kamailio (SER) - Users Mailing List'
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Indeed, RR could do the job. But it will not be easy to get the value after. It could be possible with regex I guess.
I will look at htable too. It's looks to be easier than dialog.
For AVPOPS, why not. I'm just afraid with the delay.
Many thanks for all these suggestions.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:05 À : Muhammad Shahzad Objet : Re: [SR-Users] Syntax issue?
Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.
If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Muhammad Shahzad
Sent: Monday, February 16, 2015 12:55 PM
To: Kamailio (SER) - Users Mailing List
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com ] Envoyé : lundi 16 février 2015 18:36 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I tried with $sht(myhash=>$ci::state) = "call_start".
It works fine!! Many thanks.
Is that could work too: $sht(myhash=>$ci::$ft::state) = "call_start"?
To delete this, can I do sht_rm_name_re("myhash=>$ci");? I want to be sure that after the call ends, everything is cleared.
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] Envoyé : lundi 16 février 2015 19:38 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
I just tried with RR but it didn't really match what I want to do.
HTAble with Call-ID+From-tag is a really interesting idea. I start reading the documentation of the module.
Have you an example of what this might look like?
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:22 À : Igor Potjevlesch Objet : Re: [SR-Users] Syntax issue?
It's pretty straightforward using the right transformations on $hdr(Record-Route). Have a look at the transformations docs.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Igor Potjevlesch
Sent: Monday, February 16, 2015 1:17 PM
To: 'Kamailio (SER) - Users Mailing List'
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Indeed, RR could do the job. But it will not be easy to get the value after. It could be possible with regex I guess.
I will look at htable too. It's looks to be easier than dialog.
For AVPOPS, why not. I'm just afraid with the delay.
Many thanks for all these suggestions.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:05 À : Muhammad Shahzad Objet : Re: [SR-Users] Syntax issue?
Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.
If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Muhammad Shahzad
Sent: Monday, February 16, 2015 12:55 PM
To: Kamailio (SER) - Users Mailing List
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com ] Envoyé : lundi 16 février 2015 18:36 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thank you Alex.
I'm not sure to understand the parameter "size" associated to the hashtable.
I have setup 4. So, I understand that I can have 2^4 entries. Does it mean that, if the table is composed with $ci+$ft, I can have 16 concurrent calls store into the table?
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 21:24 À : Igor Potjevlesch Objet : Re: [SR-Users] Syntax issue?
Yes, and yes.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Igor Potjevlesch
Sent: Monday, February 16, 2015 2:12 PM
To: 'Kamailio (SER) - Users Mailing List'
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
I tried with $sht(myhash=>$ci::state) = "call_start".
It works fine!! Many thanks.
Is that could work too: $sht(myhash=>$ci::$ft::state) = "call_start"?
To delete this, can I do sht_rm_name_re("myhash=>$ci");? I want to be sure that after the call ends, everything is cleared.
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] Envoyé : lundi 16 février 2015 19:38 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
I just tried with RR but it didn't really match what I want to do.
HTAble with Call-ID+From-tag is a really interesting idea. I start reading the documentation of the module.
Have you an example of what this might look like?
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:22 À : Igor Potjevlesch Objet : Re: [SR-Users] Syntax issue?
It's pretty straightforward using the right transformations on $hdr(Record-Route). Have a look at the transformations docs.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Igor Potjevlesch
Sent: Monday, February 16, 2015 1:17 PM
To: 'Kamailio (SER) - Users Mailing List'
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Indeed, RR could do the job. But it will not be easy to get the value after. It could be possible with regex I guess.
I will look at htable too. It's looks to be easier than dialog.
For AVPOPS, why not. I'm just afraid with the delay.
Many thanks for all these suggestions.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : lundi 16 février 2015 19:05 À : Muhammad Shahzad Objet : Re: [SR-Users] Syntax issue?
Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.
If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.
-- Sent from my BlackBerry. Please excuse errors and brevity.
From: Muhammad Shahzad
Sent: Monday, February 16, 2015 12:55 PM
To: Kamailio (SER) - Users Mailing List
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Syntax issue?
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com ] Envoyé : lundi 16 février 2015 18:36 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Muhammad Shahzad Envoyé : lundi 16 février 2015 18:27 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com > wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 02/16/2015 04:51 PM, Igor Potjevlesch wrote:
Thank you Alex.
I'm not sure to understand the parameter "size" associated to the hashtable.
I have setup 4. So, I understand that I can have 2^4 entries. Does it mean that, if the table is composed with $ci+$ft, I can have 16 concurrent calls store into the table?
Not exactly. The size refers to the number of unique buckets in the hash table. Entries do not have to be in unique buckets; however, insofar as the aim of a hash table is to provide O(1) lookup capability, it is desirable, from the point of view of the algorithmic concept, to have sufficient buckets to accommodate this. Even a very good hash algorithm can only compute to so many unique buckets if there are very few of them.
This is functionality that you take for granted in high-level interpreted languages, e.g. %hashes in Perl or $associative_arrays[] in PHP. The computer science underpinnings are exposed here at a more low level. If you really want to understand the idea behind the htable module and why it has that name:
http://en.wikipedia.org/wiki/Hash_table
If you're interested only in the applied dimension and not the formal properties, then the guidance is: provide enough bucket space to accommodate at least the maximal number of elements you reasonably expect to store concurrently. The memory allocation per bucket is trivial nowadays, so you really don't need to worry about this. For example, if you expect to store 5000 elements concurrently, just provide 2^13 (8192) buckets.
-- Alex
That's a clear pragmatic approach. Thank you.
Regards,
Igor.
-----Message d'origine----- De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Alex Balashov Envoyé : mardi 17 février 2015 00:25 À : sr-users@lists.sip-router.org Objet : Re: [SR-Users] Syntax issue?
On 02/16/2015 04:51 PM, Igor Potjevlesch wrote:
Thank you Alex.
I'm not sure to understand the parameter "size" associated to the
hashtable.
I have setup 4. So, I understand that I can have 2^4 entries. Does it mean that, if the table is composed with $ci+$ft, I can have 16 concurrent calls store into the table?
Not exactly. The size refers to the number of unique buckets in the hash table. Entries do not have to be in unique buckets; however, insofar as the aim of a hash table is to provide O(1) lookup capability, it is desirable, from the point of view of the algorithmic concept, to have sufficient buckets to accommodate this. Even a very good hash algorithm can only compute to so many unique buckets if there are very few of them.
This is functionality that you take for granted in high-level interpreted languages, e.g. %hashes in Perl or $associative_arrays[] in PHP. The computer science underpinnings are exposed here at a more low level. If you really want to understand the idea behind the htable module and why it has that name:
http://en.wikipedia.org/wiki/Hash_table
If you're interested only in the applied dimension and not the formal properties, then the guidance is: provide enough bucket space to accommodate at least the maximal number of elements you reasonably expect to store concurrently. The memory allocation per bucket is trivial nowadays, so you really don't need to worry about this. For example, if you expect to store 5000 elements concurrently, just provide 2^13 (8192) buckets.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States
Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Yes for the same reasons as you mentioned, it adds dependency on external entities in your setup and may not be suitable for any sensitive data (e.g. related to billing etc.).
Thank you.
On Mon, Feb 16, 2015 at 7:05 PM, Alex Balashov abalashov@evaristesys.com wrote:
Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.
If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.
-- Sent from my BlackBerry. Please excuse errors and brevity. *From: *Muhammad Shahzad *Sent: *Monday, February 16, 2015 12:55 PM *To: *Kamailio (SER) - Users Mailing List *Reply To: *Kamailio (SER) - Users Mailing List *Subject: *Re: [SR-Users] Syntax issue?
Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.
Another way is to set it as record-route parameter using RR module. (not recommended)
http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id
Thank you.
On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch < igor.potjevlesch@gmail.com> wrote:
Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?
Regards,
Igor.
*De :* Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] *Envoyé :* lundi 16 février 2015 18:36 *À :* 'Kamailio (SER) - Users Mailing List' *Objet :* RE: [SR-Users] Syntax issue?
Thank you guys, I will try this.
I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.
Regards,
Igor.
*De :* sr-users [mailto:sr-users-bounces@lists.sip-router.org sr-users-bounces@lists.sip-router.org] *De la part de* Muhammad Shahzad *Envoyé :* lundi 16 février 2015 18:27 *À :* Kamailio (SER) - Users Mailing List *Objet :* Re: [SR-Users] Syntax issue?
As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,
http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736
Thank you.
On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch < igor.potjevlesch@gmail.com> wrote:
Hello,
I'm looking for a way to track a call by using basic AVP like this:
Into a route that treats INVITE:
$avp(s:state)="call_start";
Then, if I test this AVP into WITHINDLG route:
if($avp(s:state)!="call_start") ; the test fails.
Did I miss something?
The goal is to update this AVP during the life of the transaction.
Regards,
Igor.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users