[asterisk-users] Connecting to multiple databases using res_config_pgsql

2013-02-23 Thread Deepesh D
Hello,

How do I use multiple postgresql databases using res_config_pgsql?

I tried creating multiple contexts in res_pgsql.conf, but asterisk is
only using the 'general' context.

My res_pgsq.conf is

[general]   ;; Connect to mydb on localhost
dbport=5432
dbname=mydb
dbuser=pgdbuser
requirements=warn

[pgwritedb] ;; Connect to mydb2 on another host
dbhost=IP of other db server
dbport=5432
dbname=mydb2
dbuser=pgdbuser2
dbpass=x
requirements=warn

In extconfig.conf I configured
sippeers = pgsql,general,sip_peers
sipregs = pgsql,pgwritedb,sip_regs

But asterisk is not using 'pgwritedb' to connect for sipregs, its
trying to update 'sip_regs' on the local database.

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] Variables set by AGI lost in dialplan

2013-02-15 Thread Deepesh D
On Thu, Feb 14, 2013 at 8:35 PM, Steve Edwards
asterisk@sedwards.com wrote:
 On Thu, 14 Feb 2013, Deepesh D wrote:

 The problem I am facing is that sometimes the variables are wrongly
 received as 0 (zero) in the dialplan even if the AGI has set it to a
 non-zero value.


 Are the variables actually set to '0' and not '' (like an undefined
 variable)?
The variables are set to '0'



 This error does not happen for all calls and is not reproducible, it is
 random.


 Maybe you are violating the AGI protocol. Are you using an established
 library or did you roll your own?
Yes, even I suspect that. I am not using any established library. I
have written my own AGI.
I get the error utils.c: write() returned error: Broken pipe when
the AGI is called. In many forums and mailing-lists I read that this
message can be safely ignored. Till now, I used to ignore this message
as the AGI seemed to worked without any problem, it was only 2 days
ago that I realized that there are a few calls being dropped. Now I
have made some changes to the AGI and the error message has gone away.
I will monitor it for a day to check if the problem happens again




 My asterisk server handles about 100 calls per minute, so its impossible
 for me to do an 'agi set debug' and observer the output


 That's less than 2 per second, so the output may be voluminous, but not
 impossible.



 Without some AGI debugging output it will be difficult to suggest anything
 relevant.

 --
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000


 --
 _
 -- 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


[asterisk-users] What is the maximum number of meetme's allowed?

2012-12-24 Thread Deepesh D
Hello,

What is the maximum number of meetme's allowed by asterisk.

On my server with an 8 GB memory, I start getting the following error
after 150-160 meetme's are created

WARNING[3485]: app_meetme.c:1820 conf_run: Unable to open DAHDI pseudo
channel: Cannot allocate memory

At this time the server still has about 6 GB of free memory. I even
tried this on a server with higher memory, it gives the same result.

I am using asterisk 1.4.44.

--
_
-- 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] What is the maximum number of meetme's allowed?

2012-12-24 Thread Deepesh D
I am using 64-bit Linux OS. Also before starting asterisk I have set
the ulimit to a higher value.

When this happened there was no calls in the system. There was only
about 160 Meetme conferences, and in each Meetme there was only one
channel.

On Mon, Dec 24, 2012 at 11:36 PM, Johan Wilfer li...@jttech.se wrote:
 2012-12-24 16:13, Deepesh D skrev:
 Hello,

 What is the maximum number of meetme's allowed by asterisk.

 On my server with an 8 GB memory, I start getting the following error
 after 150-160 meetme's are created

 WARNING[3485]: app_meetme.c:1820 conf_run: Unable to open DAHDI pseudo
 channel: Cannot allocate memory

 At this time the server still has about 6 GB of free memory. I even
 tried this on a server with higher memory, it gives the same result.

 I am using asterisk 1.4.44.


 You have probably run out of file descriptors. Try
 ulimit -n 8192
 before starting asterisk (or in the safe_asterisk-script or the
 init.d-script).

 I think this is per default 1024 on debian, and if you use sip + meetme
 you will hit the limit with about 150 concurrent calls.

 --
 Johan Wilfer

 JT Technologies  Telecommunications AB
 Jabber: jo...@jttech.se | Web: www.jttech.se

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-12 Thread Deepesh D
I made these changes in dialplan and it worked. Thanks a lot.

