Hello,
First, i have 7 years experience with Asterisk, but I started a project
with Kamailio, forgive me in advance if I say silly things...! ;-)
I set up a classic Asterisk / Kamailio configuration:
sip phones -> kamailio -> asterisk -> sip trunks/pstn.
When a call comes from the PSTN side, if I configure Asterisk as follows:
[012345678]
type = friend
username = 012345678
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = 012345678
Standard mode:
exten => 012345678, 1, Dial(SIP/012345678) -> The call is redirected on the
phone by Kamailio ! :-)
------------------------------------------------------------------------------------------------------------------------------------------------
Trunk mode:
[mytrunk]
type = friend
username = mytrunkUser
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = mytrunkUser
exten => 012345678, 1, Dial(SIP/mytrunk/012345678) -> The call is rejected
by Kamailio....
exten => 012345679, 1, Dial(SIP/mytrunk/012345679) -> The call is rejected
by Kamailio ....
My question is how to allow the routing of multiple numbers (trunk mode) in
a SIP account with Kamailio?
Best regards,
Mickael
Hello everyone,
My name is Bruno, I'm a student from Portugal studying IMS at the moment. I've been following tutorials online, trying to get Kamailio to work as an IMS core - I'm pretty much a newbie in this field.
Unfortunantly I've been getting several errors and I can't seem to properly configure everything. I was wondering if there is a All-in-One VM that can be downloaded, with Kamailio ready to be used as an IMS core?
Thanks in advance. Best regards,
Bruno C.
Good day,
I’m experiencing some problems with our VoiP providers handling of REGISTER requests. We are using a Gigaset PRO N720 as UAC behind a Juniper SSG 140 with SIP-Alg enabled. This setup kind of works with UDP but our provider wants us to use TCP. With TCP enforced incoming calls don’t work. I’ve done some wire tracing and to me it seems that the providers configuration is to blame, but then - there are many RFCs out there and many NAT and UAC bug workarounds. Anyway, I wanted to get the opinion of “the" experts about how the requests send to the UAS SHOULD be correctly interpreted.
The REGISTER requests/responses look like this (outside of the firewall):
Protocol TCP!
client port 19091 <-> server port 5060
REGISTER sip:pbx.peoplefone.ch SIP/2.0
Via: SIP/2.0/TCP 212.126.160.92:6717;rport;branch=z9hG4bKc1375589832468de63a719eac31156ec
From: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=2153084485
To: "Michel" <sip:90780408050@pbx.peoplefone.ch>
Call-ID: 2825358480@10_10_128_10
CSeq: 1 REGISTER
Contact: <sip:90780408050@212.126.160.92:6717;transport=tcp>
Max-Forwards: 70
User-Agent: N720-DM-PRO/70.089.00.000.000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 212.126.160.92:6717;rport=19091;branch=z9hG4bKc1375589832468de63a719eac31156ec
From: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=2153084485
To: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=a0440f545f39b2694d387b475a5f6bc9.b8fc
Call-ID: 2825358480@10_10_128_10
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="pbx.peoplefone.ch", nonce="VNqJBVTah9m57ZGGs8b5XCTM3GyaExDy"
Server: kamailio (3.2.1 (x86_64/linux))
Content-Length: 0
REGISTER sip:pbx.peoplefone.ch SIP/2.0
Via: SIP/2.0/TCP 212.126.160.92:6717;rport;branch=z9hG4bK9c27afea96e2af4baab2f8d144a588e0
From: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=2153084485
To: "Michel" <sip:90780408050@pbx.peoplefone.ch>
Call-ID: 2825358480@10_10_128_10
CSeq: 2 REGISTER
Contact: <sip:90780408050@212.126.160.92:6717;transport=tcp>
Authorization: Digest username="90780408050", realm="pbx.peoplefone.ch", uri="sip:pbx.peoplefone.ch", nonce="VNqJBVTah9m57ZGGs8b5XCTM3GyaExDy", response="764f371a08d258157a249f8d1b852514"
Max-Forwards: 70
User-Agent: N720-DM-PRO/70.089.00.000.000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/TCP 212.126.160.92:6717;rport=19091;branch=z9hG4bK9c27afea96e2af4baab2f8d144a588e0
From: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=2153084485
To: "Michel" <sip:90780408050@pbx.peoplefone.ch>;tag=a0440f545f39b2694d387b475a5f6bc9.6bda
Call-ID: 2825358480@10_10_128_10
CSeq: 2 REGISTER
Contact: <sip:90780408050@212.126.160.92:6717;transport=tcp>;q=0;expires=180;received="sip:212.126.160.92:19091;transport=TCP"
Server: kamailio (3.2.1 (x86_64/linux))
Content-Length: 0
The ip:port the firewall is sending those requests from is ip 212.126.160.92 port 19091. So this does NOT match the port from the Contact header. For TCP this seems rather logical to me, as one cant be listening on a TCP port and use it for sending at the same time. The UAC closes this “register connection” with TCP FIN after the register, and so does the firewall.
However unfortunately subsequent requests from the provider (ie UAS) come in on port 19091 (not port 6717 from the Contact header) and the firewall simply drops them.
Observations:
- the server does NOT include received=212.126.160.92 in the Via of the reponse. According to RFC3581 this is mandatory when rport is present in the request, so this is probably an error in the server.
- the server does include received="sip:212.126.160.92:19091;transport=TCP” in the Contact of the response. I didnt see this in any RFC (which means nothing;-) but it could be an error.
- after the client received the 200 OK it closes the TCP connection.
- the server tries several times to re-contact the client (incoming TCP SYN). However not on port 6717 (defined in the Contact header) but on port 19091 (where the REGISTER came from).
RFC3581 defines special behaviour when “rport” is defined in the request (i.e. response should go to the same port the request came from) - however it’s not so clear if this should apply to subsequent (INVITE/OPTIONS) requests from the server to the client. Those are strictly spoken not replies (or are they?).
RFC5626 defines that a “proxy” should keep track of the flows over which it received a registration and send requests over the same flow. It is not clear if RFC5626 should be applied. The RFC5626 defines that a UAC includes an “ob” parameter in the Contact field if it whishes further requests over the same flow. Also the RFC mandates a client to add a "reg-id=x" in the Contact field. Both are not the case here, so in short I think RFC5626 should NOT be applied. In which case conecting to the originating port (instead of the Contact port) would be a server error.
So in short and if I interpret the RFCs correctly, the client is reachable and should be contacted on
Transport: TCP
IP: 212.126.160.92
Port: 6717
If anyone who lives and breathes SIP could enlighten me if the UAS is right to call back on 19091 instead of 6717 I would really appreciate it;-))
Best regards,
Joachim
Hello all,
Just wondering if anyone know any tutorial on setting up HA+DRBD solution for kamailio.
Especially creating partitions, DRBD devices and mount points.
Thanks in advance,
-Sid
"May the light be with you." ______________________________________________
Siddhardha Garige
www.luminepixels.com
Trying to call a T.38 enabled endpoint B from an endpoint A that doesn't. This
results in a "488 Not Acceptable" from A.
The kamailio (4.0.3) in between with topoh enabled (with mask_callid set to 1.
Kamailio ACKs the 488 to A, but the ACK has the wrong (masked) Call-ID,
resulting in the ACK to A being ignored, A keeps sending 488 at intervals
before just dropping the call.
My understanding is the Call-ID in the ACK has to be the same as the Call-ID
from the 488. But instead of sending the unmasked Call-ID used in all other
messages between A and Kamailio, the ACK contains the masked Call-ID used in
all messagea between A and Kamailio.
I can't find a bug report relating to this. Is this a known feature or maybe
fixed in newer versions?
A->Kamailio
SIP/2.0 488 Not acceptable here.
Via: SIP/2.0/UDP
109.235.32.40;branch=z9hG4bKf91a.c6c88747.0;received=109.235.32.40.
Via: SIP/2.0/UDP 172.19.162.1;branch=pocos-
rS4MusXox1l5QHyNxRy6uAXsEOdsxidSEAktxGZKWgeKCgeS-
RrKEAy057Nl9DEpWpefZD6AhGtwWDJjEqeuEAZgZs5iZA7*.
From: <sip:+31880100799@sip.pocos.nl:5060>;tag=as3869fe2a.
To: "+31880100705" <sip:+31880100705@sip.pocos.nl>;tag=as1b0b8097.
Call-ID: 0b5946b977210450571f767a19cd6fa0(a)99sip.pocos.nl.
CSeq: 102 INVITE.
Kamailio<-A
ACK sip:+31880100705@109.235.32.48 SIP/2.0.
Via: SIP/2.0/UDP 109.235.32.40;branch=z9hG4bKf91a.c6c88747.0.
Max-Forwards: 16.
From: <sip:+31880100799@sip.pocos.nl:5060>;tag=as3869fe2a.
To: "+31880100705" <sip:+31880100705@sip.pocos.nl>;tag=as1b0b8097.
Call-ID: !!:xqXtWRMpZAngEsX3xGMtxGrgxDZgEA9JxR4AzGz8ZRIyWR4sh.yomqlACgxoC8K*.
CSeq: 102 ACK.
--
Telefoon: 088 0100 700
Sales: sales(a)pocos.nl | Service: servicedesk(a)pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel
17097024
Hi,
I'm using 'allow_trusted()' from Permissions module without a problem in a
Kamailio 4.0 routing logic. It does just work, but the MI command
'trusted_dump' tells me that the module is not in use:
'''
server:/home/jmillan# kamctl fifo trusted_dump
500 Trusted-module not in use
'''
Doing a 'trusted_reload' does neither make any query to database to
retrieve the data.
Other MI commands of same module do work correctly. ie: 'address_reload' or
'address_dump'
Note: I have tested in a Kamailio 1.5 and the result is the same.
Regards.
--
José Luis Millán
Using Kamailio 4.2-dev and MSILO, is it possible to "toggle" the auto-
notification reply MESSAGE using something similar to the following where
"$var(msilo_reply)" is emtpy at startup (or are there suggestions for a better
method):
modparam("msilo", "from_address", "$var(msilo_reply)")
...
if(CONDITION WHERE I WANT THE AUTO-REPLY RETURNS POSITIVE) {
$var(msilo_reply)="$rU(a)example.net";
}
m_store($rU)
...
My use case is that I would like the auto-notification reply to occur in some
instances, but not others. I also do not want to create a loop where the
auto-notification replies are also stored. I was originally using a simple
test: if(src_ip!=myself), but I have begun to use the IMC module as well as
the EXEC module and these MESSAGEs appear to originate from "myself."
Looking at the MSILO documentation I see there is "extra_hdrs(string)," but
this appears to be designed to add headers to dumped MESSAGEs. I was hoping
there would be a way to add a custom header to the auto-notification, on which
I could filter/drop generated replies earlier in the route, but it doesn't
appear that this exists.
My preference for the best-case scenario would be to control the generation of
the auto-notification reply in the first place rather than having to add a
control to detect the reply and drop it.
Thanks in advance for any recommendations.
--
Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Dear Kamailio'ns,
I am working on kamailio Server (V 4.0) installed on Ubuntu 12.04 system.
Currently i am trying file transfer feature using IMSDroid SIP clients.
file transferring is fine between two IMSDroid clients but at the
receiving end (file recipient) i cont see the sender identity/ sender name.
it is just displaying as 'null' (Screen shot is attached). But the full
file is transferring to destination address without any problem.
I have configured MSRP module related script in my kamailio configuration
file (find the attachment). but i guess it is not invoking anyway when file
transferring and the file transferring is negotiating client-to-client
basis.
And also find Sip capture of file transfer (ngrep based) for better
understanding.
What could be the problem? Why at the file recipient side it is not
displaying sender's identity (instead it is 'null')? how can i resolve
this issue?
Anyone please help me in resolving this issue.
Any help will greatly appreciate.
Regards,
Ravi.
Hi,
The dialog module documentation remains unclear about the order of
operations with regard to when to call dlg_manage() or set the
transaction flag.
My impression is that dlg_manage() only registered TM callbacks, so it
doesn't matter when you call it, as long as it's before t_relay().
However, the documentation neither confirms nor denies this.
So, this raises the questions:
1) Is this okay?
set_dlg_profile("caller", "$fU");
dlg_manage();
...
t_relay();
Or do I need to do this?
dlg_manage();
set_dlg_profile("caller", "$fU");
...
t_relay();
2) What about setting dialog-persistent variables? Is this okay?
$dlg_var(account_id) = 49555;
dlg_manage();
If so, where does the variable go if I never call dlg_manage() because
the call is aborted beforehand, e.g.
$dlg_var(account_id) = 49555;
sl_send_reply("403", "Forbidden");
exit;
dlg_manage();
...
t_relay();
3) Any other gotchas or caveats in relation to the order of operations?
I suppose my preference would be to set the dialog profiles in various
places throughout call processing and call dlg_manage() at the very end,
right before t_relay(). Is this acceptable?
Thanks,
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/