[OpenSIPS-Users] Minimum length of call

Ron McCarthy ronmccar at gmail.com
Mon Jan 18 22:18:12 CET 2010


Jeff,

Yes, that's the goal anyways :)

I guess in my mind I thought if I could delay the BYE from going to the
upstream BUT send the BYE to the customer / ACK the BYE they sent then the
end user has no ideal what's going on and we just leave the channel open for
5 to 11 seconds and then send the BYE to the upstream. Seemed that easy
anyways, but figured it would not be.

If the far end hangs up that's fine, we get the BYE, ACK that BYE but do not
send the BYE to the upstream, this in theory is correct right?

Ill have to look into b2b more, that might be the answer, we shall see.

Thanks for the input.

On Mon, Jan 18, 2010 at 2:00 PM, Jeff Pyle <jpyle at fidelityvoice.com> wrote:

> Ron,
>
> Are you trying to avoid short-call charges from your carrier?  It's not
> easy.
>
> Even if this were possible, it wouldn't help if the far-end were to hang up
> first.  Even if they don't hang up first, they're likely going to hang up
> during this 12-second window you're looking to create in Opensips.  At best
> you'd buy yourself a second or so beyond actual disconnect time.
>
> This isn't a good idea at the SIP level either.  If you were to delay a
> BYE, you're going to get retransmissions from your UAC because it's looking
> for a 200 OK.
>
> The only way I could think of doing it would be in a custom B2B scenario,
> but even then, it probably wouldn't work well.  And in my opinion it's very
> complicated.
>
>
> - Jeff
>
>
> On Jan 18, 2010, at 3:55 PM, Ron McCarthy wrote:
>
> Hi List,
>
> When a user hangs up a call (call comes into proxy, connects to PSTN) and
> if the user that made the call hangups before a certain amount of time I
> want to delay sending the BYE to the upstream carrier, but ACK the BYE to
> the person they called and then have acc show the correct call timestamps of
> when the user really hanged up. Basically if a call is less then say 12
> seconds id like to sleep() a few seconds until it's past 12 seconds then
> hang the call up.
>
> Inside the loose_route() and is_method("BYE") I put this:
>
>           $avp(s:nowts)=$Ts;
>           $avp(s:calllength)=$avp(s:calltime) - $Ts;
>
>           if($avp(s:calllength) < "6"){
>             $avp(s:sleeptime)= "6" - $avp(s:calllength);
>             xlog("L_NOTICE","Now TS: $Ts Call was $avp(s:calllength)
> seconds long, sleeping for $avp(s:sleeptime)");
>             #sleep("$avp(s:sleeptime)");
>           } else {
>             xlog("L_NOTICE","Now TS: $Ts Call was $avp(s:calllength)
> seconds long, not sleeping");
>           }
>
>
> Inside the onreply_route I put this:
>
>   if(t_check_status("200") && is_method("INVITE")){
>     $avp(s:calltime)=$Ts;
>     xlog("L_NOTICE","Call connected at $avp(s:calltime)");
>   }
>
> To me I would think I would then have the timestamp at when the call
> started (that parts works), then in the loose_route() I could take the
> current timestamp and subtract the two, then if less the X seconds, sleep
> before it sends the BYE.
>
> I know their is more to it then that, but as a starting point the
> $avp(s:calltime) var is NULL when the call hits loose_route() is, I have
> verified this by the log.
>
> Any help / insight on this would be great, I would think the variables
> would be accessible anyway I try to check for values, but it appears that is
> not the case.
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> Regards,
> --------
> *Jeff Pyle*
> *Director, Voice Engineering*
> *Fidelity Voice & Data* | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio
> 44122
> P: 216-245-4106
> F: 216-595-0706
> E: jpyle at fidelityvoice.com
>
> Visit us at http://www.fidelityvoice.com
>
> 2008 & 2009 Inductee to the prestigious Weatherhead 100
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100118/12bfebf6/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 6468 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20100118/12bfebf6/attachment.jpeg 


More information about the Users mailing list