In most of the cases S1, S2 and C1 are in my control. But in some
cases the dialplan of C1 is not in my control. Also in some cases C1
can be any SIP client like a softphone or SIP device, so it wont work
in those case. Is there some way I can get those also working.

On Fri, Oct 12, 2012 at 1:12 AM, Joshua Colp jc...@digium.com wrote:
 Deepesh D wrote:

 If C1 dials S1 and then S1 dials S2 to transfer the call then S1 still
 remains in the loop till the call is finished. What I wanted to do is
 to reduce the number of calls on S1, so as soon as S1 receives a call
 from C1 it redirects the call to S2 using 'Transfer' application and
 exits from the loop, the call should now be handled by S2


 With some crafty configuration you can achieve this using Transfer. With
 promiscredir disabled Asterisk will not follow the SIP URI in the 302
 response sent back as a result of calling Transfer. The call reenters the
 dialplan at the user portion of the URI passed back and executes dialplan as
 normal. By prefixing the user portion with a unique identifier you can write
 dialplan that strips the prefix and then dials out to S2.

 Flow being:

 C1 executes Dial(SIP/${EXTEN}@S1) (matched using _1NXXNXX)
 S1 executes Transfer(002${EXTEN}) (matched using _1NXXNXX)
 C1 executes Dial(SIP/${EXTEN:3}@S2) (matched using _0021NXXNXX)

 So simply:
 C1 calls S1
 S1 decides to send it to S2, but wants to tell C1 to do it directly
 S1 sends back a SIP message saying hey call 00218005551212 instead
 C1 matches the number to the dialplan which explicitly calls out through S2
 S2 receives the call and life is good

 * Note: This requires control over both C1 and S1, you can't just do it to
 every random system calling.

 If you don't get the finer details of this just experiment with the general
 idea and configuration option I mentioned. It won't hurt.

 Cheers,

 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at:  www.digium.com   www.asterisk.org


 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-12 Thread Deepesh D
This doesn't work reliably well with all all clients. I tested it
using a zoiper soft phone and it worked. But from an ATA device it
failed. On the S2 server it failed to authenticate

The console of S2 showed
[Oct 12 18:21:06] WARNING[30483]: chan_sip.c:13952 check_auth:
username mismatch, have X, digest has 
[Oct 12 18:21:06] NOTICE[30483]: chan_sip.c:22046
handle_request_invite: Failed to authenticate device
sip:X@192.168.1.1:14500;tag=3047

On Fri, Oct 12, 2012 at 5:00 PM, Joshua Colp jc...@digium.com wrote:
 Deepesh D wrote:

 I made these changes in dialplan and it worked. Thanks a lot.

 In most of the cases S1, S2 and C1 are in my control. But in some
 cases the dialplan of C1 is not in my control. Also in some cases C1
 can be any SIP client like a softphone or SIP device, so it wont work
 in those case. Is there some way I can get those also working.


 You can certainly execute Transfer() and most clients will then send the
 call to where you have specified. If you have the same users on all possible
 servers you would Transfer to with the same username/password a challenge
 should occur and authentication happen.

 I haven't tested that though.


 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at:  www.digium.com   www.asterisk.org

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
From C1 when I directly dial into S2 it goes into the context
'test_context'. But when the call is made to S1 and S1 transfers the
call to S2 then the call goes into default context.

In all my peer definitions on S1 and S2 I define the context as
'test_context' and the default context is 'default'

On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS})
 exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I get
 TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
 S2). But the call does not get authenticated on S2 and goes into
 default context instead of 'test_context'. How can I transfer the call
 such that S2 authenticates the call and sends it to the required
 context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
From C1 when I directly dial into S2, it goes into the context
'test_context'. But when the call is made to S1 and S1 transfers the
call to S2 then the call goes into default context.

In all my peer definitions on S1 and S2, I define the context as
'test_context' and the default context is 'default'

On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS})
 exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I get
 TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
 S2). But the call does not get authenticated on S2 and goes into
 default context instead of 'test_context'. How can I transfer the call
 such that S2 authenticates the call and sends it to the required
 context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
