[Users] t_relay and acc logging

Daniel-Constantin Mierla daniel at voice-system.ro
Thu Mar 2 13:19:17 CET 2006


Hello,

On 03/02/06 04:29, Script Head wrote:
> Hello,
>
> I am struggling to make sense of acc logging when combined with 
> forwarding a call. My openser.cfg is below this in message.
>
> Every time I place a call from a softphone that registeres to SER, I 
> get 30+ records in acc, most of them INVITEs and some are ACKs and 
> there are no BYEs. I can't seem to find any documentation that would 
> explain to me what I am doing wrong. Someone, please put me on the 
> right path.
I assume that flag 3 is used for accounting.

You must move setflag(3) after INVITE authentication and also to set it 
for BYEs if they are routed after Route headers. Here is a small example:
http://www.voice-system.ro/docs/ser-flags/ar01s03.html#srfl-ex-acc

Also, I see that you do a forward() or a sl_send_reply() followed by a 
t_relay(). At least in case of sl_send_reply() you should exit from the 
script.

Cheers,
Daniel

>
>
>
> route{
>         setflag(3);
>
>         if(method=="REGISTER") {
>                 if (!www_authorize("domain.com <http://domain.com>", 
> "subscriber")) {
>                         www_challenge(" richmedium.com 
> <http://richmedium.com>", "0");
>                         return;
>                 };
>                 save("location");
>                 return;
>         }
>
>         if (loose_route()) {
>                 # mark routing logic in request
>                 append_hf("P-hint: rr-enforced\r\n");
>                 return;
>         };
>
>         if(method=="INVITE") {
>                 if (!www_authorize("richmedium.com 
> <http://richmedium.com>", "subscriber")) {
>                         www_challenge("richmedium.com 
> <http://richmedium.com>", "0");
>                         return;
>                 };
>         }
>
>         if (uri=~"^sip:1[0-9]*{10}@192.168.1.10 
> <mailto:10%7D at 192.168.1.10>") {
>                 forward( 192.168.1.10 <http://192.168.1.10>,5061);
>         } else {
>                 sl_send_reply("404", "Use prefix 1 to dial");
>         }
>
>         t_relay();
>
> }
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list