Hello, I have a problem that my calls get rejected by he pstn gateway as my gateway is expecting a DID number instead of a 4 digit extension as the 'from user". Let me explain my situation:
1. I have set callfwd_busy in my user preference table.
2. In my failure route I check to see if callfwd_busy has been set, if it has then I execute the following script:
if (t_check_status("486|408")) {
$avp(dst_number) = $rU;
if (avp_db_load("$avp(dst_number)", "$avp(callfwd_busy)")) {
xlog("LOG: avp(callfwd_busy)=$avp(callfwd_busy), avp(dst_number)=$avp(dst_number)\n");
}
xlog("LOG: Failure route with $rU $avp(dst_number) \n");
$rU = $avp(callfwd_busy);
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
route(RELAY);
exit;
}
When I call from extension 7004 to ext 7002 ( this has callfwd_busy set to a DID number) the trace looks as follows:
U 172.10.30.15:5080 -> 172.10.30.15:5060
SIP/2.0 486 Busy Here.
Via: SIP/2.0/UDP 54.200.xx.yy:5060;branch=z9hG4bKee75.ab791c5.0;received=172.10.30.15.
Via: SIP/2.0/UDP 192.168.1.8:5060;received=71.252.219.63;branch=z9hG4bK209939211;rport=1025.
From: "7004" <sip:7004@ajfmc1.myDomain.net>;tag=1830267367.
To: <sip:7002@ajfmc1.myDomain.net>;tag=as17cd0b40.
Call-ID: 876294364-5060-74(a)BJC.BGI.B.I.
CSeq: 731 INVITE.
Server: Asterisk PBX 1.8.17.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.
U 172.10.30.15:5060 -> 172.10.30.15:5080
INVITE sip:18455981234@64.136.xx.yy:5060 SIP/2.0.
Record-Route: <sip:54.200.xx.xx;lr=on;ftag=1830267367;nat=yes>.
Via: SIP/2.0/UDP 54.200.xx.xx:5060;branch=z9hG4bKee75.ab791c5.1.
Via: SIP/2.0/UDP 192.168.1.8:5060;received=71.252.xx.yy;branch=z9hG4bK209939211;rport=1025.
From: "7004" <sip:7004@ajfmc1.myDomain.net>;tag=1830267367.
To: <sip:7002@ajfmc1.myDomain.net>.
Call-ID: 876294364-5060-74(a)BJC.BGI.B.I.
CSeq: 731 INVITE.
Contact: "7004" <sip:7004@71.252.xx.yy:1025>.
Max-Forwards: 16.
User-Agent: Grandstream HT701 1.0.4.8.
Privacy: none.
P-Preferred-Identity: "7004" <sip:7004@ajfmc1.myDomain.net>.
Supported: replaces, path, timer, eventlist.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE.
Content-Type: application/sdp.
Accept: application/sdp, application/dtmf-relay.
Content-Length: 453.
.
v=0.
o=7004 8000 8000 IN IP4 172.10.30.1554.200.xx.xx.
s=SIP Call.
c=IN IP4 172.10.30.1554.200.xx.xx.
t=0 0.
m=audio 6248262482 RTP/AVP 0 18 4 8 2 97 101.
a=sendrecv.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:4 G723/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:2 G726-32/8000.
a=rtpmap:97 iLBC/8000.
a=fmtp:97 mode=20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16,32-36,54.
a=nortpproxy:yes.
a=nortpproxy:yes.
#
U 172.10.30.15:5080 -> 172.10.30.15:5060
SIP/2.0 503 Unavailable.
Via: SIP/2.0/UDP 54.200.xx.xx:5060;branch=z9hG4bKee75.ab791c5.1;received=172.10.30.15.
Via: SIP/2.0/UDP 192.168.1.8:5060;received=71.252.xx.yy;branch=z9hG4bK209939211;rport=1025.
From: "7004" <sip:7004@ajfmc1.myDomain.net>;tag=1830267367.
To: <sip:7002@ajfmc1.myDomain.net>;tag=as17cd0b40.
Call-ID: 876294364-5060-74(a)BJC.BGI.B.I.
CSeq: 731 INVITE.
Server: Asterisk PBX 1.8.17.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.
It looks like my gateway is expecting to see a DID number in the from header. Can someone let me know how I can dot this? Thank you.
Arun
Dear All,
I have read about SIP and RTP packet flows but ended with a question about
RTP packets flow logic between client-to client when the SIP session starts.
I have a running Kamailio (V 4.0.4) server on ubuntu (12.04) platform which
is also configured fro DNS and DHCP servers.
And following are my test bed set-ups:
Kamailio server
(DNS+
DHCP+Kamailio)
|
Router <---------------------------->
Switch<----------------------------> Router
|
|
clientA <---------------------
RTP(audio/video) ? --------------------> client B
Now when the SIP session established (SIP Packets have to pass through all
the routers and switch to reach Kamailio server), RTP session will start
between Client A and B. But What is meant by client to client here ?
what is the RTP packets path between the clients to reach their
destinations ?
Is the RTP packets have to pass through Routers and switch to reach its
destination client ? (i.e Client A--->Router 1---->switch -----> Router
2-----> client B) ?
What if i connect both client A and client B to the same router ?
PS: I have not configured any media-relays (RTPproxy/Media-proxy)
Please help me in clarifying all this doubts.
Anybody's help will greatly appreciate.
Regards,
Nandini
It does not work...I tried with autoexpire=0, I tried with no
autoexpires define, I Tried defining a number and see if the value is
updated....
this is my table definition:
modparam("htable", "htable", "A=>size=8,dbtable=aaaaaa;initial=0,dbmobe=0;")
I remind you i need the memory to be updated from the DB every
interval, and not the DB form the memory.
thanks.
>Declare the table without autoexpire. Check again the module README.
>Regards,
>Ovidiu Sas
>On Feb 23, 2014 11:23 AM, "Uri Shacked" <ushacked at gmail.com <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>> wrote:
>>* Hi,
*>>>>* Following my issue with reloading data. I am thinking of a way to keep
*>>* data updated in memory.
*>>* I read the HTABLE module again and notice the "db_expires" option.
*>>* It does not work for me...
*>>>>* I try to set it so an item will expire in 60 sec, and when expired, it
*>>* will be reloaded from DB and not deleted.
*>>>>* Any ideas?
*>>>>* Uri*
Dear Kamailio'ns,
I have configured kamailio (V 4.0) with RTPproxy server. Audio/Video call
establishments are just fine.
With this i have some unknown behaviour in my set-up is that When i am
running kamailio server with RTPproxy instance, i am experiencing Jitter,
Latency, pixelled audio/video calls. But when i run only Kamailio server
without RTPproxy service running, audio/video calls are just fine (no any
jitter, latency kind of issues).
I also tried with Mediaproxy (AG projects) server but the results are same
as like in Kamailio/RTPproxy case.
What could be the problem with this set-up ? How can i solve this issue ?
Please anybody help me in resolving this problem.
Any help will greatly appreciate.
Regards.
Ravi.
Hi,
Following my issue with reloading data. I am thinking of a way to keep data
updated in memory.
I read the HTABLE module again and notice the "db_expires" option.
It does not work for me...
I try to set it so an item will expire in 60 sec, and when expired, it will
be reloaded from DB and not deleted.
Any ideas?
Uri
Hi guys,
Is it possible to use Kamailio as a Websocket LoadBalancer (transparent to
the Websocket content, rather it's SIP or other protocol)?
Many thanks,
Luís
Hi,
What is the intended behaviour from a general point of view if you get a
1xx on one branch and a 30x on another branch for a parallel fork?
>From my understanding, the 30x is a final reply, so it's kept in tm
until all other branches are finished, then it enters failure-route with
the highest error code (e.g. a 487 if you cancel the other branch).
What I actually want is intercepting the 30x and send another INVITE to
the Contact of the 30x in the failure route. This works fine if you only
have one branch, but it doesn't enter failure route for 30x if you have
another active branch (e.g. in ringing state). Would it be possible to
create a new branch directly from the reply route, or force to enter
failure route for a specific reply/branch?
Andreas
Hello,
I have deployed Kamailio-3.1 on a fedora machine. And my database is placed on another windows 2008 server situated on the local network.
Problem is when I run kamailio. I get the following error from logs.
<core> [cfg.y:3416] : parse error in config gile
/usr/local/kamailio-3.1/etc/kamailio//kamailio.cfg, line 311, column 31-35 :
syntax error
<core> [cfg.y:3416] : parse error in config gile
/usr/local/kamailio-3.1/etc/kamailio//kamailio.cfg, line 311, column 31-35 :
Invalid arguments
Line 311 is kamailio.cfg is
"modparam ("usrloc",
"db_url", DBURL)"
And 'DBURL' is defined as
#! define DBURL
"mysql://openser:5mil5My5ql@192.168.1.20/openser"
Can some one please help me out in resolving this error.
Secondly I am deploying my database on seperate server for the first time. I have deployed kamailio-3.1 already but with database placed on same machine. Can someone please guide what changings do I need to make in kamailio.cfg and kamctlrc file to make it work. I have made some as per my understanding. Maybe they are a cause of this error.
Thanks,
Regards,
Owais
Hi,
We have found the root cause for the problem that was reported (refer below
mail for details) in async module.
Below is the brief description,
- async_route("Resume", "1")
- At time t, the async records are stored at slot 't+1' of async
list.
- Every second, async records from the async list are processed.
- In function 'async_timer_exec', slot = ticks % ASYNC_RING_SIZE;
since slot is based on the ticks and if the previous invocation of
'async_timer_exec' did not finish in time, the next tick is missed.
Subsequent call to 'async_timer_exec' will be with t+2. Here slot t+1 will
be missed and the same will be processed only during next cycle. That means
the async records will be stored for the next 100 seconds before they are
actually processed. TM module will drop those timed out transactions and
hence the error "t_continue: transaction not found"
Now we have modified the code in such a way that slot is incremented
sequentially irrespective of the ticks that is sent to the function
'async_timer_exec' function. This way we do not see any call failures and
all our load runs are successful.
If someone is interested we can share the code as well.
Regards,
Shankar
From: Shankar [mailto:shankar.rk@plintron.com]
Sent: Thursday, January 23, 2014 12:18 PM
To: 'Jason Penton'; 'SIP Router - Kamailio (OpenSER) and SIP Express Router
(SER) - Users Mailing List'
Subject: RE: [SR-Users] FW: Regd. t_suspend() and t_continue()
Hi,
>From our repeated load tests what we can conclude irrespective of the number
of simultaneous calls, there is always this error "t_continue: transaction
not found" occurring.
If I run say 20 cps, then after running 5000 calls, we observe exactly 20
calls failing with the above error. We doubt that there is something
happening during a particular point in time (for a second) which impacts the
saving of those new transactions into shared memory.
For 10 cps run, we observe exactly 10 call failures. We repeated with
different cps and found that error is exactly equal to the cps being run.
Any configuration we are missing. Anyone can help?
Regards,
Shankar
From: Shankar [mailto:shankar.rk@plintron.com]
Sent: Tuesday, January 21, 2014 3:09 PM
To: 'Jason Penton'; 'SIP Router - Kamailio (OpenSER) and SIP Express Router
(SER) - Users Mailing List'
Subject: FW: [SR-Users] FW: Regd. t_suspend() and t_continue()
Hi Jason,
Below is our config,
route[LOCATION] {
if(is_method("INVITE"))
{
if(!route(FROMCSCF))
{
setflag(FLT_ACC);
setflag(FLT_ACCFAILED);
dlg_manage();
dlg_setflag("4");
async_route("RESUME", "1");
exit;
}
}
}
route[RESUME]
{
route(TO_LOCATION); // here t_relay to REGISTRAR is done
for user lookup.
exit;
}
Regards,
Shankar
Date: Tue, 21 Jan 2014 11:14:21 +0200
From: Jason Penton <jason.penton(a)smilecoms.com>
To: "Kamailio (SER) - Users Mailing List"
<sr-users(a)lists.sip-router.org>
Subject: Re: [SR-Users] FW: Regd. t_suspend() and t_continue()
Message-ID:
<CAE=KcrghqJHgnGDxqS1fYvUzM=HqRAcKWfEAsNJjm8xUDCq68w(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
We use it heavily, but not using the async module - we use it directly from
the IMS code.
Can you please provide your config (or a relevant snippet) file so I can see
what exactly you are testing/trying to do
Cheers
jason
From: Shankar [mailto:shankar.rk@plintron.com]
Sent: Tuesday, January 21, 2014 2:25 PM
To: 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List'
Subject: RE: [SR-Users] FW: Regd. t_suspend() and t_continue()
Hi,
Anyone who had used t_suspend() and t_continue() can share the performance
details?
I tried async module with one sec sleep time. I tried only 5 calls per
second but still it was not successful. After sometime I see below logs,
Jan 21 13:51:55 PLT-RA-RD-W167A PCscf[16520]: ERROR: tm [t_suspend.c:128]:
t_continue(): ERROR: t_continue: transaction not found
Jan 21 13:52:49 PLT-RA-RD-W167A last message repeated 15 times
Jan 21 13:59:38 PLT-RA-RD-W167A last message repeated 12 times
Jan 21 14:13:03 PLT-RA-RD-W167A last message repeated 5 times
Any configuration changes can help here?
Regards,
Shankar
From: Shankar [mailto:shankar.rk@plintron.com]
Sent: Wednesday, January 15, 2014 1:26 PM
To: 'Jason Penton'
Cc: 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List'
Subject: RE: [SR-Users] FW: Regd. t_suspend() and t_continue()
Hi Jason,
I am using 4.0.2
Regards,
Shankar
From: Jason Penton [mailto:jason.penton@smilecoms.com]
Sent: Wednesday, January 15, 2014 1:21 PM
To: Shankar
Cc: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Subject: Re: [SR-Users] FW: Regd. t_suspend() and t_continue()
Hi Shankar,
What version of Kamailio are you running? Kamailio -V
Cheers
Jason
On Wed, Jan 15, 2014 at 6:58 AM, Shankar <shankar.rk(a)plintron.com> wrote:
Hi Jason,
Please find below my response inline,
I have some questions for you as we have used suspend/continue quite a lot
in the IMS code and don't have any leaks.
Firstly, why are you using pkg_mem for your hash_id and label? Remember that
you will be in 2 different processes in the suspend and continue portions of
the code... so pkg_mem will not work - you should use shm_mem instead.
[Shankar] We use pkg_mem because we are invoking t_continue from the same
process ( using thread ).
Secondly, how are you using top to tell that you have a leak? Kamailio's
memory is internally managed.
[Shankar] After running for say 20minutes, we get out of shared memory
error. Also in top output we observed incremental increase in the shared
usage of shared memory for the process.
Cheers
Jason
On Mon, Jan 13, 2014 at 1:29 PM, Shankar <shankar.rk(a)plintron.com> wrote:
> Re-sending without the attachment.
>
>
>
> *From:* Shankar [mailto:shankar.rk@plintron.com]
> *Sent:* Monday, January 13, 2014 4:57 PM
> *To:* 'sr-users(a)lists.sip-router.org'
> *Subject:* Regd. t_suspend() and t_continue()
>
>
>
> Hi,
>
>
>
> We are trying out the t_suspend() and t_continue() in our test setup.
> We are facing memory leak ( both shm and pkg as per top command results).
>
>
>
> Please find below the scenario,
>
>
>
> 1) Do a t_newtran()
>
> 2) Allocate pkg memory for hashid and label.
>
> 3) Call t_suspend()
>
> 4) Do t_continue() when async result is available
>
> 5) De-allocate pkg memory reserved for hashid and label
>
> 6) Do a t_relay() which forwards the sip message to another sip node.
>
>
>
> In the step (6) above, we see t_newtran() allocates one more time
> shared memory for the same transaction.
>
>
>
> We tried t_release() after step (4) to release the transaction as
> t_relay() anyways allocates new shared memory. Nothing helped.
>
>
>
> Please let me know what are the logs you would require to debug the same.
> I am attaching syslog for this run.
>
>
>
> Regards,
>
> Shankar
--
Jason Penton
Senior Manager: Applications and Services
Smile Communications Pty (Ltd)
Mobile:
+27 (0) 83 283 7000
Skype:
jason.barry.penton
<mailto:name.surname@smilecoms.com> jason.penton(a)smilecoms.com
<http://www.smilecoms.com/> www.smilecoms.com
<http://196.33.227.129/~smlcoms/sigs/pty/images/smile_signature_07_09.jpg>
This email is subject to the disclaimer of Smile Communications at
http://www.smilecoms.com/disclaimer