[OpenSIPS-Users] MS teams

Fabian Gast fgast+opensips at only640k.net
Mon Sep 21 11:25:25 EST 2020


Hi,

first:  it looks like your 'new'  IF - block is outside of any route. 
You close your local route before and start the main route after.. - But 
the new code block has to belong to some route block.

second:  on 3.1,
  send_reply("200", "OK");
does not work. - change this to send_reply(200, "OK");
( see 
https://opensips.org/html/docs/modules/3.1.x/signaling.html#func_send_reply 
)

same for  check_source_address("2") -this also has to be 
check_source_address(2)
( 
https://opensips.org/html/docs/modules/3.1.x/permissions#func_check_source_address)


All the best,

Fabian

On 2020-09-17 17:33, Andrew Colin wrote:
> nope :(
> 
> here is the full content
> 
> ####### Routing Logic ########
> 
> # main request routing logic
> 
> # Checks from MS Teams
> 
> local_route {
> 
>   $var(dst) = "pstnhub.microsoft.com [2]";
> 
>   if (is_method("OPTIONS") && ($(ru{s.index, $var(dst)}) != NULL))
> 
>     append_hf("Contact: <sip:mydomain.com:5061
> [3];transport=tls>\r\n");
> 
> }
> 
> if (is_method("OPTIONS") && is_domain_local("$rd") &&
> check_source_address("2")) {
> 
>   xlog("L_INFO",
> 
>                 "[MS TEAMS] OPTIONS In");
> 
>   send_reply("200", "OK");
> 
>   exit;
> 
> }
> 
> route{
> 



More information about the Users mailing list