[asterisk-users] How to append the recording file.

2014-09-27 Thread Anurag Rana
Hi All,

I am trying to record the call using MixMonitor.
exten=_,n,MixMonitor(${EXTEN}.wav,b)

What i want to do is-
when first time a call is made to some number say 1100, a new file
(1100.wav) is created.
When call is made 2nd or 3rd time, no new file is created instead call
recording is appended to file created in above step.

Now I know that 'a' option is used to append the recording to a file but I
couldn't find any example on how to use it?
Also if I use 'a' option and file doesn't exist then is it created or it is
error?

Any suggestions please?


Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] ${ANSWEREDTIME} returning null

2014-09-17 Thread Anurag Rana
Hi,

I am initiating a call using call files. In 'h' extension I am trying to
collect the value of ANSWEREDTIME variable but it is returning null.

While It works fine when call is not generated using call files instead is
generated from softphone.

any idea what might be wrong?


thanks
Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] ${ANSWEREDTIME} returning null

2014-09-17 Thread Anurag Rana
Call file syntax:

Channel: SIP/
MaxRetries: 2
Context: demo1
Extension: s
Priority: 1
WaitTime: 30
RetryTime:
60

in dialplan:
exten=h,n,NoOp(${DIALLEDPEERNUMBER)

variable ${DIALLEDPEERNUMBER} is returning null.

Suggestions please?

Thanks

Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] ${ANSWEREDTIME} returning null

2014-09-17 Thread Anurag Rana
Oh, Sorry My mistake, I misspelled it in mail.
It is already ${DIALEDPEERNUMBER}, still returning null.

Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] ${ANSWEREDTIME} returning null

2014-09-17 Thread Anurag Rana
Thanks, That worked. :)

Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] sip.conf and extension.conf configuration

2014-09-14 Thread Anurag Rana
The dots in extension will work as special characters.
On 14/09/2014 8:06 pm, rafa alfurqan rafa.alfur...@gmail.com wrote:

 Hi,

 i want to ask about sip.conf  extension.conf the configuration.

 is it possibility to make sip.conf configuration like this
 [1510891531543...@wlan.mnc089.mcc510.3gppnetwork.org]
 type = friend
 context = tutorial
 username = 1510891531543...@wlan.mnc089.mcc510.3gppnetwork.org
 secret = 12345
 host = dynamic


 and the extension.conf like this
 exten = 1510891531557...@wlan.mnc089.mcc510.3gppnetwork.org,1,Dial(SIP/
 1510891531557...@wlan.mnc089.mcc510.3gppnetwork.org)


 thank you






 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Pattern Extension not working in Dialplan

2014-09-08 Thread Anurag Rana
Thanks for the suggestion.

@Stiles - Look like this may work. Will try this. Thanks.

Anurag Rana
http://newbie42.blogspot.in/




On Mon, Sep 8, 2014 at 1:42 PM, A J Stiles asterisk_l...@earthshod.co.uk
wrote:

 On Sunday 07 Sep 2014, Anurag Rana wrote:
  Hi,
 
  I created a dummy dialplan  where I ask the user to enter the age.
 
  [macro-age]
  exten = s,1,Background(my/age)  ;;Play recorded message to enter age
  exten = s,n,WaitExten(10)
  exten = _XX,1,Set(AGE=${EXTEN});; this line is not executing,
 instead
  dialplan is terminating with error given below.
  exten = s,n,NoOp(${AGE})
  exten = s,n,GotoIf($[${LEN(${AGE})}  0]?notEmpty)
  exten = s,n,Goto(s,1)
  exten = s(notEmpty),n,Background(my/thank-you)
  exten = s,n,Wait(1)
 
 
  When I receive call and tries to enter the digits (86 lets say), it only
  accept just first digit and terminates even before considering second
  digit. Error message :
   WARNING[5726][C-000a]: pbx.c:6696 __ast_pbx_run: Invalid extension
  '8', but no rule 'i' or 'e' in context 'testmacro'
 
  Please suggest what might be wrong.
 
 
  Anurag Rana
  http://newbie42.blogspot.in/

 You would be better off jumping to a new context and building up your
 number,
 digit-by-digit as it is entered, in a channel variable.

 In your s extension, set your variable to an empty string; do a
 Background()
 and then WaitExten() for a digit to be entered.  Have an extension _X to
 capture each digit and append it to the number so far.  Then use a
 GotoIf() to
 jump to the WaitExten() statement if insufficient digits have been entered
 so
 far.  You might also want a * extension to clear the number entered so
 far, if
 the user makes a mistake.


 If you need a written example, I might be able to dig something out later.

 --
 AJS

 Note:  Originating address only accepts e-mail from list!  If replying off-
 list, change address to asterisk1list at earthshod dot co dot uk .

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Pattern Extension not working in Dialplan

