[SR-Users] update the to_tag on a local generated reply
Daniel-Constantin Mierla
miconda at gmail.com
Wed Nov 14 12:33:19 CET 2012
Hello,
On 11/13/12 7:32 AM, Uri Shacked wrote:
>
> what i need at the end is that the 408 record on the acc table will
> have the same to_tag as the 18X reply that came before.
>
> i understand i can not change the acc module to insert the 408 with
> this to_tag,
>
yes, it cannot be changed, the 183 is sent by another device than
kamailio, which sends the 408, so the tags are different.
> so i am trying to update the DB record with the 18X to_tag i have. the
> problem is, when do i do the sqlops? if i do it on the failure_route i
> do the update before the acc inserted the record....
>
> is this sounds ok to do? is there a more elegant way?
>
> if this is the right way when sould i do the sql update if not in
> failure route?
>
You can do insert with sqlops instead of acc - in failure route reset
the flag for acc and just use sql_query() where you set all the values
for the columns in the acc table.
Cheers,
Daniel
>
>
> On Tue, Nov 13, 2012 at 2:24 PM, Daniel-Constantin Mierla
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
> Hello,
>
>
> On 11/13/12 6:25 AM, Uri Shacked wrote:
>>
>> Hi,
>>
>> When i set a timer to "request time out" kamilio generates a 408
>> with now to_tag.
>>
>> I saved the to_tag from the 183 and try to update the acc table
>> with the to_tag (i need that for my CDR to work)
>>
>> My question is (understanding there is no option to set the
>> to_tag on the 408) is:
>>
>> How to i get the right timing to update using sqlops? i must
>> update after the acc inserted the row to the acc table....
>>
>> Any ideas?
>>
> rtimer module can be used to execute periodically some route
> blocks, perhaps you want to look for reply code 408 and change the
> fields you want.
>
> However, it may work to use a failure route and reset to-tag
> variable to $null if the status code is 408 -- this is a matter of
> what mechanism you use to write the accounting record.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
>
>
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121114/06dce8f4/attachment.htm>
More information about the sr-users
mailing list