From C1 when I directly dial into S2 it goes into the context
'test_context'. But when the call is made to S1 and S1 transfers the
call to S2 then the call goes into default context.

In all my peer definitions on S1 and S2 I define the context as
'test_context' and the default context is 'default'

On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS})
 exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I get
 TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
 S2). But the call does not get authenticated on S2 and goes into
 default context instead of 'test_context'. How can I transfer the call
 such that S2 authenticates the call and sends it to the required
 context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
From C1 when I directly dial into S2 it goes into the context
'test_context'. But when the call is made to S1 and S1 transfers the
call to S2 then the call goes into default context.

In all my peer definitions on S1 and S2 I define the context as
'test_context' and the default context is 'default'


On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS})
 exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I get
 TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
 S2). But the call does not get authenticated on S2 and goes into
 default context instead of 'test_context'. How can I transfer the call
 such that S2 authenticates the call and sends it to the required
 context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
In all my peer definitions on S1 and S2 I define the context as
'test_context' and the default context is 'default'.

When I directly dial from C1 into S2 it goes into the context
'test_context'. But when the call is made to S1 and S1 transfers the
call to S2 then the call goes into default context.

On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS})
 exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I get
 TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
 S2). But the call does not get authenticated on S2 and goes into
 default context instead of 'test_context'. How can I transfer the call
 such that S2 authenticates the call and sends it to the required
 context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
I am able to register S1 as a peer in S2 and dial from S1 to S2, but
this is not my requirement. I want to dial from C1 into S1 and S1
should redirect the call to S2.

I am trying to do a load balancing setup between S1 and S2. S1 will be
primary server which accepts all calls and then based on some
conditions redirect some calls to S2

On Thu, Oct 11, 2012 at 6:39 PM, Danny Nicholas da...@debsinc.com wrote:
 So what happens when you dial directly from S1 to S2?

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Deepesh D
 Sent: Thursday, October 11, 2012 5:44 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] How to use 'Transfer' to send calls to another
 asterisk?

 In all my peer definitions on S1 and S2 I define the context as
 'test_context' and the default context is 'default'.

 When I directly dial from C1 into S2 it goes into the context
 'test_context'. But when the call is made to S1 and S1 transfers the call to
 S2 then the call goes into default context.

 On Wed, Oct 10, 2012 at 9:22 PM, Sean Darcy seandar...@gmail.com wrote:
 On Wed, Oct 10, 2012 at 8:06 AM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 How do I use the asterisk application 'Transfer' to transfer a SIP
 call from one asterisk to another?

 I have the following scenario. I have two asterisk servers S1 and S2.
 There is a third asterisk server C1 which registers as a peer to S1.
 From C1, I dial into S1 using 'Dial' command. What I want to do is,
 use the Transfer command in S1 and transfer the call to S2.

 Dialplan on S1
 [test_context]
 exten = _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
 exten = _X.,n,NoOp(${TRANSFERSTATUS}) exten = _X.,n,Hangup

 Dialplan on S2
 [default]
 exten = _X.,1,Playback(somemsg)
 exten = _X.,n,Hangup

 [test_context]
 exten = _X.,1,Answer
 exten = _X.,n,Playback(msg)
 exten = _X.,n,Hangup

 The context for the SIP peer C1 is defined as 'test_context' in S1 and
 S2.

 In C1, I have set 'promiscredir = yes' in sip.conf.

 When I dial from C1, the call is successfully transferred to S1 (I
 get TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the
 call to S2). But the call does not get authenticated on S2 and goes
 into default context instead of 'test_context'. How can I transfer
 the call such that S2 authenticates the call and sends it to the
 required context?

 Thanks


 What happens when you dial into S2 from outside?

 Did you set a context in sip.conf on S2?

 sean

 --
 _
 -- 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

--
_
-- 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] How to use 'Transfer' to send calls to another asterisk?

2012-10-11 Thread Deepesh D
If C1 dials S1 and then S1 dials S2 to transfer the call then S1 still
remains in the loop till the call is finished. What I wanted to do is
to reduce the number of calls on S1, so as soon as S1 receives a call
from C1 it redirects the call to S2 using 'Transfer' application and
exits from the loop, the call should now be handled by S2

