Hi all
I am using kamailio for several years now and I am really happy with it!
Now an new scenario to solve:
Sip-carrier A --> Kamailio loadbalancer --> multiple kamailio routing gateways --> freeswitch/sbc/media-gw/whatever --> sip - carriers B,C & D
Kamailio gateways:
They are doing different checks, manipulate the numbers (national /international format) and they use the carrierroute module
freeswitch/sbc/media-gw/whatever:
how can I use these services with the routing information from the carrierroute module?
These media-gws will do the connection and maybe transcoding to the carriers.
Can you please help me with the interaction within the systems "routing gateways" and the "media/sbc gateways"?
Do I have to add all the carriers in the carrierroute as "routes" with the ip of the media gw/freeswitch and then splitting it up on the freeswitch again?
Thanks for helping
Oli
Looking into the topos module of 4.4.2 I see something unexpected, ACK and
BYE are routed directly to the Contact in the 200 OK on an INVITE where
the 200 OK has a Record-Route.
Without the topos module the message flow is as expected:
109.235.32.57<->185.61.68.106<->109.235.32.55
With topos the ACK and BYE take a different route:
109.235.32.57<->185.61.68.106<->109.235.32.55
<->109.235.32.48
109.235.32.5x are proxies. 185.61.68.106 is the registrar
To my understanding, in the callflow below the ACK should be send via
the proxy that inserted Record-Route: <sip:109.235.32.55;lr> in the
200 OK. Am I wrong to conclude this or the topos module ignoring the
routing?
Also note the To/From are passed untouched in the ACK/BYE and the BYE to
the called endpoint hasn't had its Via headers stripped.
Call scenario:
tryba/+31407110xxx calls 0880100XXX. Both are registered to
185.61.68.106 via proxies (resp. 109.235.32.57 and 109.235.32.55)
>From 109.235.32.57 -> 185.61.68.106:
INVITE sip:0880100XXX@sip.itco.nl SIP/2.0
Record-Route: <sip:109.235.32.57;r2=on;lr>
Record-Route: <sip:109.235.32.57;transport=tcp;r2=on;lr>
Via: SIP/2.0/UDP 109.235.32.57;branch=z9hG4bK7dd7.e15a4ffb2c3a7f882117b80c85f75223.0;i=60c
Via: SIP/2.0/TCP 10.0.3.169:5067;rport=5067;received=109.235.34.226;branch=z9hG4bKb5004b60de287221
Route: <sip:109.235.32.57;transport=tcp;lr>
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>
Contact: <sip:tryba@10.0.3.169:5067;transport=tcp;alias=109.235.34.226~5067~2>
>From 185.61.68.106 -> 109.235.32.55:
INVITE sip:+31880100XXX@109.235.32.48 SIP/2.0
Via: SIP/2.0/UDP 185.61.68.106;branch=z9hG4bK7dd7.d4cdfe8014e0d5d806b4dc4a7422c8e0.1
Route: <sip:loadbalancer@109.235.32.55;lr;received=sip:109.235.32.48:5060>
From: <sip:+31407110XXX@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:+31880100XXX@sip.itco.nl>
Contact: <sip:btpsh-57b6cc75-f42d-1@185.61.68.106>
>From 109.235.32.55 -> 185.61.68.106:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 185.61.68.106;rport=5060;branch=z9hG4bK7dd7.d4cdfe8014e0d5d806b4dc4a7422c8e0.1
Record-Route: <sip:109.235.32.55;lr>
From: <sip:+31407110XXX@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:+31880100XXX@sip.itco.nl>;tag=as61fc6a47
Contact: <sip:%2b31880100XXX@109.235.32.48>
>From 185.61.68.106 -> 109.235.32.57
SIP/2.0 200 OK
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>;tag=as61fc6a47
Via: SIP/2.0/UDP 109.235.32.57;branch=z9hG4bK7dd7.e15a4ffb2c3a7f882117b80c85f75223.0;i=60c,SIP/2.0/TCP 10.0.3.169:5067;rport=5067;received=109.235.34.226;branch=z9hG4bKb5004b60de287221
Contact: <sip:atpsh-57b6cc75-f42d-2@185.61.68.106>
Record-Route: <sip:109.235.32.57;r2=on;lr>,<sip:109.235.32.57;transport=tcp;r2=on;lr>
>From 109.235.32.57 -> 185.61.68.106:
ACK sip:atpsh-57b6cc75-f42d-2@185.61.68.106 SIP/2.0
Via: SIP/2.0/UDP 109.235.32.57;branch=z9hG4bK7dd7.a49ec0c055166a1935ff84cfca4d1a5c.0;i=60c
Via: SIP/2.0/TCP 10.0.3.169:5067;rport=5067;received=109.235.34.226;branch=z9hG4bK24aff2df2ee7b43f
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>;tag=as61fc6a47
Contact: <sip:tryba@10.0.3.169:5067;transport=tcp;alias=109.235.34.226~5067~2>
>From 185.61.68.106 -> 109.235.32.48
ACK sip:%2b31880100XXX@109.235.32.48 SIP/2.0
Via: SIP/2.0/UDP 185.61.68.106;branch=z9hG4bK7dd7.ac1b9a45042f9c26277afb9ec32bebe0.0
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>;tag=as61fc6a47
Contact: <sip:btpsh-57b6cc75-f42d-1@185.61.68.106>
>From 109.235.32.57 -> 185.61.68.106
BYE sip:atpsh-57b6cc75-f42d-2@185.61.68.106 SIP/2.0
Via: SIP/2.0/UDP 109.235.32.57;branch=z9hG4bK4dd7.24da86af0a970ee399c9504933d8d751.0;i=60c
Via: SIP/2.0/TCP 10.0.3.169:5067;rport=5067;received=109.235.34.226;branch=z9hG4bK0d8db1380c5011b6
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>;tag=as61fc6a47
>From 185.61.68.106 -> 109.235.32.48
BYE sip:%2b31880100XXX@109.235.32.48 SIP/2.0
Via: SIP/2.0/UDP 185.61.68.106;branch=z9hG4bK4dd7.4916bf7bcaa3b0346e43c3785a9be782.0
Via: SIP/2.0/UDP 109.235.32.57;branch=z9hG4bK4dd7.24da86af0a970ee399c9504933d8d751.0;i=60c
Via: SIP/2.0/TCP 10.0.3.169:5067;rport=5067;received=109.235.34.226;branch=z9hG4bK0d8db1380c5011b6
From: <sip:tryba@sip.itco.nl>;tag=576aff337d33fbe5
To: <sip:0880100XXX@sip.itco.nl>;tag=as61fc6a47
Hi. I usein kamailio 4.4 +rtpengine 4.5 for making videocalls though Web
And have issue with it:
I have one way audio and video till video not started.
For example i calling form A point to B point
B point accept call and have Audio and Video flow from the point A but
point A have no any media flow.
For now i using scheme when kamailio runs together with asterisk but also i
had this issue with calls without asterisk.
There is a link on issue i discribed before
https://github.com/sipwise/rtpengine/issues/260
I use settings at the kamailio
rtpengine_manage("force trust-address replace-origin
replace-session-connection RTP/SAVPF") for making UDP call to WS
And
rtpengine_manage("trust-address replace-origin replace-session-connection
ICE=remove DTLS=passive RTP/AVP media-address=MY_IP_ADDR");
For converting to back
I use folloving scheme (Call from A to B)
WSphone(A)->(1-st leg)-> kamailio+rtpeinge->(2-nd leg->)asterisk
asterisk ->(3-st leg)-> kamailio+rtpeinge->(4-th leg)->WSphone(B)
At the example below rtpengine (with kamailio) an asteirsk uses same server
But connection made thoufh external interface. not local (it is made
because in a production scheme asteirsk will be in a different server, but
actuaaly it is does not have any matter, just for understanding topology)
So at the logs after call i see next things
First call from point A to asterisk
(first leg and second leg)
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: ------ Media #1
<https://github.com/sipwise/rtpengine/issues/1> (audio over RTP/SAVPF)
using opus/48000/2
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30170 <> A.po.int.ip:51918, 244 p, 22944 b, 0 e, 1473403349
last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30171 <> A.po.int.ip:51920 (RTCP), 4 p, 196 b, 0 e,
1473403349 last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: ------ Media #2
<https://github.com/sipwise/rtpengine/issues/2> (video over RTP/SAVPF)
using VP8/90000
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30200 <> A.po.int.ip:51922, 209 p, 164499 b, 0 e, 1473403349
last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30201 <> A.po.int.ip:51924 (RTCP), 129 p, 4292 b, 0 e,
1473403349 last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --- Tag 'as76205e6a',
created 0:39 ago for branch '', in dialogue with '5aalmrbaek'
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: ------ Media #1
<https://github.com/sipwise/rtpengine/issues/1> (audio over RTP/AVP) using
opus/48000/2
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30156 <> my.ser.ver.ip:29236, 242 p, 23861 b, 0 e, 1473403349
last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30157 <> my.ser.ver.ip:29237 (RTCP), 0 p, 0 b, 0 e,
1473403340 last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: ------ Media #2
<https://github.com/sipwise/rtpengine/issues/2> (video over RTP/AVP) using
VP8/90000
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30184 <> my.ser.ver.ip:27252, 148 p, 152972 b, 0 e,
1473403349 last_packet
[1473403379.000108] INFO: [ga5c8qb2uaasr42j63h4]: --------- Port
my.ser.ver.ip:30185 <> my.ser.ver.ip:27253 (RTCP), 0 p, 0 b, 0 e,
1473403340 last_packet
call from asterisk to point B (3-d leg and 4-th leg)
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
------ Media #1 <https://github.com/sipwise/rtpengine/issues/1>(audio over
RTP/AVP) using opus/48000/2
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30238 <> my.ser.ver.ip:29958, 239 p, 24902 b,
0 e, 1473403349 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30239 <> my.ser.ver.ip:29959 (RTCP), 0 p, 0 b,
0 e, 1473403340 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
------ Media #2 <https://github.com/sipwise/rtpengine/issues/2>(video over
RTP/AVP) using VP8/90000
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30264 <> my.ser.ver.ip:40374, 205 p, 163663 b,
0 e, 1473403349 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30265 <> my.ser.ver.ip:40375 (RTCP), 0 p, 0 b,
0 e, 1473403340 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--- Tag 'fgl9f33gf0', created 0:39 ago for branch '', in dialogue with
'as5f26dbd9'
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
------ Media #1 <https://github.com/sipwise/rtpengine/issues/1>(audio over
RTP/SAVPF) using opus/48000/2
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30218 <> B.po.int.ip:26138, 242 p, 21481 b, 0
e, 1473403349 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30219 <> B.po.int.ip:30161 (RTCP), 4 p, 188 b,
0 e, 1473403349 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
------ Media #2 <https://github.com/sipwise/rtpengine/issues/2>(video over
RTP/SAVPF) using VP8/90000
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30246 <> B.po.int.ip:31174, 198 p, 163302 b, 0
e, 1473403349 last_packet
[1473403379.000108] INFO:
[7742bfcf0e9570ab6d7d40a52cd4cd4a@my.ser.ver.ip:5999]:
--------- Port my.ser.ver.ip:30247 <> B.po.int.ip:59057 (RTCP), 12 p, 540
b, 0 e, 1473403349 last_packet
As i see there is no any lost pakets and errors
and all packets going through
but at the asteirsk log i see that
Sent RTP P2P packet to my.ser.ver.ip:30238 (type 107, len 000102)
Sent RTP P2P packet to my.ser.ver.ip:30156 (type 111, len 000071)
Sent RTP P2P packet to my.ser.ver.ip:30238 (type 107, len 000079)
when packets sended from asterisk to rtpengine they have no response
So it looks like that asterisk have no response from rtpengine when sending
him any IP.
Also i checked at the webphone side but it sending pakents. So at this side
no trouble...
Thanks for advices!
Hello list,
I have a proxy that manage fix calls and a proxy that manage mobile calls.
I want to implement call forking so when I call to a fix phone the call
goes to the fix proxy and it forks to the mobile proxy who manage the call
and viceversa. I want the fix to ring 2 or 3 times before the mobile.
In order to do so in my fix proxy I added a diversion field with the reason
"forking" and in my mobile proxy I check if the reason is "forking" to wait
with the fonction "async_route" from the ASYNC module. When I call the fix
I can fork to the mobile with delay without any problem because in that
case my fix proxy manage one call and my mobile proxy the other one.
But when I call the mobile the call doesn't even get to my fix proxy
because my mobile proxy has to make the original call to wait while he is
forking the fix call to my other proxy. And i think that calling the
async_route fonction makes both calls to wait.
My code is:
Fix proxy:
if($tU==123456789){
add_diversion("forking");
append_branch("sip:987654321@proxy_mobile");
}
Mobile proxy:
if($tU==987654321){
$var(z) = "1";
append_branch("sip:123456789@proxy_fix");
}
route[INVITE]{
if($dir == "forking"){
async_route("RELAY", "7");
}else if($var(z) == "1"){
async_route("RELAY", "7");
}else{
route(RELAY);
exit;
}
}
How can I differentiate in the second scenario when I call the mobile phone
to fork to the fix phone?
Thank you for your help.
Igor.
Hi. I try to make working kamailio on TCP infront of asterisk
Before to send to asteisk any packet i added
$fs=ip.add.re.ss:port
Also discribed
listen=tcp:ip.add.re.ss:port
But kamailio send outgoing packets from random prot throug TCP
Presume i configured 5060 port but it send from 35410 port.
googling on a core functions didn gives me any answer.
May be i forget something to set at the config?
I know about dispatcher but it not always canbe heplfull. Sometimes i need
my own logic that not implemented at the dispatcher.
For checking kamailio live from asterisk im use qualfy for keepalives, if i
use asterisk only as media server but it not always usefull. Sometimes
scenarios need to use another logic.
2016-09-08 18:24 GMT+03:00 Yuriy Gorlichenko <ovoshlook(a)gmail.com>:
> I know about dispatcher but it not always canbe heplfull. Sometimes i need
> my own logic that not implemented at the dispatcher.
>
> For checking kamailio live from asterisk im use qualfy for keepalives, if
> i use asterisk only as media server but it not always usefull. Sometimes
> scenarios need to use another logic.
>
> 2016-09-08 17:50 GMT+03:00 Federico Cabiddu <federico.cabiddu(a)gmail.com>:
>
>> The issue with dispatcher is that, in case of TCP transport, you cannot
>> set the sending socket for the same reason.
>> Basically, each time a client TCP socket is open by Kamailio, the SO
>> select the port, due to the lack of support for SO_REUSEPORT.
>>
>> Cheers,
>>
>> Federico
>>
>> On Thu, Sep 8, 2016 at 4:33 PM, Daniel Tryba <d.tryba(a)pocos.nl> wrote:
>>
>>> On Thu, Sep 08, 2016 at 03:38:32PM +0300, Yuriy Gorlichenko wrote:
>>> > I didnt thought about keepalive. I suppose it can help.
>>>
>>> Better than using qualify in asterisk is to use the dispatcher module in
>>> kamailio. The idea is the same, but more configurable and it is just 1
>>> keepalive mechanisme so the amount of keepalives doesn't scale linear
>>> with the number of registered users :)
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users(a)lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>
Hey Guys,
Have hit an issue when using uacreg.
When working with Broadsoft (I know, life is not perfect), it appears
that their SBC sitting in front of registration server is caching
REGISTRATION requests and it will not be able to re-REGISTER in case of
credential changes for example.
This will break the registration process in registrar since that one
flushes the registrations on password change. Their "standard"
workaround it is using "rinstance" uri parameter in contact (each
contact should be unique in order to be cached by their SBC).
Checking it appears that I can only add rinstance statically in
reg_contact_addr configuration parameter. Is there any chance to provide
things like $avp or selects which I can later modify via mi maybe?
Thanks in advance for any kind of tip!
DanB