On 19/07/17 08:31 AM, Ismir Saljic wrote:
>* Hello,
*>>* I've issue with bridging media between IPv4 and IPv6 clients.
*>* IPv4-IPv4 and IPv6-IPv6 calls are working without issues.
*>* I'm using kamailio 4.4.2 and configuration according to:
*>* http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6
<http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6>
*>* <http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6
<http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6>>
*>>* SIP signalling is working without issues,but media addresses in SDP
*>* are not rewritten correctly.
*>>* The server is on amazon AWS and both kamailio and RTPengine are on the
*>* same server.
*>* RTPengine is running using these options:
*>>* /usr/sbin/rtpengine --interface=privateIPv4!publicIPv4
*>* --interface=GlobalIPv6
*>* --listen-udp=127.0.0.1:22222 <http://127.0.0.1:22222>
<http://127.0.0.1:22222 <http://127.0.0.1:22222>>
*>* --tos=184
*>* --pidfile=/var/run/rtpengine.pid
*>* --log-level=6
*>* --log-facility=daemon
*
I would suggest to use Kamailio's rtpengine module instead of rtpproxy,
together with --listen-ng instead of --listen-udp.
The UDP protocol of the rtpproxy module should work with rtpengine, but
not many people are using it, so it's always possible that some bugs
creep in. I'll look into it anyway, but in the long run, it's much
preferable to switch to the rtpengine module.
Cheers
##########################
Hello Richard,
thank you very much for your answer. I will try to use rtpengine module.
As I can see from logs, kamailio is sending correctly data to
rtpengine but rtp engine
failed to parse IPv6 address from SDP body.
I'm sending flags to rtpengine according to the howto from link I've
posted in the original post.
This is the part of the config:
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)
|| isbflagset(FLB_V4V6)))
return;
if(isbflagset(FLB_V4V6)) {
if(af==INET6) {
rtpproxy_manage("FAEI");
} else {
rtpproxy_manage("FAIE");
}
} else {
if(af==INET6) {
rtpproxy_manage("FAEE");
} else {
rtpproxy_manage("FAII");
I'm not sure if I need to inform rtpengine that in SDP body will be
IPv6 address.
Thanks
Ismir
On Wed, Jul 19, 2017 at 2:31 PM, Ismir Saljic <isaljic(a)gmail.com> wrote:
> Hello,
>
> I've issue with bridging media between IPv4 and IPv6 clients. IPv4-IPv4
> and IPv6-IPv6 calls are working without issues.
> I'm using kamailio 4.4.2 and configuration according to:
> http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6
>
> SIP signalling is working without issues,but media addresses in SDP are
> not rewritten correctly.
>
> The server is on amazon AWS and both kamailio and RTPengine are on the
> same server.
> RTPengine is running using these options:
>
> /usr/sbin/rtpengine --interface=privateIPv4!publicIPv4
> --interface=GlobalIPv6
> --listen-udp=127.0.0.1:22222
> --tos=184
> --pidfile=/var/run/rtpengine.pid
> --log-level=6
> --log-facility=daemon
>
>
> In case of IPv4-IPv6 call, INVITE message contains correct IPv4 address
> but 200 OK response to the caller still contains IPv6 address of the callee
> in SDP body instead of IPv4 address of the server/RTPengine.
> This is the log during generation of the 200 OK response. Seems that
> RTPengine failed to parse IPv4 address from SDP body.
>
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:618]: parse_msg(): SIP Reply (status):
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:620]: parse_msg(): version: <SIP/2.0>
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:622]: parse_msg(): status: <200>
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:624]: parse_msg(): reason: <OK>
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 232,
> <branch> = <z9hG4bK5afe.c59aef39af345458e17940722ba0c70b.0>; state=6
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 234,
> <received> = <Server's GlobalIPv6>; state=6
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 236, <i> =
> <8>; state=16
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found,
> flags=2
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the
> first via
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [receive.c:178]: receive_msg(): After parse_msg...
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_lookup.c:1011]: t_check_msg(): DEBUG: t_check_msg: msg id=143 global
> id=142 T start=0xffffffffffffffff
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 234,
> <received> = <178.165.130.177>; state=6
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 232,
> <branch> = <z9hG4bK.BUIgttWpK>; state=6
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:1254]: parse_via_param(): Found param type 235, <rport>
> = <2066>; state=16
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found,
> flags=62
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:509]: parse_headers(): parse_headers: this is the
> second via
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_addr_spec.c:172]: parse_to_param(): DEBUG: add_param:
> tag=2996330c
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached,
> state=29
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:173]: get_hdr_field(): DEBUG: get_hdr_field: <To>
> [59]; uri=[sip:user@domain.com]
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to body ["user"<
> sip:user@domain.com>]
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:153]: get_hdr_field(): get_hdr_field: cseq <CSeq>:
> <21> <INVITE>
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_lookup.c:888]: t_reply_matching(): DEBUG: t_reply_matching: hash 61349
> label 0 branch 0
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_lookup.c:943]: t_reply_matching(): DEBUG: t_reply_matching: reply
> matched (T=0x7f7f95c19a10)!
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_hooks.c:266]: run_trans_callbacks_internal(): DBG:
> trans=0x7f7f95c19a10, callback type 2, id 0 entered
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: acc
> [acc_logic.c:644]: tmcb_func(): acc callback called for t(0x7f7f95c19a10)
> event type 2, reply code 200
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_lookup.c:1080]: t_check_msg(): DEBUG: t_check_msg: msg id=143 global
> id=143 T end=0x7f7f95c19a10
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_reply.c:2160]: reply_received(): DEBUG: reply_received: org. status
> uas=180, uac[0]=180 local=0 is_invite=1)
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <script>:
> incoming reply
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <script>: BMX:
> FAIE
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:187]: get_hdr_field(): DEBUG: get_hdr_body :
> content_length=559
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/msg_parser.c:89]: get_hdr_field(): found end of header
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp_helpr_funcs.c:504]: extract_mediaip(): located IP address
> [IPv6 of the callee] in `o=' field
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp_helpr_funcs.c:504]: extract_mediaip(): located IP address
> [IPv6 of the callee] in `c=' field
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp.c:574]: parse_sdp_session(): ignoring unknown type in a=
> line: `a=rtcp-fb:* nack#015#012a=rtcp-fb:* nack pli#015#012'
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp.c:574]: parse_sdp_session(): ignoring unknown type in a=
> line: `a=rtcp-fb:* nack pli#015#012'
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: rtpproxy
> [rtpproxy_funcs.c:148]: check_content_type(): type <application/sdp> found
> valid
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_addr_spec.c:172]: parse_to_param(): DEBUG: add_param:
> tag=aNfQNJz3e
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached,
> state=29
> Jul 19 08:02:42 rtpengine[24330]: Got valid command from udp:
> 127.0.0.1:28152: 1691_12 LAEI6 dcMDMrNRhw IPv6 of the callee 58100
> aNfQNJz3e;1 2996330c;1
> Jul 19 08:02:42 rtpengine[24330]: [dcMDMrNRhw] Failed to parse a media
> stream: /IPv6 of the callee:58100
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: rtpproxy
> [rtpproxy.c:2712]: force_rtp_proxy(): proxy reply: E8
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: ERROR: rtpproxy
> [rtpproxy.c:2735]: force_rtp_proxy(): incorrect port 0 in reply from rtp
> proxy
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_reply.c:1233]: t_should_relay_response(): ->>>>>>>>> T_code=180,
> new_code=200
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: tm
> [t_reply.c:1751]: relay_reply(): DEBUG: relay_reply: branch=0, save=0,
> relay=0 icode=0
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [msg_translator.c:2260]: generate_res_buf_from_sip_res(): old size: 1467,
> new size: 1319
> Jul 19 08:02:42 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [msg_translator.c:2278]: generate_res_buf_from_sip_res(): copied size:
> orig:164, new: 16, rest: 1303
> msg=#012SIP/2.0 200 OK#015#012
> Via: SIP/2.0/TCP 10.152.108.46:56401;received=X.X.X.X;
> branch=z9hG4bK.BUIgttWpK;rport=2066
> Record-Route: <sip:[Server's IPv6];transport=tcp;r2=on;lr;nat=v46>
> Record-Route: <sip:X.X.X.X;transport=tcp;r2=on;lr;nat=v46>
> Contact: <sip:user@[IPv6 of the callee]:59335;rinstance=836aa3
> 6a01097072;transport=tcp>
> To: "user"<sip:user@domain.com>;tag=2996330c
> From: "caller" <sip:caller@domain.com>;tag=aNfQNJz3e
> Call-ID: dcMDMrNRhw
> CSeq: 21 INVITE
> Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS,
> MESSAGE
> Content-Type: application/sdp
> Supported: replaces
> User-Agent: Bria 5 release 5.0.0 stamp 85993
> Content-Length: 559
>
> v=0
> o=- 241380314 3 IN IP6 IPv6 of the callee(should be IPv4 address of the
> server)
> s=Bria 5 release 5.0.0 stamp 85993
> c=IN IP6 IPv6 of the callee (should be IPv4 address of the server)
>
>
>
> The same situation is in case of IPv6-IPv4 call.
> This is the part of the log in case of IPV6-IPv4 call when kamailio is
> creating INVITE to the IPv4 callee:
>
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: <script>: BMX:
> FAIE
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp_helpr_funcs.c:504]: extract_mediaip(): located IP address
> [IPv6 Address] in `o=' field
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: <core>
> [parser/sdp/sdp_helpr_funcs.c:504]: extract_mediaip(): located IP address
> [IPv6 Address] in `c=' field
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: rtpproxy
> [rtpproxy_funcs.c:148]: check_content_type(): type <application/sdp> found
> valid
> Jul 19 08:04:52 rtpengine[24330]: Got valid command from udp:
> 127.0.0.1:28152: 1691_13 UAEI6 85993YWVkNmQ4YTFmN2JkZWQ4NjIzMGYwMDBlM2RlOGY0ZDQ
> 2a03:f81:abcd:172:16:20:119:2 50168 1430094e;1
> Jul 19 08:04:52 rtpengine[24330]: [85993YWVkNmQ4YTFmN2JkZWQ4NjIzMGYwMDBlM2RlOGY0ZDQ]
> Creating new call
> Jul 19 08:04:52 rtpengine[24330]: [85993YWVkNmQ4YTFmN2JkZWQ4NjIzMGYwMDBlM2RlOGY0ZDQ]
> Failed to parse a media stream: /IPv6:50168
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: rtpproxy
> [rtpproxy.c:2712]: force_rtp_proxy(): proxy reply: E8
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: ERROR: rtpproxy
> [rtpproxy.c:2735]: force_rtp_proxy(): incorrect port 0 in reply from rtp
> proxy
> Jul 19 08:04:52 /usr/local/sbin/kamailio[1691]: DEBUG: siputils
> [checks.c:97]: has_totag(): no totag
>
>
> Any help would be very appreciated!
>
> Thank you
> Kind regards
>
Hi,
I'm trying to integrate Google cloud speech recognition v2 in it. I can get
the audio recorded, have created Service key and API key but whenever I try
to access it, I just get 403 access denied. I am at my wits end here.
Has anybody tried it ? were you successful ? Could you please guide me how
to do it ?
I'll be grateful to you if this works !
--
Warm Regds.
MathuRahul
If Request-URI hostpart is a domain name with more than one SRV record,
it appears that each SRV destination creates its own Kamailio branch.
If branch route is set before t_relay(), it is executed only on the
first SRV destination. If the first SRV destination fails, Kamailio
tries automatically the second one, but any branch flags set in the
branch route are lost.
What is the simplest way to make Kamailio preserve the stuff set in the
branch route for all SRV destinations?
-- Juha
rtpengine-offer function documentation tells this about via-branch flag:
via-branch=... - Include the “branch” value of one of the “Via” headers
in the request to the RTP proxy. Possible values are: “1” - use the
first “Via” header; “2” - use the second “Via” header; “auto” - use the
first “Via” header if this is a request, or the second one if this is a
reply; “extra” - don't take the value from a header, but instead use
the value of the “extra_id_pv” variable. This can be used to create one
media session per branch on the RTP proxy. When sending a subsequent
“delete” command to the RTP proxy, you can then stop just the session
for a specific branch when passing the flag '1' or '2' in the
“rtpengine_delete”, or stop all sessions for a call when not passing
one of those two flags there. This is especially useful if you have
serially forked call scenarios where the RTP proxy gets an “offer”
command for a new branch, and then a “delete” command for the previous
branch, which would otherwise delete the full call, breaking the
subsequent “answer” for the new branch.
Is the note about "serial forking" correct or should it be about
"parallel forking" instead? In case of serial forking, it would not
matter if the whole call is deleted, because a new offer would be issued
for the next branch. Or perhaps I just don't understand the meaning of
the note?
-- Juha
Hello,
We're using Kamailio 4.2.1 with rtpengine 5.1.2.1 on Ubuntu 16.04. When
running rtpengine we get this error:
[1500263405.711288] ERR: FAILED TO CREATE KERNEL TABLE 0 (File exists),
KERNEL FORWARDING DISABLED
[1500263405.712367] CRIT: Fatal error: Failed to open UDP control
connection port
The first line I think is not important, but the second appears to be. It's
being run as root with these options:
/usr/sbin/rtpengine --interface=xx.xx.xx.xx --listen-ng=7724 --timeout=60
--silent-timeout=3600 --pidfile=/var/run/rtpengine.pid --port-min=45000
--port-max=50000 --table=0
Running "netstat -lnp | grep 7724" does not report anything listening on
port 7724 already.
Has anyone any ideas? Thanks in advance.
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
Australia: +61 (0) 2 8063 9019
Hi
I have been watching numerous videos on youtube in search of how to configure Kamilio !
I know we I need the Sip Server, but don't know how to get it configured. The installation is obvious with the commands as a root user.
Brief description of the project:
Have quite a few customers we want to move from PSTN (AT&T primarily) to a Voip/Sip solution. So instead of setting up 1 FreePBX and 1 public ip, we would rather use 1 public IP to many FreePBX servers on the backend.
I haven't been able to find one video on how to configure this SIP server, and was hoping somebody here might have some clues to lead me in the right direction.
I found one company that would help us, but they said at least 20 hours just to configure the first customer/freePBX installation. If we could get help setting up the first we should be able to figure out the ones to come later.
Any help would be appreciated... We know the product is awesome, we have the keys but don't know how to run the thing or even get it started !!
Kind regards,
Kenneth Knudsen
Hi,
Am using redis_cmd in kamailio.cfg to perform redis operations.
I would like to know if redis_cmd() creates new connection everytime I call it in kamailio.cfg?. Since am using redis_cmd() multiple times to access few data's.
Also, is calling redis_free() necessary to avoid connections being open?
I am facing an error of number of open files exceeded. This error is caused by ndb_redis module. But cannot confirm due to which part of redis.
Thanks,
Vivek