Hi all,
I'm using Kamailio to forward calls between 2 Service Providers and I need
to rewrite the From header "domain" URI.
Example:
From: "+18888888888" <sip:+18888888888@sip.sp1.com> to
From: "+18888888888" <sip:+18888888888@*sip.sp2.com <http://sip.sp2.com>*>
*Call flow:*
Phone A --- > SP1 ---> sip ----> (kamailio) SP2 --(LOCATION)-> Phone B
When Phone A calls SP2 PhoneB, it contains original sip domain from sp1. (
sip.sp1.com) hence user in SP2 can see call comes from SP1. I would like to
rewrite the From domain field in this conditions:
a) Calls comes from "sip.sp1.com" AND
b) Call is being routed to PhoneB.
Right now Im using the following code to find user and send call to B.
#!ifdef WITH_ALIASDB
# search in DB-based aliases
xlog("L_INFO","alias_db_lookup: Call received. $rU\n");
if(alias_db_lookup("dbaliases")) {
route(SIPOUT);
}
#!endif
I found this in documentation:
$fd - From URI domain
if($hdr(From)=~"sip.sp1\.com") {
...}
But not sure where is the best place to overwrite the From URI domain
header.
Thanks
Hello,
I propose to freeze the development of v5.0.0 on January 4, 2017.
Hopefully it is just in time for getting the frozen version in next
Debian stable.
Meanwhile, I hope we can get rid of mi code to have a proper fresh start
with cleaned up code in 5.0.0. The big code tree restructuring was
already done, config files in embedded languages is there as well (it
needs more exports, but that's only about available time to fill some
structures, not new feature development).
If anyone wants to make other proposals, reply to mailing lists and
let's discuss.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hi
I have modified the file so that if i send register request to kamailio it sud register on asterisk also.
i have shared you the code but i cant see anyting happening in the asterisk server.
please help me ASAP.
L&T Technology Services Ltd
www.LntTechservices.com<http://www.lnttechservices.com/>
This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
I implemented full NAT logic as per the sample config. Still unable to resolve the issue.
How do I let Kamailio change record_route header to use public ip address?
Please help!!!
(attached are latest scripts)
From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 12:39 PM
To: 'sr-users(a)lists.sip-router.org' <sr-users(a)lists.sip-router.org>
Subject: Kamailio behind NAT, ACK to private IP not advertised public IP.
Hi,
I am encountering the same problem described in google groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However I dint not find any resolution hence writing again.
200 OK sent from the server has private Ip in its record route. As you see below, though the message is received on public IP (63.149.103.72) , the record route is set to private IP (172.31.211.31)
I used listen with advertise of public IP, it did not work. Please find attached the config I am using.
How do I change it send public ip only when talking to external world.
Can someone point to me clear documentation how to configure Kamailio for NAT traversal.
The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, +0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length: 355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--
The following is the ACK sent by public computer in reply to the above message. Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, +0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length: 0
Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>
Join us: [cid:image001.gif@01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720> [cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom> [cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom> [cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>
[cid:image005.png@01D1C9C9.C4E8B6D0]
DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.
Hi,
Is there a string split function built into Kamailio for use in the cfg script?
I'd like to split a string of key/value pairs inside the cfg script.
For example: Key1=Value1;Key2=Value2;
First split on ;
Then on =
I think I can use the String Transformation {s.select,index,separator}, but I was hoping there is a built in function.
{param.valueat,index[, delimiter]} may also be an option.
Regards,
Grant
I am attaching latest config along with kamailio log file and client trace.
Please let me know how I can get Kamailio to advertise public ip in record route.
I followed all the steps mentioned here - http://www.fredposner.com/1457/kamailio-behind-nat/
Thanks
Pranathi
From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 5:09 PM
To: 'sr-users(a)lists.sip-router.org' <sr-users(a)lists.sip-router.org>
Cc: Mick McGrellis <MMcGrellis(a)cyracom.com>; 'miconda(a)gmail.com' <miconda(a)gmail.com>
Subject: RE: Kamailio behind NAT, ACK to private IP not advertised public IP.
I implemented full NAT logic as per the sample config. Still unable to resolve the issue.
How do I let Kamailio change record_route header to use public ip address?
Please help!!!
(attached are latest scripts)
From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 12:39 PM
To: 'sr-users(a)lists.sip-router.org' <sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Subject: Kamailio behind NAT, ACK to private IP not advertised public IP.
Hi,
I am encountering the same problem described in google groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However I dint not find any resolution hence writing again.
200 OK sent from the server has private Ip in its record route. As you see below, though the message is received on public IP (63.149.103.72) , the record route is set to private IP (172.31.211.31)
I used listen with advertise of public IP, it did not work. Please find attached the config I am using.
How do I change it send public ip only when talking to external world.
Can someone point to me clear documentation how to configure Kamailio for NAT traversal.
The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, +0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length: 355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--
The following is the ACK sent by public computer in reply to the above message. Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, +0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length: 0
Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>
Join us: [cid:image001.gif@01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720> [cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom> [cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom> [cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>
[cid:image005.png@01D1C9C9.C4E8B6D0]
DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.
Hi,
I am encountering the same problem described in google groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However I dint not find any resolution hence writing again.
200 OK sent from the server has private Ip in its record route. As you see below, though the message is received on public IP (63.149.103.72) , the record route is set to private IP (172.31.211.31)
I used listen with advertise of public IP, it did not work. Please find attached the config I am using.
How do I change it send public ip only when talking to external world.
Can someone point to me clear documentation how to configure Kamailio for NAT traversal.
The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, +0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length: 355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--
The following is the ACK sent by public computer in reply to the above message. Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, +0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" <sip:cust1@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length: 0
Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>
Join us: [cid:image001.gif@01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720> [cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom> [cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom> [cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>
[cid:image005.png@01D1C9C9.C4E8B6D0]
DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.
Hi All,
I am a new user of kamailio. We have setup a kamilio server with RTP proxy.
Most of the features are working fine except BYE.
Say User A and B are registered in kamailio server. A (caller) connected to
B(called), call established.
1. If Caller (A) disconnects the call, everything goes fine. B gets
disconnected and call releases.
2. But if Called party (B) disconnects the call, A never gets disconnected.
I checked trace as well, in this case caller (A) gets a BYE with B's callid.
So A rejects call with "481 call leg transaction doesn't exists".
Basically A party and B party has separate dialog established with Kamilio.
So they have two separate callids . All messages are exchanged correctly.
Only when B party disconnects call, kamailio sends BYE to A party with B
party callid.
Please help me to resolve this issue. Do let me know if any more information
required.
------ INVITE--------------------------
INVITE sip:966268@*** SIP/2.0
Via: SIP/2.0/UDP
192.168.1.36:63238;branch=z9hG4bK-524287-1---e64d171ec3b0b54e;rport
Max-Forwards: 70
Contact: <sip:334031@***:8906;rinstance=ea9b5f48eb342a98>
To: <sip:966268@***>
From: "334031"<sip:334031@****>;tag=4406552c
Call-ID: 82158NzljY2NiYTA5YmI3M2U1MzQyODgwMWYwYTI3ZWJjNzc
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS,
MESSAGE
Content-Type: application/sdp
Proxy-Authorization: Digest
username="334031",realm="*****",nonce="****",uri="sip:966268@***",response="
***",algorithm=MD5
Supported: replaces
User-Agent: X-Lite release 4.9.6 stamp 82158
Content-Length: 334
v=0
o=- 13127393523589215 1 IN IP4 192.168.1.36
s=X-Lite release 4.9.6 stamp 82158
c=IN IP4 192.168.1.36
t=0 0
m=audio 57116 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
-------------------------BYE--------------------------------
BYE sip:334031@192.168.1.36:63238;rinstance=ea9b5f48eb342a98 SIP/2.0
Via: SIP/2.0/UDP
***:5060;branch=z9hG4bKa28b.a2ac8c26802cdcc8c619784643f82000.0
Via: SIP/2.0/UDP
10.0.0.1;branch=z9hG4bKsr-HqsDUwx8-phRByVr-9VwUlbcUlPcIpKo-0noY0rjI95gmMhg10
qgY9mc-w5He0EJbTbkb3AZt2Yna6n4uPmqbJWEYwVKYlDTYlH*
From: <sip:966268@***>;tag=1665200125
To: "334031" <sip:334031@***>;tag=4406552c
Call-ID:
!!:xePve9XKtEJ4NJJT-2hM9lsXe6RemqZPIRAa1PZf1wJ4DRx5ePRce0OwbHAY-RD4Hlya-HRwe
MH4N6RemHYMI9Y0tV**
CSeq: 3 BYE
Contact: <sip:10.0.0.1;line=sr-mcsjIlJcYlxcIPVo-0-8Ylb8-9bKUlPjIlxEYwbw>
Max-Forwards: 69
User-Agent: Yealink SIP-T20P 9.72.0.80
Content-Length: 0
-------------------------- 481---------------------
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/UDP
***:5060;branch=z9hG4bKa28b.a2ac8c26802cdcc8c619784643f82000.0;received=35.1
64.228.12
Via: SIP/2.0/UDP
10.0.0.1;branch=z9hG4bKsr-HqsDUwx8-phRByVr-9VwUlbcUlPcIpKo-0noY0rjI95gmMhg10
qgY9mc-w5He0EJbTbkb3AZt2Yna6n4uPmqbJWEYwVKYlDTYlH*
To: "334031" <sip:334031@***>;tag=4406552c
From: <sip:966268@***>;tag=1665200125
Call-ID:
!!:xePve9XKtEJ4NJJT-2hM9lsXe6RemqZPIRAa1PZf1wJ4DRx5ePRce0OwbHAY-RD4Hlya-HRwe
MH4N6RemHYMI9Y0tV**
CSeq: 3 BYE
Accept-Language: en
Content-Length: 0
Regards,
Nihar