Dear,
I am expecting to send a MESSAGE METHOD to a softphone supporting MESSAGE.
route[SEND_MESSAGE_METHOD]{ $uac_req(method)="MESSAGE";
$uac_req(ruri)="sip:192.168.1.29:5066";
$uac_req(furi)="sip:192.168.1.41:5066"; //
$uac_req(turi)="sip:9919995@192.168.1.24:5066";
$uac_req(callid)=$(mb{s.md5}); $uac_req(hdrs)="Subject: Emergency
Alert\r\n"; $uac_req(hdrs)=$uac_req(hdrs) + "Content-Type:
text/plain\r\n"; $uac_req(body)="Emergency Message";
$uac_req(evroute)=1; uac_req_send(); } event_route[uac:reply] {
xlog("MY_SEVERITY"," -- MESSAGE PROCESSING - received reply code is:
$uac_req(evcode)\n");}
My use case is to send message from KAMAILIO -> SOFTPHONE
kamailio : sip:192.168.1.41:5066 (physical ip address of the kamailio)
softphone : sip:192.168.1.29:5066 (physical ip address of the softphone)
$uac_req(ruri)="sip:192.168.1.29:5066";
$uac_req(furi)="sip:192.168.1.41:5066"; //
$uac_req(turi)="sip:9919995@192.168.1.24:5066";
The sip capture :
2022/03/18 02:20:58.947603 192.168.1.29:5066 -> 192.168.1.41:5066
MESSAGE sip:192.168.1.41:5066@192.168.1.41:5066 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.29:5066;branch=z9hG4bKPj40bcc72324d647f8b96fc783e181f611
Max-Forwards: 70
From: "codec7-private"
<sip:9919997@192.168.1.41>;tag=416038ac55514b439a5cd5894770c3d8
To: <sip:192.168.1.41:5066@192.168.1.41>
Call-ID: 9381648157be49ff845b5e413dc9a95c
CSeq: 9148 MESSAGE
User-Agent: MicroSIP/3.20.7
Content-Type: text/plain
Content-Length: 3
;-)
2022/03/18 02:20:58.948822 192.168.1.41:5066 -> 192.168.1.29:5066
SIP/2.0 200 Stored
Via: SIP/2.0/UDP
192.168.1.29:5066;branch=z9hG4bKPj40bcc72324d647f8b96fc783e181f611;rport=5066
From: "codec7-private"
<sip:9919997@192.168.1.41>;tag=416038ac55514b439a5cd5894770c3d8
To:
<sip:192.168.1.41:5066@192.168.1.41>;tag=cbfe6543b9079987bce3b5b9a0d1195a.b63b503b
Call-ID: 9381648157be49ff845b5e413dc9a95c
CSeq: 9148 MESSAGE
Server: kamailio (5.5.4 (x86_64/linux))
Content-Length: 0
Now, if I want to use his username@domain
kamailio : sip:192.168.1.41:5066 (physical ip address of the kamailio)
softphone : sip:9919997@192.168.1.41:5066
The message is sent to kamailio itself not to the softphone
2022/03/18 02:30:39.285927 192.168.1.41:5060 -> 192.168.1.41:5066
MESSAGE sip:9919997@192.168.1.41:5066 SIP/2.0
Via: SIP/2.0/UDP
xxx.xxx.xxx.210:5060;branch=z9hG4bK0cb8.a39b5180000000000000000000000000.0
To: <sip:9919997@192.168.1.41:5066>
From: <sip:192.168.1.41:5066>;tag=b4685c5f5f5fc30f8dcbb49a48fe9e25-4047894c
CSeq: 10 MESSAGE
Call-ID: 4cb973823835008ec4b20d1c67d9fb84
Max-Forwards: 70
Content-Length: 17
User-Agent: kamailio (5.5.4 (x86_64/linux))
Subject: Emergency Alert
Content-Type: text/plain
Emergency Message
2022/03/18 02:30:39.287590 192.168.1.41:5066 -> 192.168.1.41:5060
SIP/2.0 200 Stored
Via: SIP/2.0/UDP
xxx.xxx.xxx.210:5060;branch=z9hG4bK0cb8.a39b5180000000000000000000000000.0;rport=5060;received=192.168.1.41
To: <sip:9919997@192.168.1.41:5066>;tag=cbfe6543b9079987bce3b5b9a0d1195a.76a88393
From: <sip:192.168.1.41:5066>;tag=b4685c5f5f5fc30f8dcbb49a48fe9e25-4047894c
CSeq: 10 MESSAGE
Call-ID: 4cb973823835008ec4b20d1c67d9fb84
Server: kamailio (5.5.4 (x86_64/linux))
Content-Length: 0
- finaly, how to relay the message from one softphone to another softphone through
kamailio proxy?
Best Regards
--
Youssef