2014-09-08 Thread Anurag Rana
@A J Stiles : If you could provide an example as you said, It would be very
nice.  Thanks.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Pattern Extension not working in Dialplan

2014-09-08 Thread Anurag Rana
​Thanks. I will try it. Meanwhile I was trying below code.

call goes to 'test' context and from there is passed to macro 'age'.
In 'age' macro when I am using any patter to accept even single digit, its
not working. So instead of using pattern I hardcoded the extension, but
still when I am pressing the key '2' it is throwing below error.
Please note that when diaplan execution is inside macro 'age', it searches
the extension inside its parent context 'test'...why? am I do something
wrong?

[test]
exten=s,1,Macro(age)

[macro-age]
exten=s,1,Background(my/age)
exten=s,2,WaitExten(15)
exten=s,3,NoOp(${AGE})
exten=s,n,GotoIf($[${LEN(${AGE})}  0]?notEmpty)
exten=s,n,Goto(s,1)
exten=s(notEmpty),n,Background(my/thank-you)
exten=s,n,Wait(1)

exten=2,1,(TEMP=${EXTEN})   ;; exten=_X,1,(TEMP=${EXTEN}) is also not
working
exten=2,n,Read(AGE,,1,10)
exten=2,n,Set(AGE=${${TEMP}*10+${AGE}})
exten=2,n,Goto(s,3)
​


-
​ OUTPUT -​


​ == Using SIP RTP CoS mark 5
-- Executing [s@test:1] Wait(SIP/101-0005, 1) in new stack
-- Executing [s@test:2] Macro(SIP/101-0005, age) in new stack
-- Executing [s@macro-age:1] BackGround(SIP/101-0005, my/age)
in new stack
-- SIP/101-0005 Playing 'my/age.slin' (language 'en')
[Sep  9 00:55:11] WARNING[9759][C-0005]: pbx.c:6696 __ast_pbx_run:*
Invalid extension '2', but no rule 'i' or 'e' in context 'test'*
-- Executing [h@test:1] NoOp(SIP/101-0005, ,) in new stack
[Sep  9 00:55:11] NOTICE[9759]: pbx_spool.c:402 attempt_thread: Call
completed to SIP/
​
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] is pattern matching inside macro valid?

2014-09-08 Thread Anurag Rana
Can't we use pattern matching inside a macro?
Because when I am trying to do so call is terminating even for a very
simple dummy dialplan.

[demo3]
exten=98,1,NoOp()
exten=98,2,Macro(testme)
exten=h,1,NoOp(terminating call);

[macro-testme]
exten=s,1,Playback(Digits/2)
exten=s,2,WaitExten(15)
exten=s,3,NoOp()

exten=_X,1,NoOp(${EXTEN})
exten=_X,2,Goto(s,3)


Even for this code when execution reaches the line 2 in macro 'testme' it
terminates as soon as I input some number.

Error :

WARNING[9984][C-000d]: pbx.c:6696 __ast_pbx_run: Invalid extension '5',
but no rule 'i' or 'e' in context 'demo3'
-- Executing [h@demo3:1] NoOp(SIP/101-000d, terminating call)
in new stack
[Sep  9 02:11:14] NOTICE[9984]: pbx_spool.c:402 attempt_thread: Call
completed to SIP/101/009871888729

Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Pattern Extension not working in Dialplan

2014-09-07 Thread Anurag Rana
Hi,

I created a dummy dialplan  where I ask the user to enter the age.