On Thu, Oct 11, 2012 at 7:22 PM, Danny Nicholas da...@debsinc.com wrote:
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Deepesh D
 Sent: Thursday, October 11, 2012 8:48 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] How to use 'Transfer' to send calls to another
 asterisk?

 I am able to register S1 as a peer in S2 and dial from S1 to S2, but this is
 not my requirement. I want to dial from C1 into S1 and S1 should redirect
 the call to S2.

 I am trying to do a load balancing setup between S1 and S2. S1 will be
 primary server which accepts all calls and then based on some conditions
 redirect some calls to S2

 --

 My point in asking is that a transfer (in general, and specifically in this
 case) is a redial.  If A dials B and B transfers to C, two dials occur; A-B
 to get to Asterisk, then B-C within Asterisk.  So when you call from C1 to
 S1 and then S1 calls S2, it should look the same as if there were one call
 from S1 to S2.



 --
 _
 -- 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


[asterisk-users] Allowing transfer of only incoming calls

2012-05-29 Thread Deepesh D
Hello,

Is there a way by which a SIP peer can only transfer an incoming call?

When I set 'allowtransfer=yes' the peer is able to transfer both outgoing
calls and incoming calls. Is there any SIP setting or dialplan setting by
which I can restrict transfer of outgoing calls.

The asterisk version I am using is 1.8.8.2 and the peers are using the SIP
REFER method for transferring calls.

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

[asterisk-users] Types of bridging

2012-03-29 Thread Deepesh D
Hello all,

What are the different type of bridging used by asterisk in a SIP
call? What is the difference between Packet2Packet bridging, Remote
bridging and Native bridging?

Can someone please explain me the differences or point me to a good
documentation of the same.

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] Types of bridging

2012-03-29 Thread Deepesh D
Earlier I was using asterisk 1.4 and 1.6. In these version it used to
do native bridging and the CPU load was not very high. Now after
switching to asterisk 1.8 it has started to do remote bridging and the
CPU load has often started to peak.

Could this be a configuration issue. I have done the same SIP settings
that was earlier there in 1.4 and 1.6. I have 'directmedia=yes' and
'directrtpsetup=yes' in sip.conf and both the peers use the same
codecs and there are no nat issues as well

Please help

On Thu, Mar 29, 2012 at 7:29 PM, Phil Frost p...@macprofessionals.com wrote:
 On Mar 29, 2012, at 08:43 , Deepesh D wrote:
 What are the different type of bridging used by asterisk in a SIP
 call? What is the difference between Packet2Packet bridging, Remote
 bridging and Native bridging?

 Packet2Packet bridging is when RTP datagrams are forwarded by Asterisk 
 without modification. This imposes little load on the CPU. Obviously this can 
 only happen if both ends are using the same codec, and likely there are 
 likely other less obvious conditions that must be met.

 Remote bridging happens when Asterisk can direct both ends to send media (RTP 
 probably) to each other directly, by a SIP reINVITE, for example. Only works 
 if both ends have a route to each other, Asterisk is configured to do it, 
 each end shares a codec, and probably a dozen other more subtle conditions 
 are true. In this case there is no load on Asterisk as it's not even in the 
 media path. It also means it can't do things like intercept and act on DTMF 
 or monitor the call.

 Native bridging is when media is forwarded with Asterisk, but for whatever 
 reason (different codecs, maybe) Asterisk must inspect or modify the stream. 
 Could mean a significant CPU load.
 --
 Phil Frost
 Macprofessionals
 office 248-893-0738
 direct 248-662-0809




 --
 _
 -- 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] default context overrides context of peer

2011-05-03 Thread Deepesh D
This works when I change the host to non-dynamic and
insecure=port,invite for the peer, but does not work when
host=dynamic.

Also my sip peers are realtime. If I remove the realtime peer and
create a peer in sip.conf this works !!

On Tue, May 3, 2011 at 11:15 AM, Justin Case
nogoodnameswereavaila...@gmail.com wrote:
 On Mon, May 2, 2011 at 1:09 PM, Deepesh D deep.d2...@gmail.com wrote:
 Hello,

 I upgraded from asterisk 1.6.2.7 to asterisk 1.6.2.17.

 I have context=defcontext set in sip.conf. For each peer I have
 context=outcontext in the peer definition since I want outgoing calls
 from registered SIP peers to go through context 'outcontext'. This
 used to work in the older version (1.6.2.7), but after upgrading this
 has stopped working. Now outgoing calls are going to 'defcontext' and
 the calls fail. After the peer registers 'sip show peer peername'
 show the context as 'outcontext', but while making a call the default
 context in sip.conf overrides the peer context.

 Is there any other setting that I need to do in asterisk 1.6.2.17?


 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



 I am having the same issue and have not found a fix. Maybe we are both
 doing something wrong ;)

 --
 _
 -- 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


[asterisk-users] default context overrides context of peer

2011-05-02 Thread Deepesh D
Hello,

I upgraded from asterisk 1.6.2.7 to asterisk 1.6.2.17.

I have context=defcontext set in sip.conf. For each peer I have
context=outcontext in the peer definition since I want outgoing calls
from registered SIP peers to go through context 'outcontext'. This
used to work in the older version (1.6.2.7), but after upgrading this
has stopped working. Now outgoing calls are going to 'defcontext' and
the calls fail. After the peer registers 'sip show peer peername'
show the context as 'outcontext', but while making a call the default
context in sip.conf overrides the peer context.

Is there any other setting that I need to do in asterisk 1.6.2.17?


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] Agents login

2010-12-25 Thread Deepesh D
Hello Michael,

You could try to achieve this functionality in dialplan by using the
applications  AddQueueMember/RemoveQueueMember which are used to
dynamically add/remove queue members.

An example dialplan flow for agent login will be

1.  get the SIP interface from which the agent is logging in (like
SIP/1234). You should be able to extract it from the CHANNEL variable
2.  Ask for the agentid/code. Read the agentid/code and  use an AGI to
authenticate the agent
3.  Add the SIP interface to the queue using AddQueueMember
AddQueueMember(queuename,SIP/1234,)

You could have a similar dialplan for agent logout, which removes SIP
interface from the queue using RemoveQueueMember.

For the DND you could then use PauseQueueMember/UnpauseQueueMember applications.

Regards,
Deepesh


On Sat, Dec 25, 2010 at 7:01 PM, Michael voip.quest...@gmail.com wrote:

 Greetings and Merry Christmas,

 We're trying to implements a queue and agents login mechanism on our Asterisk.

 After going over the documentation, we're unsure if we got it right.

 We wish to setup a hotdesk mechanism, where an agent comes to a station 
 with a PC  IP phone (that is defined as a sip friend user in sip.conf), 
 dials a certain number (agent login extension), enters his agent Id and code, 
 and from now on this phone serves as his. Then, when a call comes into the 
 queue he is associated to, if he is not on the line, the call would ring in 
 his phone and he'll be able to pick it up. He should also be able to set a 
 DND (if he needs a break).

 Is that possible?? From what we saw, the agents login works on a constantly 
 open line.

 Any help (and examples) would be highly appreciated.

 Thank you in advance,

 Michael

 --
 _
 -- 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


[asterisk-users] sip peer becomes unreachable in Asterisk 1.6

2010-07-27 Thread Deepesh D
Hello,

I recently upgraded from asterisk 1.4 to 1.6. I am using the same SIP
settings in sip.conf in this version also. I am facing  a problem when
a SIP client makes a call.

When a SIP client registers to asterisk its status shows 'OK' and it
is able to receive incoming calls. But as soon as this client make a
call, its status becomes 'UNREACHABLE' and it cannot receive any
incoming calls. Its status remains 'UNREACHABLE' until it re-registers
again. I have faced this problem on various versions of 1.6 (1.6.2.0,
1.6.2.7, 1.6.1.1), but this never happened in the 1.4 (1.4.24, 1.4.26)
versions.

I have kept the SIP re-register time in the clients to a very small
value to avoid becoming 'UNREACHABLE' for a long time, but his doesn't
seem to be the solution. Is there any specific SIP settings which
needs to be made in 1.6 to avoid this problem?

I am using realtime sip. Some of my sip settings are
rtcachefriends=yes
rtupdate=no
qualify=yes
canreinvite=yes
nat=yes

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


[asterisk-users] Get channel name of originated channel

2010-07-14 Thread Deepesh D
Hello,

I am using asterisk manager interface (http) for originating calls.
How can I get the name of the channel which is created by originate? I
want to use this channel for other manager commands like Atxfer,
Monitor, Hangup etc.

If I do action=originate, channel=SIP/200  then it creates a channel
like 'SIP/200-0865ff80' which I can see in the asterisk console using
core show channels verbose.  Now if I want to transfer this call I
have to use action=Atxfer, channel=SIP/200-0865ff80 for which I need
the channel name. Is there any way to get this channel name or set the
channel name during originate? On what basis does asterisk assign
channel names, is it random?

-- 
_
-- 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] Originate multiple channels

2010-07-01 Thread Deepesh D
Hello,

Is it possible to use the asterisk manager interface to originate
multiple channels?

like
Action: Originate
Channel: SIP/101SIP/102

So that both extensions 101 and 102 rings simultaneously.

I am using asterisk manager interface over http.

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


[asterisk-users] Detecting hook flash in asterisk

2010-06-26 Thread Deepesh D
Hello,

Is it possible to detect a hook flash in asterisk. I want to be able to
perform some functions an hook flash.

I have the following entry in features.conf which executes a Macro on
detecting key press '**'.

[applicationmap]
test = **,caller,Macro,testflash

Is it possible to do this action on hook flash?
-- 
_
-- 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] Dialplan for conference

2010-06-24 Thread Deepesh D
Hello,

I wanted to add the functionality of 3-way conference to my asterisk pbx
using meetme or confbridge. During a call the user should be able to put the
other party on hold and dial another number, then on dialing some key
sequence all three of them enters into a conference. Is it possible to do
this? Can someone please point me to any dialplan examples to do this.

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

[asterisk-users] Generate cdr on Hangup

2010-06-22 Thread Deepesh D
Hello,

I have the following dialplan

exten = _X.,1,Set(CDR(userfield)=test)
exten = _X.,n,Do some checks and hangup if checks fail
exten = _X.,n,Dial(SIP/${EXTEN})
exten = _X.,n,Hangup

1. If the Dial fails with a busy, noanswer or congestion then a cdr is
generated.
2. If the call fails before Dial (if the checks fail) then no cdr is
generated.

I would like to generate a cdr in the second case also. Is there a way to do
this?
-- 
_
-- 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] Getting 'username' of sip peer

2010-05-27 Thread Deepesh D
Yes, setting a fullname=xxx in peer definition sets the CALLERID(name)
But if the peer sets it own callerid then will it override this value?

On Wed, May 26, 2010 at 10:52 PM, Danny Nicholas da...@debsinc.com wrote:
 I might be wrong, but I think that adding fullname=xxx to the context will
 populate CALLERID(name)

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Deepesh D
 Sent: Wednesday, May 26, 2010 12:18 PM
 To: asterisk-users@lists.digium.com
 Subject: [asterisk-users] Getting 'username' of sip peer

 Hello,

 I have a few entries for sip peers in sip.conf with different name and
 username, like

 [TestSIPUser]
 type=peer
 host=dynamic
 username=testuser
 secret=1234
 context=test_context

 [TestNewUser]
 type=peer
 host=dynamic
 username=newsipuser
 secret=3456
 context=test_context

 When a call is made from any of these peers I want to get the username
 of the peer.
 for eg:- If a call is being made from 'TestSIPUser' then I want to be
 able to get the value 'testuser'

 Is it possible to get the value of 'username' of the peer in the
 dialplan using some application/function ?

 Thanks,
 Deepesh

 --
 _
 -- 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


Re: [asterisk-users] Getting 'username' of sip peer

2010-05-27 Thread Deepesh D
Thanks. Got this working by using setvar=variable=value  in the peer
definition

SIPCHANINFO(peername) is giving me the 'name' of the peer i.e.
'TestSIPUser' and not the 'username'.



