[OpenSIPS-Users] Check Live Peers on OpenSIPS

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 18 17:38:29 CET 2010


Hi Ahmed,

Ahmed Munir wrote:
> Hi Bogdan,
>
> Thanks for reply. I forgot to mention earlier that for I'm using 
> OpenSIPS + FreeRadius, where radius is doing accounting and 
> authentication. I used aaa_does_uri_exist() function as well, but 
> seems not working or making mistake while implementing it. On other 
> hand using lookup("location",m) function, on retcode = -1, I 
> redirected the INVITE to GW, using Dispatcher.  But though thanks for 
> your suggestion and I'll consider it. 
>
> Few things I want to ask you, as I listed below;
> 1-How can I forward SIP INVITE request to other SIP machine in state 
> full manner ?
simply do:
    # set new destination in RURI
    $rd= "11.22.33.44";
    # send it out in stateful mode
    t_relay();
    exit;

> 2- While accounting using radius, when user A (registered on OpenSIPS) 
> calls the user B who is located at GW side, accounting doesn't take 
> place.  On the other hand when user B (from GW) calls user A (to 
> OpenSIPS), accounting take place. I want to know its cause? Because I 
> want its accounting on both sides.
take care and check where you set in script the acc flag - maybe you are 
setting it only if lookup is successful.

Regards,
Bogdan
>
> Kindly advise me at your earliest.
>  
>
>     ------------------------------
>
>     Message: 6
>     Date: Thu, 18 Mar 2010 10:23:27 +0200
>     From: Bogdan-Andrei Iancu <bogdan at voice-system.ro
>     <mailto:bogdan at voice-system.ro>>
>     Subject: Re: [OpenSIPS-Users] Check Live Peers on OpenSIPS
>     To: OpenSIPS users mailling list <users at lists.opensips.org
>     <mailto:users at lists.opensips.org>>
>     Message-ID: <4BA1E2FF.3060702 at voice-system.ro
>     <mailto:4BA1E2FF.3060702 at voice-system.ro>>
>     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>     Hi Ahmed,
>
>     if the destination number (called number) is not a local subscriber (a
>     SIP user), you simply route the call to a PSTN GW (you do this
>     re-route
>     from the script)
>
>     To check if a user is a local subscriber, you can either check a
>     pattern
>     (like all my local users are alphanumeric, or all starts with 3345*,
>     etc), either simply check if the user does exists in the subscriber
>     table (see the URI module, the db_does_uri_exists() function:
>        http://www.opensips.org/html/docs/modules/1.6.x/uri.html#id271131
>
>     Regards,
>     Bogdan
>
>     Ahmed Munir wrote:
>     > Hi,
>     >
>     > I want to know how can I check the peers of source and destination
>     > phones? Like if both phones are located (registered) on one
>     > UAS(OpenSIPS) can call SIP-SIP, if any one phone is registered
>     on UAS
>     > and other is on PSTN, call will be re-routed to SIP-PSTN. In case of
>     > SIP-SIP, lookup("location") function works and I need to know
>     how can
>     > I forward call to SIP-PSTN ?
>     >
>     > Kindly advise me the method/ function can used for it.
>     >
>     > --
>     > Regards,
>     >
>     > Ahmed Munir
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     --
>     Bogdan-Andrei Iancu
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>
>
> -- 
> Regards,
>
> Ahmed Munir
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list