[macro-age]
exten = s,1,Background(my/age)  ;;Play recorded message to enter age
exten = s,n,WaitExten(10)
exten = _XX,1,Set(AGE=${EXTEN});; this line is not executing, instead
dialplan is terminating with error given below.
exten = s,n,NoOp(${AGE})
exten = s,n,GotoIf($[${LEN(${AGE})}  0]?notEmpty)
exten = s,n,Goto(s,1)
exten = s(notEmpty),n,Background(my/thank-you)
exten = s,n,Wait(1)


When I receive call and tries to enter the digits (86 lets say), it only
accept just first digit and terminates even before considering second digit.
Error message :
 WARNING[5726][C-000a]: pbx.c:6696 __ast_pbx_run: Invalid extension
'8', but no rule 'i' or 'e' in context 'testmacro'

Please suggest what might be wrong.


Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Pattern Extension not working in Dialplan

2014-09-07 Thread Anurag Rana
​Thank you all for your suggestions.

1. [macro-age] is a macro and not an extension badly named.

2. I am able to use Read to fulfill the purpose but we can't use Read()
after Background(). To use read we need Playback() [ am I right?]. But
Playback do not provide barge-in facility i.e. user have to listen whole
message then only his inputs will be accepted and if he entered input
during the time recording is played , the input will be lost.
So if using Background() [which return the control immediately] I have to
use _XX extension.

3. So basically I want to create a dial-plan where user is asked to input
multi-digit value and he can enter it without listening complete message
(if the user knows the message already)​
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] transfering call to dialplan without disconnecting.

2014-08-30 Thread Anurag Rana
Hi All,

I am trying to build a small setup using asterisk where user1 calls the
user2 and after a conversation of few minutes user1 puts the call on
automation i.e. after few minutes user1 should be able to kind of transfer
the call to dialplan where the call proceed as per user2's DTMF input and
dialplan structure (without disconnecting the call).

How can this be achieved?

Thanks
Anurag Rana
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Recording sound.

2014-07-13 Thread Anurag Rana
Hi All,

I am calling mobile numbers from Soft-phone and recording the call.
In recording the level of sound from the receiver's side is perfect (loud
enough) but my voice's sound level is very weak. I barely can hear it.

During the call receiver is able to hear me. But in recording my part of
conversation is barely audible.

I am recording using MixMonitor().

Is there anything that can be done to mitigate the problem?


Anurag Rana
http://newbie42.blogspot.in/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
Hi All.

Someone is attacking on my SIP server.
There are lot of requests coming in and I am not able to stop it because I
am unable to detect the IP address.
I used wireshark to capture the packets.

Although I am using very strong password for my SIP users but still is
there any way to drop these packets and stop this attack.

I tried dropping packet after matching some string (most of the packets
from attacker contains string 'VaxSIPUserAgent/3.1' ) but it failed.
Packets are still flowing in.

iptables -I INPUT 1 -p tcp --dport 5060 -m string --string
VaxSIPUserAgent --algo bm -j DROP


​Its something like this

Registration from '30 sp:30@my_public_ip:5060 failed for
'192.168.xxx.xxx:6373' - Wrong Password​

​and there are approx 10 request per minute of this type.

Please suggest some way to stop this.​


-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
I added bot rules TCP as well as UDP.  Still not working.

How changing SIP listen port will prevent it. Please explain.

I will try fail2band.


On Fri, Jun 27, 2014 at 8:16 PM, Prakash N prakas...@tevatel.com wrote:

  Hi,

 Install fail2band and change sip listen port to avoid attack

 With regards

 N.Prakash
  --
 From: Anurag Rana anuragrana31...@gmail.com
 Sent: ‎27-‎06-‎2014 08:07 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 asterisk-users@lists.digium.com
 Subject: [asterisk-users] Attack on Sip server.


 Hi All.

 Someone is attacking on my SIP server.
 There are lot of requests coming in and I am not able to stop it because I
 am unable to detect the IP address.
 I used wireshark to capture the packets.

 Although I am using very strong password for my SIP users but still is
 there any way to drop these packets and stop this attack.

 I tried dropping packet after matching some string (most of the packets
 from attacker contains string 'VaxSIPUserAgent/3.1' ) but it failed.
 Packets are still flowing in.

 iptables -I INPUT 1 -p tcp --dport 5060 -m string --string VaxSIPUserAgent 
 --algo bm -j DROP


 ​Its something like this

 Registration from '30 sp:30@my_public_ip:5060 failed for
 '192.168.xxx.xxx:6373' - Wrong Password​

 ​and there are approx 10 request per minute of this type.

 Please suggest some way to stop this.​


 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.





