Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- route[PRESENCE] {
- if(!is_method("PUBLISH|NOTIFY|SUBSCRIBE"))
- return;
- #!ifdef WITH_PRESENCE
- if (!t_newtran())
- {
- sl_reply_error();
- exit;
- };
- if(is_method("NOTIFY"))
- {
- rls_handle_notify();
- #t_release();
- #exit;
- /* the call to t_release is no longer needed in 1.5 */
- }
- else
- if(is_method("PUBLISH"))
- {
- xlog("L_INFO", "Handling publish request - R=$ru ID=$ci\n");
- #handle_publish();
- if($hdr(Sender)!= $null)
- handle_publish("$hdr(Sender)");
- else
- handle_publish();
- t_release();
- }
- else
- if( is_method("SUBSCRIBE"))
- {
- xlog("L_INFO", "Handling subscribe request for event '$hdr(Event)' - R=$ru ID=$ci\n");
- #handle_subscribe();
- $var(ret_code)= rls_handle_subscribe();
- xlog("L_INFO", "Subscribe RLS:::::::::::::::: $var(ret_code)");
- if($var(ret_code)== 10) {
- #if($hdr(Sender)!= $null)
- # handle_subscribe("$hdr(Sender)");
- #else
- handle_subscribe();
- }
- t_release();
- }
- exit;
- #!endif
- # if presence enabled, this part will not be executed
- if (is_method("PUBLISH") || $rU==$null)
- {
- sl_send_reply("404", "Not here in plm mea");
- exit;
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement