Hello,
I'm trying to connect kamailio to Microsoft Teams.
Dispatch is correctly configured and sended.
Following this tutorial :
https://skalatan.de/en/blog/kamailio-sbc-teams, I
added an Event_Route to add contact header to SIP OPTION from dispath to MS
:
event_route[tm:local-request] {
xlog("*** tm:local-request *** ");
if(is_method("OPTIONS") && $ru =~
"pstnhub.microsoft.com") {
xlog("L_INFO", "Append new contact !\n");
append_hf("Contact: <sip:MY_SBC_NAME.COM:5061
;transport=tls>\r\n");
}
xlog("L_INFO", "Sent out tm request: $mb\n");
}
When I check the log to see my sended frame, I don't see a contact header
field :
INFO: <script>: Append new contact !
INFO: <script>: Sent out tm request :
OPTIONS sip:sip.pstnhub.microsoft.com;transport=tls SIP/2.0
Via: SIP/2.0/TLS MY_SBC_NAME.COM:5061
;branch=z9hG4bK4497.f3e5e754000000000000000000000000.0
To: <sip:sip.pstnhub.microsoft.com;transport=tls>
From: <sip:MY_SBC_NAME.COM.fr>;tag=a76e006ace3802951ed860e08df964af-7971
CSeq: 10 OPTIONS
Call-ID: 2e1278ea77796160-9837@MY_SBC_IP
Max-Forwards: 70
Content-Length: 0
User-Agent: kamailio (5.2.1 (x86_64/linux))
According the documentation about textop, append_hf(txt[, hdr]) :
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE,
BRANCH_ROUTE.
So my question is append HF can be used in Event_route ?
Is there any other way to add contact header ?
Regards,
Arnaud