On Wed, May 26, 2010 at 11:20 PM, Jared Smith jsm...@digium.com wrote:
 On Wed, 2010-05-26 at 22:48 +0530, Deepesh D wrote:
 When a call is made from any of these peers I want to get the username
 of the peer.
 for eg:- If a call is being made from 'TestSIPUser' then I want to be
 able to get the value 'testuser'

 I can think of two ways of doing this.  The first is to use the
 SIPCHANINFO() dialplan function, like this:

 exten=123,1,Verbose(0,The call came from ${SIPCHANINFO(peername)})

 The other option is to use the setvar=variable=value setting in the
 peer definition in sip.conf.  For example, if you add
 setvar=USERID=jsmith in a user/peer/friend definition, Asterisk would
 automagically create a channel variable named USERID with a value of
 jsmith every time this device made a call into Asterisk.

 --
 Jared Smith
 Sr. Trainer
 Digium, Inc.


 --
 _
 -- 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


[asterisk-users] Getting 'username' of sip peer

2010-05-26 Thread Deepesh D
Hello,

I have a few entries for sip peers in sip.conf with different name and
username, like

[TestSIPUser]
type=peer
host=dynamic
username=testuser
secret=1234
context=test_context

[TestNewUser]
type=peer
host=dynamic
username=newsipuser
secret=3456
context=test_context

When a call is made from any of these peers I want to get the username
of the peer.
for eg:- If a call is being made from 'TestSIPUser' then I want to be
able to get the value 'testuser'

Is it possible to get the value of 'username' of the peer in the
dialplan using some application/function ?

Thanks,
Deepesh

-- 
_
-- 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] Using unix socket to connect with database

2010-05-22 Thread Deepesh D
Hello,

I tried removing the dbhost and dbport entries and restarting asterisk.

During startup the following warnings are shown and it gets stuck up
at this point for a few seconds.
WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
RealTime: No database host found, using localhost via socket.
WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
RealTime: No database port found, using 5432 as default.

But there is no connection being made to the database.


On Sat, May 22, 2010 at 3:25 AM, Kevin P. Fleming kpflem...@digium.com wrote:
 On 05/21/2010 02:48 AM, Deepesh D wrote:

 I am using asterisk realtime with a postgresql database on the same server.

 In res_pgsql.conf I have specified
 [general]
 dbhost=localhost
 dbport=5432
 dbname=asteriskdb
 dbuser=psql
 dbsock=/tmp/.s.PGSQL.5432

 Since both asterisk and db are on same server, I would like asterisk
 to connect to db using the local unix socket. However asterisk is not
 using the local unix socket to connect to database, it is making a tcp
 connection with the db. Is there anyway I can force asterisk to use
 the unix socket for db connection?

 You've specified *both* a socket to be used and a hostname/port number.
 The way the code is written, if both are supplied, the host/port
 combination is used and the socket path is ignored. If you don't want
 the host/port to be used, don't specify them.

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- 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] Using unix socket to connect with database

2010-05-22 Thread Deepesh D
I am using Asterisk 1.6.2.7

On Sat, May 22, 2010 at 7:20 PM, Kevin P. Fleming kpflem...@digium.com wrote:
 On 05/22/2010 02:07 AM, Deepesh D wrote:

 I tried removing the dbhost and dbport entries and restarting asterisk.

 During startup the following warnings are shown and it gets stuck up
 at this point for a few seconds.
 WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL
 RealTime: No database host found, using localhost via socket.
 WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL
 RealTime: No database port found, using 5432 as default.

 But there is no connection being made to the database.

 What version of Asterisk are you using?

 --
 Kevin P. Fleming
 Digium, Inc. | Director of Software Technologies
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 skype: kpfleming | jabber: kflem...@digium.com
 Check us out at www.digium.com  www.asterisk.org

 --
 _
 -- 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


[asterisk-users] Using unix socket to connect with database

2010-05-21 Thread Deepesh D
Hello,

I am using asterisk realtime with a postgresql database on the same server.

In res_pgsql.conf I have specified
[general]
dbhost=localhost
dbport=5432
dbname=asteriskdb
dbuser=psql
dbsock=/tmp/.s.PGSQL.5432

Since both asterisk and db are on same server, I would like asterisk
to connect to db using the local unix socket. However asterisk is not
using the local unix socket to connect to database, it is making a tcp
connection with the db. Is there anyway I can force asterisk to use
the unix socket for db connection?

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


[asterisk-users] Unexpected message received when receiving Fax