-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
Both Rules* (typo in last mail)


On Fri, Jun 27, 2014 at 8:19 PM, Anurag Rana anuragrana31...@gmail.com
wrote:

 I added bot rules TCP as well as UDP.  Still not working.

 How changing SIP listen port will prevent it. Please explain.

 I will try fail2band.


 On Fri, Jun 27, 2014 at 8:16 PM, Prakash N prakas...@tevatel.com wrote:

  Hi,

 Install fail2band and change sip listen port to avoid attack

 With regards

 N.Prakash
  --
 From: Anurag Rana anuragrana31...@gmail.com
 Sent: ‎27-‎06-‎2014 08:07 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 asterisk-users@lists.digium.com
 Subject: [asterisk-users] Attack on Sip server.


 Hi All.

 Someone is attacking on my SIP server.
 There are lot of requests coming in and I am not able to stop it because
 I am unable to detect the IP address.
 I used wireshark to capture the packets.

 Although I am using very strong password for my SIP users but still is
 there any way to drop these packets and stop this attack.

 I tried dropping packet after matching some string (most of the packets
 from attacker contains string 'VaxSIPUserAgent/3.1' ) but it failed.
 Packets are still flowing in.

 iptables -I INPUT 1 -p tcp --dport 5060 -m string --string VaxSIPUserAgent 
 --algo bm -j DROP


 ​Its something like this

 Registration from '30 sp:30@my_public_ip:5060 failed for
 '192.168.xxx.xxx:6373' - Wrong Password​

 ​and there are approx 10 request per minute of this type.

 Please suggest some way to stop this.​


 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.





 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.





-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
Right Mitul. System is behind some gateway.


On Fri, Jun 27, 2014 at 10:06 PM, Mitul Limbani mi...@enterux.in wrote:

 I think your asterisk server is behind firewall or some sort of NAT where
 the out to in packets are getting masqueraded with local or DMZ  IP of your
 firewall / gateway box.

 Fix this first to get fail2ban detect the correct public IP.

 Otherwise fail2ban will ban your local GW IP due to which you won't be
 able to access the box even from your local network for ssh.

 Hope u know how to fix the firewall snat.

 Mitul
 On 27-Jun-2014 9:51 PM, Jai Rangi jpra...@didforsale.com wrote:

 Anurag,

 Here is small script, that will check your logs and will block the IPs.
 http://www.didforsale.com/blog/is-your-asterisk-system-under-heavy-attack

 This is good if you dont expect any registration. If you do have some
 valid registration, you might want to add some counter to see how time IP
 need to fail or how many different users IP is trying to register on before
 blocking the IP.

 Jai Rangi
 www.didforslae.com



 On Fri, Jun 27, 2014 at 7:37 AM, Anurag Rana anuragrana31...@gmail.com
 wrote:


 Hi All.

 Someone is attacking on my SIP server.
 There are lot of requests coming in and I am not able to stop it because
 I am unable to detect the IP address.
 I used wireshark to capture the packets.

 Although I am using very strong password for my SIP users but still is
 there any way to drop these packets and stop this attack.

 I tried dropping packet after matching some string (most of the packets
 from attacker contains string 'VaxSIPUserAgent/3.1' ) but it failed.
 Packets are still flowing in.

 iptables -I INPUT 1 -p tcp --dport 5060 -m string --string 
 VaxSIPUserAgent --algo bm -j DROP


 ​Its something like this

 Registration from '30 sp:30@my_public_ip:5060 failed for
 '192.168.xxx.xxx:6373' - Wrong Password​

 ​and there are approx 10 request per minute of this type.

 Please suggest some way to stop this.​


 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
Can't use anything which block IP addresses because my system is behind a
gateway and attacker gets the address of that gateway. In this way I will
end up blocking myself.

Please suggest something else.


