[OpenSIPS-Users] Check Live Peers on OpenSIPS

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 18 09:23:27 CET 2010


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
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


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




More information about the Users mailing list