2010-02-26 Thread Deepesh D
Hello,

I have been trying to setup asterisk 1.6.2.0 to receive fax. I have
two SIP trunks connected to asterisk. One of them is a VoIP service
provider and the other is an audiocodes gateway connected with pstn
and fax lines. I am able to receive faxes on the DID numbers provided
by the VoIP service provider, but I am not able to receive fax through
the fax lines connected through audiocodes.

udptl debug shows T.38 packets coming from the audiocodes, but the
line gets disconnected with an error
phase_e_handler: Error transmitting fax. result=13: Unexpected
message received.

What could be the reason for this error? Is this a problem with
misconfiguration of audiocodes or asterisk.

I have the following t.38 settings in sip.conf
't8pt_udptl=yes,redundancy,maxdatagram=400'
and the dialplan I use is
exten = s,1,Answer
exten = s,2,Wait(3)
exten = s,3,ReceiveFAX(filename)

Thank you

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] T.38 with reinvite

2010-02-12 Thread Deepesh D
Hello,

Is it possible to use asterisk in T.38 pass through mode with reinvite?

My fax calls are getting disconnected if canreinvite=yes. It works
only if I make canreinvite=no. Normal calls work in both cases.


Thanks

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] Not able to receive fax

2010-02-09 Thread Deepesh D
Hello,

I have been trying to setup asterisk (1.6.2.0) to receive fax. I am
able to receive faxes sent from a zoiper softphone connected to
asterisk.

I have some DID numbers (with T.38 support) forwarded to my asterisk
pbx. I am not able to receive faxes from these numbers. The error I
get on the asterisk console is

phase_e_handler: Error transmitting fax. result=49: The call dropped
prematurely

Can someone please help.


Thanks.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Not able to receive fax

2010-02-09 Thread Deepesh D
Thanks. It's working now.

In my sip.conf I had 't8pt_udptl=yes'. I changed it to
't8pt_udptl=yes,redundancy,maxdatagram=400' and it started working.


On Tue, Feb 9, 2010 at 6:22 PM, Tommy Botten Jensen
tommy.jen...@freecode.no wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA512



 I have been trying to setup asterisk (1.6.2.0) to receive fax. I am
 able to receive faxes sent from a zoiper softphone connected to
 asterisk.

 I have some DID numbers (with T.38 support) forwarded to my asterisk
 pbx. I am not able to receive faxes from these numbers. The error I
 get on the asterisk console is

 phase_e_handler: Error transmitting fax. result=49: The call dropped
 prematurely


 Have you set the vendor connection point to enable T.38?:

 t38pt_udptl=yes ; redundancy,maxdatagram=400

 You can also use the CLI command 'udptl set debug' to retrieve debug
 information about the T.38 data stream.

 Hope this helps.

 - - Tommy Botten Jensen
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iEYEAREKAAYFAktxWm8ACgkQ573V05EH/palCgCgiuAebIOxERfIG50+LNTUfBXp
 HNcAn0Kuu355yfftodPeeP5eDMZl+5+G
 =ogQX
 -END PGP SIGNATURE-

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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


[asterisk-users] Asterisk status 488 Not acceptable here on receiving fax

2010-01-29 Thread Deepesh D
Hello,

I have been trying to setup asterisk 1.6.1.1 to receive fax. Whenever
a SIP peer (zoiper soft phones) tries to send a fax message asterisk
responds by sending a 488 Not acceptable here and the sending fails.
I tried changing a few sip settings like canreinvite and codec
preferences, but it did not help. The same sip peer is able to make
normal calls.

The same settings works on on asterisk 1.6.2.0 and I am able to
receive fax successfully in asterisk. I would like to get this working
in 1.6.1.1 as It is not possible for me to upgrade asterisk on my
production servers.

Can someone please help.

Thanks,
Deepesh

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] Adminpin for conference room

2010-01-24 Thread Deepesh D
Hello,

Can someone please explain me how the adminpin for conference rooms is used?

In the following dialplan
exten = 1122,1,MeetMe(${conf-room-no})

If users join this conference by dialing adminpin or pin will it make
any difference to the user?

Does dialling the adminpin give the user any kind of control of the
conference room?

Thanks

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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