On Fri, Jun 27, 2014 at 10:24 PM, Anurag Rana anuragrana31...@gmail.com
wrote:

 Right Mitul. System is behind some gateway.


 On Fri, Jun 27, 2014 at 10:06 PM, Mitul Limbani mi...@enterux.in wrote:

 I think your asterisk server is behind firewall or some sort of NAT where
 the out to in packets are getting masqueraded with local or DMZ  IP of your
 firewall / gateway box.

 Fix this first to get fail2ban detect the correct public IP.

 Otherwise fail2ban will ban your local GW IP due to which you won't be
 able to access the box even from your local network for ssh.

 Hope u know how to fix the firewall snat.

 Mitul
 On 27-Jun-2014 9:51 PM, Jai Rangi jpra...@didforsale.com wrote:

 Anurag,

 Here is small script, that will check your logs and will block the IPs.
 http://www.didforsale.com/blog/is-your-asterisk-system-under-heavy-attack

 This is good if you dont expect any registration. If you do have some
 valid registration, you might want to add some counter to see how time IP
 need to fail or how many different users IP is trying to register on before
 blocking the IP.

 Jai Rangi
 www.didforslae.com



 On Fri, Jun 27, 2014 at 7:37 AM, Anurag Rana anuragrana31...@gmail.com
 wrote:


 Hi All.

 Someone is attacking on my SIP server.
 There are lot of requests coming in and I am not able to stop it
 because I am unable to detect the IP address.
 I used wireshark to capture the packets.

 Although I am using very strong password for my SIP users but still is
 there any way to drop these packets and stop this attack.

 I tried dropping packet after matching some string (most of the packets
 from attacker contains string 'VaxSIPUserAgent/3.1' ) but it failed.
 Packets are still flowing in.

 iptables -I INPUT 1 -p tcp --dport 5060 -m string --string 
 VaxSIPUserAgent --algo bm -j DROP


 ​Its something like this

 Registration from '30 sp:30@my_public_ip:5060 failed for
 '192.168.xxx.xxx:6373' - Wrong Password​

 ​and there are approx 10 request per minute of this type.

 Please suggest some way to stop this.​


 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly
 life in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.





-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attack on Sip server.

2014-06-27 Thread Anurag Rana
Ok. Thanks. :)


On Fri, Jun 27, 2014 at 11:05 PM, Mitul Limbani mi...@enterux.in wrote:

 No way out. Fix ur gateway which is masquerading out to in traffic.

 And do some research as others mentioned instead of expecting quick fix.

 Mitul
 On 27-Jun-2014 10:45 PM, Anurag Rana anuragrana31...@gmail.com wrote:

 Can't use anything which block IP addresses because my system is behind a
 gateway and attacker gets the address of that gateway. In this way I will
 end up blocking myself.

 Please suggest something else.


 On Fri, Jun 27, 2014 at 10:24 PM, Anurag Rana anuragrana31...@gmail.com
 wrote:

 Right Mitul. System is behind some gateway.


 On Fri, Jun 27, 2014 at 10:06 PM, Mitul Limbani mi...@enterux.in
 wrote:

 I think your asterisk server is behind firewall or some sort of NAT
 where the out to in packets are getting masqueraded with local or DMZ  IP
 of your firewall / gateway box.

 Fix this first to get fail2ban detect the correct public IP.

 Otherwise fail2ban will ban your local GW IP due to which you won't be
 able to access the box even from your local network for ssh.

 Hope u know how to fix the firewall snat.

 Mitul
 On 27-Jun-2014 9:51 PM, Jai Rangi jpra...@didforsale.com wrote:

 Anurag,

 Here is small script, that will check your logs and will block the
 IPs.

 http://www.didforsale.com/blog/is-your-asterisk-system-under-heavy-attack

 This is good if you dont expect any registration. If you do have some
 valid registration, you might want to add some counter to see how time IP
 need to fail or how many different users IP is trying to register on 
 before
 blocking the IP.

 Jai Rangi
 www.didforslae.com



 On Fri, Jun 27, 2014 at 7:37 AM, Anurag Rana 
 anuragrana31...@gmail.com wrote:


 Hi All.

 Someone is attacking on my SIP server.
 There are lot of requests coming in and I am not able to stop it
 because I am unable to detect the IP address.
 I used wireshark to capture the packets.

 Although I am using very strong password for my SIP users but still
 is there any way to drop these packets and stop this attack.

 I tried dropping packet after matching some string (most of the
 packets from attacker contains string 'VaxSIPUserAgent/3.1' ) but it
 failed. Packets are still flowing in.

 iptables -I INPUT 1 -p tcp --dport 5060 -m string --string 
 VaxSIPUserAgent --algo bm -j DROP


 ​Its something like this

 Registration from '30 sp:30@my_public_ip:5060 failed for
 '192.168.xxx.xxx:6373' - Wrong Password​

 ​and there are approx 10 request per minute of this type.

 Please suggest some way to stop this.​


 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly
 life in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.





 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list

