[OpenSIPS-Users] Relay SUBSCRIBE after handle_subscribe

Michele Pinassi michele.pinassi at unisi.it
Mon Mar 30 11:52:58 CEST 2015


Hi all,

is possibile to relay SUBSCRIBE packet after an handle_subscribe() ?

To be more clear, my OpenSIPS server get all SUBSCRIBE packets (send
from phone A to phone B) so i can keep control of "who subscribe who"
but i need to relay that packet to the correct destination.

I did the following:

# Presence route
route[handle_presence] {
    if(!t_newtran()){
        sl_reply_error();
        exit;
    }

    xlog("L_INFO", "Route PRESENCE $rm for Event $hdr(Event) from $fu to
$to R-URI $ru");

    if (is_method("PUBLISH")) {
            handle_publish();
    } else if (is_method("SUBSCRIBE")) {
            handle_subscribe();
            t_relay();
        }
    } else if(is_method("NOTIFY")) {
          t_relay();
    }
    exit;
}

Is that correct ? There's another better way to do this ?

Michele

-- 
Michele Pinassi
Responsabile Telefonia di Ateneo
Servizio Reti, Sistemi e Sicurezza Informatica - Università degli Studi di Siena
tel: 0577.(23)5000 - fax: 0577.(23)2053

Per trovare una soluzione rapida ai tuoi problemi tecnici
consulta le FAQ di Ateneo, http://www.faq.unisi.it 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opensips.org/pipermail/users/attachments/20150330/c9772362/attachment.pgp>


More information about the Users mailing list