Re: [OpenSIPS-Users] Microsoft teams multi tenancy
Hi All, Sorry for the trouble. issue was beyond opensips. the forwarding asterisk server forks the call to both opensips and to another endpoint, the second endpoint answers the call hence asterisk sends a CANCEL to opensips to cancel the ongoing transaction towards teams which makes sense now, Everything working as expected. Thank you. Distinguishing What && How ! On Thursday, 2 September 2021, 06:40:16 pm GMT+5:30, Pasan Meemaduma wrote: Hi Guys, upon further checking I'm seeing opensips sending a CANCEL as while microsoft teams replying with a 100 Trying. Is this I'm missing something for multi-tenancy in opensips config? I can even see a 180 Ringing coming but it appears opensips cancelling the transaction right after it send the INVITE to teams. Following is my opensips.cfg for aliases. I tried adding the second domain as an alias too, but it has no effect. Thank you /etc/opensips.cfg auto_aliases=no alias=tls:voippabx.cloud:5061 alias=tls:pasanm.voippabx.cloud:5061 alias=udp:172.31.36.39:5060 listen=tls:172.31.36.39:5061 listen=udp:172.31.36.39:5060 # CUSTOMIZE ME advertised_address=x.x.x.x Transaction Module loadmodule "tm.so" modparam("tm", "fr_timeout", 15) modparam("tm", "fr_inv_timeout", 90) modparam("tm", "restart_fr_on_each_reply", 0) modparam("tm", "onreply_avp_mode", 1) modparam("tm", "via1_matching", 0) modparam("tm", "ruri_matching", 0) modparam("tls_mgm", "certificate", "/etc/opensips/tls/default.crt") modparam("tls_mgm", "private_key","/etc/opensips/tls/default.key") modparam("tls_mgm", "ca_list", "/etc/opensips/tls/ca-default.crt") modparam("tls_mgm", "ca_dir", "/etc/ssl/certs/") modparam("tls_mgm","verify_cert", "1") modparam("tls_mgm","require_cert", "1") modparam("tls_mgm", "server_domain", "dom1=172.31.36.39:5061") modparam("tls_mgm","verify_cert", "[dom1]0") modparam("tls_mgm","require_cert", "[dom1]1") modparam("tls_mgm","tls_method", "[dom1]TLSv1_2") modparam("tls_mgm","certificate", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud.crt") modparam("tls_mgm","private_key", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud.key") modparam("tls_mgm", "ca_list", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud-ca.crt") modparam("tls_mgm", "ca_dir", "[dom1]/etc/ssl/certs/") modparam("tls_mgm", "tls_handshake_timeout", 3000) modparam("proto_tls", "tls_max_msg_chunks", 4048) --- fail call log of inbound call to teams --- [29809] DBG:proto_tls:tls_update_fd: New fd is 73 [29809] DBG:proto_tls:tls_write: write was successful (1240 bytes) [29809] DBG:proto_tls:proto_tls_send: after write: c= 0x7fa175ec28e8 n=1240 fd=73 [29809] DBG:proto_tls:proto_tls_send: buf= INVITE sip:+...@sip.pstnhub.microsoft.com SIP/2.0 Record-Route: Record-Route: Via: SIP/2.0/TLS a.a.a.a:5061;branch=z9hG4bKa8.655a009.0;i=0599f386 Via: SIP/2.0/TLS b.b.b.b:5061;received=b.b.b.b;branch=z9hG4bK4449b234;rport=34212 Max-Forwards: 69 From: "Private" ;tag=as0e54f44e To: Contact: Call-ID: 6f4643c21ba3b6f921fb63f9ab06@b.b.b.b:5061 CSeq: 102 INVITE User-Agent: Asterisk PBX 16.2.1~dfsg-1+deb10u2 Date: Thu, 02 Sep 2021 11:14:53 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces Content-Type: application/sdp Content-Length: 339 #015 v=0 o=root 69821 69821 IN IP4 b.b.b.b s=Asterisk PBX 16.2.1~dfsg-1+deb10u2 c=IN IP4 b.b.b.b t=0 0 m=audio 11364 RTP/SAVP 8 101 a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:EQ71mHmln2YJHJn8ujv0J/v+MiH6XJlfv7lSiXsv a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv [29809] DBG:tm:insert_timer_unsafe: [0]: 0x7fa175f4c480 (939) [29809] DBG:tm:do_t_cleanup: transaction 0x7fa175f4c230 already updated! Skipping update! [29809] DBG:tm:t_unref: UNREF_UNSAFE: [0x7fa175f4c230] after is 0 [29809] DBG:core:destroy_avp_list: destroying list (nil) [29809] DBG:core:receive_msg: cleaning up [29809] DBG:proto_tls:tls_read_req: tls_read_req end [29809] DBG:proto_tls:tls_read_req: Using the global ( per process ) buff [29809] DBG:proto_tls:tls_update_fd: New fd is 5 [29809] DBG:proto_tls:_tls_read: 460 bytes read [29809] DBG:proto_tls:tcp_handle_req: content-length= 0 [29809] DBG:proto_tls:tcp_handle_req: Nothing more to read on TCP conn 0x7fa175ea5000, currently in state 0 [29809] DBG:core:parse_msg: SIP Request: [29809] DBG:core:parse_msg: method: [29809] DBG:core:parse_msg: uri: [29809] DBG:core:parse_msg: version: [29809] DBG:core:parse_headers: flags= [29809] DBG:core:parse_via_param: found param type 232, = ; state=6 [29809] DBG:core:parse_via_param: found param type 235, = ; state=17 [29809] DBG:core:parse_via: end of header reached, state=5 [29809] DBG:core:parse_headers: via found, flags= [29809] DBG:core:parse_headers: this is the first via [29809] DBG:core:_parse_to: end of
Re: [OpenSIPS-Users] Microsoft teams multi tenancy
Hi Guys, upon further checking I'm seeing opensips sending a CANCEL as while microsoft teams replying with a 100 Trying. Is this I'm missing something for multi-tenancy in opensips config? I can even see a 180 Ringing coming but it appears opensips cancelling the transaction right after it send the INVITE to teams. Following is my opensips.cfg for aliases. I tried adding the second domain as an alias too, but it has no effect. Thank you /etc/opensips.cfg auto_aliases=no alias=tls:voippabx.cloud:5061 alias=tls:pasanm.voippabx.cloud:5061 alias=udp:172.31.36.39:5060 listen=tls:172.31.36.39:5061 listen=udp:172.31.36.39:5060 # CUSTOMIZE ME advertised_address=x.x.x.x Transaction Module loadmodule "tm.so" modparam("tm", "fr_timeout", 15) modparam("tm", "fr_inv_timeout", 90) modparam("tm", "restart_fr_on_each_reply", 0) modparam("tm", "onreply_avp_mode", 1) modparam("tm", "via1_matching", 0) modparam("tm", "ruri_matching", 0) modparam("tls_mgm", "certificate", "/etc/opensips/tls/default.crt") modparam("tls_mgm", "private_key","/etc/opensips/tls/default.key") modparam("tls_mgm", "ca_list", "/etc/opensips/tls/ca-default.crt") modparam("tls_mgm", "ca_dir", "/etc/ssl/certs/") modparam("tls_mgm","verify_cert", "1") modparam("tls_mgm","require_cert", "1") modparam("tls_mgm", "server_domain", "dom1=172.31.36.39:5061") modparam("tls_mgm","verify_cert", "[dom1]0") modparam("tls_mgm","require_cert", "[dom1]1") modparam("tls_mgm","tls_method", "[dom1]TLSv1_2") modparam("tls_mgm","certificate", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud.crt") modparam("tls_mgm","private_key", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud.key") modparam("tls_mgm", "ca_list", "[dom1]/etc/tls/voippabx.cloud/voippabx.cloud-ca.crt") modparam("tls_mgm", "ca_dir", "[dom1]/etc/ssl/certs/") modparam("tls_mgm", "tls_handshake_timeout", 3000) modparam("proto_tls", "tls_max_msg_chunks", 4048) --- fail call log of inbound call to teams --- [29809] DBG:proto_tls:tls_update_fd: New fd is 73 [29809] DBG:proto_tls:tls_write: write was successful (1240 bytes) [29809] DBG:proto_tls:proto_tls_send: after write: c= 0x7fa175ec28e8 n=1240 fd=73 [29809] DBG:proto_tls:proto_tls_send: buf= INVITE sip:+...@sip.pstnhub.microsoft.com SIP/2.0 Record-Route: Record-Route: Via: SIP/2.0/TLS a.a.a.a:5061;branch=z9hG4bKa8.655a009.0;i=0599f386 Via: SIP/2.0/TLS b.b.b.b:5061;received=b.b.b.b;branch=z9hG4bK4449b234;rport=34212 Max-Forwards: 69 From: "Private" ;tag=as0e54f44e To: Contact: Call-ID: 6f4643c21ba3b6f921fb63f9ab06@b.b.b.b:5061 CSeq: 102 INVITE User-Agent: Asterisk PBX 16.2.1~dfsg-1+deb10u2 Date: Thu, 02 Sep 2021 11:14:53 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces Content-Type: application/sdp Content-Length: 339 #015 v=0 o=root 69821 69821 IN IP4 b.b.b.b s=Asterisk PBX 16.2.1~dfsg-1+deb10u2 c=IN IP4 b.b.b.b t=0 0 m=audio 11364 RTP/SAVP 8 101 a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:EQ71mHmln2YJHJn8ujv0J/v+MiH6XJlfv7lSiXsv a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=sendrecv [29809] DBG:tm:insert_timer_unsafe: [0]: 0x7fa175f4c480 (939) [29809] DBG:tm:do_t_cleanup: transaction 0x7fa175f4c230 already updated! Skipping update! [29809] DBG:tm:t_unref: UNREF_UNSAFE: [0x7fa175f4c230] after is 0 [29809] DBG:core:destroy_avp_list: destroying list (nil) [29809] DBG:core:receive_msg: cleaning up [29809] DBG:proto_tls:tls_read_req: tls_read_req end [29809] DBG:proto_tls:tls_read_req: Using the global ( per process ) buff [29809] DBG:proto_tls:tls_update_fd: New fd is 5 [29809] DBG:proto_tls:_tls_read: 460 bytes read [29809] DBG:proto_tls:tcp_handle_req: content-length= 0 [29809] DBG:proto_tls:tcp_handle_req: Nothing more to read on TCP conn 0x7fa175ea5000, currently in state 0 [29809] DBG:core:parse_msg: SIP Request: [29809] DBG:core:parse_msg: method: [29809] DBG:core:parse_msg: uri: [29809] DBG:core:parse_msg: version: [29809] DBG:core:parse_headers: flags= [29809] DBG:core:parse_via_param: found param type 232, = ; state=6 [29809] DBG:core:parse_via_param: found param type 235, = ; state=17 [29809] DBG:core:parse_via: end of header reached, state=5 [29809] DBG:core:parse_headers: via found, flags= [29809] DBG:core:parse_headers: this is the first via [29809] DBG:core:_parse_to: end of header reached, state=10 [29809] DBG:core:_parse_to: display={}, ruri={sip:+xxx@msteamssbc.voippabx.cloud} [29809] DBG:core:get_hdr_field: [46]; uri=[sip:+xxx@msteamssbc.voippabx.cloud] [29809] DBG:core:get_hdr_field: to body [ ] [29809] DBG:core:get_hdr_field: cseq : <102> [29809] DBG:core:get_hdr_field: content_length=0 [29809] DBG:core:get_hdr_field: found end of header [29809] DBG:core:receive_msg: After parse_msg...