[asterisk-users] How to execute an AGI script for each call.

2014-06-27 Thread Anurag Rana
Hi All,

I am trying to execute some AGI script no matter what extension is called.
There is 'h' extension to call AGI script when any call hangs up no matter
what extension hangup.

for example -

[some-context]

/// something here which call AGI script no matter what extension receive
call.

exten = 111,1,Dial(SIP/111)
exten = 112,1,Dial(SIP/112)

exten = h,1,AGI(pt.py)   ;; executes no matter what extension hang up

​Thanks​

-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Changing recorded file storage directory.

2014-06-26 Thread Anurag Rana
Hi All,

In asterisk, default directory to store the call-recording files is
/var/spool/asterisk/monitor.

Can we change this directory? How?

-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Executing an AGI python script in Asterisk after call is bridged.

2014-06-26 Thread Anurag Rana
Hi All,

There is an option of starting the recording of call after the call is
bridged. [ b option].
Is there any way of running an AGI script only if call is bridged otherwise
not.

Thanks

-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Executing an AGI python script in Asterisk after call is bridged.

2014-06-26 Thread Anurag Rana
Thanks Rafeal. This is what I needed.

But first line i.e.

exten = _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${
SESSIONID})S(${MAXCALLTIME}))

is very complicated.

I have very simple plan which is as below.

[context-demo]
exten=,1,AGI ( pythonscript.py )
exten=,1,Dial(SIP/)


that all.

Now can you please explain me in simpler form.

I am sorry. I am a newbie.



On Thu, Jun 26, 2014 at 11:12 PM, Rafael Visser visser.raf...@gmail.com
wrote:

 Hi Anurag.
 I didn't undertand much you question. But you have a dial option to a
 macro  when b answers
 example...


 exten =
 _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))



 [macro-acceptcall]
 ; this macro is executed when b answers, requesting b  if is interested to
 pay the bill
 exten = s,1,AGI(your-agi-program.pl)
 exten = s,2,others...


 Regards..
 rv




 2014-06-26 11:19 GMT-04:00 Anurag Rana anuragrana31...@gmail.com:

 Hi All,

 There is an option of starting the recording of call after the call is
 bridged. [ b option].
 Is there any way of running an AGI script only if call is bridged
 otherwise not.

 Thanks

 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Echo Cancellation when calling from softphone to mobile.

2014-06-25 Thread Anurag Rana
Hi,

I am using Twinkle to call mobile phone but there is too much noise on the
mobile user's end. Mobile user's voice is echoed back to user. While on
twinkle end everything is fine.

Using Asterisk 11.

Please suggest some way to mitigate the problem.

Thanks.



-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Echo Cancellation when calling from softphone to mobile.

2014-06-25 Thread Anurag Rana
Is there any Software solution?


On Wed, Jun 25, 2014 at 11:38 PM, Mitul Limbani mi...@enterux.in wrote:

 Put line side echo cancelation chip on ur PRI card.
 On 25-Jun-2014 10:35 PM, Anurag Rana anuragrana31...@gmail.com wrote:

 Hi,

 I am using Twinkle to call mobile phone but there is too much noise on
 the mobile user's end. Mobile user's voice is echoed back to user. While on
 twinkle end everything is fine.

 Using Asterisk 11.

 Please suggest some way to mitigate the problem.

 Thanks.



 --
 Anurag Rana
 http://newbie42.blogspot.in/
 On the trampoline of life's experiences, Striving towards a saintly life
 in the midst of these materialistic turbulences.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in
the midst of these materialistic turbulences.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users