nikhil singhania
2010-Jun-15 08:07 UTC
[asterisk-users] can't seem to register, status unmonitored
Hi everybody,
I am trying to register my softphone(twinkle) on an asterisk server.
Everything seems to be fine.
Here is the output on show registrations in twinkle:
Tue 18:57:51
nikhil: you have the following registrations
<sip:2001 at 172.26.48.208 <sip%3A2001 at
172.26.48.208>>;expires=3013
208 is ip of the asterisk server.
on the server on doing 'sip show peers' , it shows the user and the ip
but
status is unmonitored.
debian-te410*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
wlg-gateway 202.7.4.40 5060 Unmonitored
2002/2002 (Unspecified) D N 0 Unmonitored
2001/2001 172.26.48.113 D N 5062 Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 1
offline]
113 is my ip. This may be the reason that when i do 'sip show registry'
no
value is displayed even though i get message of successful registration on
my sofphone.
debian-te410*CLI> sip show registry
Host Username Refresh State
Reg.Time
Please help, what may be the problem here, should the status be different?
I want to make a call from server to the 2001 user through a php file, how
can I do so??
Thanks in advance
Nikhil Kumar
summer intern:simmortel voice technologies
rit2007033
b.tech IT 6th sem
IIIT Allahabad
contact at 9793905858
email: rit2007033 at iiita.ac.in
niksinghania at gmail.com
http://profile.iiita.ac.in/RIT2007033/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/e0054ddb/attachment.htm
Zeeshan Zakaria
2010-Jun-15 11:01 UTC
[asterisk-users] can't seem to register, status unmonitored
1. Do 'qualify=yes' in sip.conf for the extenstions for which you want
to
see the status.
2. 'sip show registry' doesn't show anything for the extensions
registering
on your server, it shows your server registering on another server, i.e.
when when setting up a trunk.
3. Using php to make a call, you need to dedicate some time (probably a
week) for learning AGI using phpagi.
Zeeshan A Zakaria
--
www.ilovetovoip.com
On 2010-06-15 4:11 AM, "nikhil singhania" <niksinghania at
gmail.com> wrote:
Hi everybody,
I am trying to register my softphone(twinkle) on an asterisk server.
Everything seems to be fine.
Here is the output on show registrations in twinkle:
Tue 18:57:51
nikhil: you have the following registrations
<sip:2001 at 172.26.48.208 <sip%3A2001 at
172.26.48.208>>;expires=3013
208 is ip of the asterisk server.
on the server on doing 'sip show peers' , it shows the user and the ip
but
status is unmonitored.
debian-te410*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
wlg-gateway 202.7.4.40 5060 Unmonitored
2002/2002 (Unspecified) D N 0 Unmonitored
2001/2001 172.26.48.113 D N 5062 Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 1
offline]
113 is my ip. This may be the reason that when i do 'sip show registry'
no
value is displayed even though i get message of successful registration on
my sofphone.
debian-te410*CLI> sip show registry
Host Username Refresh State
Reg.Time
Please help, what may be the problem here, should the status be different?
I want to make a call from server to the 2001 user through a php file, how
can I do so??
Thanks in advance
Nikhil Kumar
summer intern:simmortel voice technologies
rit2007033
b.tech IT 6th sem
IIIT Allahabad
contact at 9793905858
email: rit2007033 at iiita.ac.in
niksinghania at gmail.com
http://profile.iiita.ac.in/RIT2007033/
--
_____________________________________________________________________
-- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/79ebe9fb/attachment-0001.htm
nikhil singhania
2010-Jun-15 11:48 UTC
[asterisk-users] can't seem to register, status unmonitored
> > Hi Zeeshan, >Thanx for ur reply!! The reason for this question was that i am actually doing the 3rd part, which you said will take me 1 week to learn. I have modified a file inbound.php which uses function of phpagi.php....exec_dial. But since i am not able to get the call on softphone. Here is part of code: $agi = new AGI(); $agi->answer(); $agi->exec_dial("SIP","2001"); when i execute the php file on the command line of server, nothing happens in my softphone. Since it's registered as i told you then when the file is executed at server, my phone is supposed to ring , but its not ringing. Where I am going wrong??> Message: 19 > Date: Tue, 15 Jun 2010 07:01:43 -0400 > From: Zeeshan Zakaria <zishanov at gmail.com> > Subject: Re: [asterisk-users] can't seem to register, status > unmonitored > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users at lists.digium.com> > Message-ID: > <AANLkTil6AAf21HcG4Jpf7sV9YzPJa7w-Yo8sT6PpfNkK at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > 1. Do 'qualify=yes' in sip.conf for the extenstions for which you want to > see the status. > > 2. 'sip show registry' doesn't show anything for the extensions registering > on your server, it shows your server registering on another server, i.e. > when when setting up a trunk. > > 3. Using php to make a call, you need to dedicate some time (probably a > week) for learning AGI using phpagi. > > Zeeshan A Zakaria > > -- > www.ilovetovoip.com > > On 2010-06-15 4:11 AM, "nikhil singhania" <niksinghania at gmail.com> wrote: > > Hi everybody, > I am trying to register my softphone(twinkle) on an asterisk server. > Everything seems to be fine. > Here is the output on show registrations in twinkle: > Tue 18:57:51 > nikhil: you have the following registrations > <sip:2001 at 172.26.48.208 <sip%3A2001 at 172.26.48.208> < > sip%3A2001 at 172.26.48.208 <sip%253A2001 at 172.26.48.208>>>;expires=3013 > > 208 is ip of the asterisk server. > on the server on doing 'sip show peers' , it shows the user and the ip but > status is unmonitored. > > debian-te410*CLI> sip show peers > Name/username Host Dyn Nat ACL Port Status > wlg-gateway 202.7.4.40 5060 Unmonitored > 2002/2002 (Unspecified) D N 0 Unmonitored > 2001/2001 172.26.48.113 D N 5062 Unmonitored > 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 1 > offline] > > 113 is my ip. This may be the reason that when i do 'sip show registry' no > value is displayed even though i get message of successful registration on > my sofphone. > > debian-te410*CLI> sip show registry > Host Username Refresh State > Reg.Time > > Please help, what may be the problem here, should the status be different? > I want to make a call from server to the 2001 user through a php file, how > can I do so?? > > Thanks in advance > Nikhil Kumar > summer intern:simmortel voice technologies > rit2007033 > b.tech IT 6th sem > IIIT Allahabad > contact at 9793905858 > email: rit2007033 at iiita.ac.in > niksinghania at gmail.com > http://profile.iiita.ac.in/RIT2007033/ > > > -- > _____________________________________________________________________ > -- 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/79ebe9fb/attachment.htm > > ------------------------------ > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > AstriCon 2010 - October 26-28 Washington, DC > Register Now: http://www.astricon.net/ > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > End of asterisk-users Digest, Vol 71, Issue 33 > ********************************************** >-- Nikhil Kumar summer intern:simmortel voice technologies rit2007033 b.tech IT 6th sem IIIT Allahabad contact at 9793905858 email: rit2007033 at iiita.ac.in niksinghania at gmail.com http://profile.iiita.ac.in/RIT2007033/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/bb3fe347/attachment.htm
nikhil singhania
2010-Jun-16 12:03 UTC
[asterisk-users] Fwd: can't seem to register, status unmonitored
---------- Forwarded message ----------
From: nikhil singhania <niksinghania at gmail.com>
Date: 16 June 2010 12:15
Subject: Re: [asterisk-users] can't seem to register, status unmonitored
To: Zeeshan Zakaria <zishanov at gmail.com>
Here is my extensions.conf:
[general]
static=yes ; default values for changes to this file
writeprotect=no ; by the Asterisk CLI
[globals]
; variables go here
[default]
; default context
[phones]
; context for our phones
exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)
exten => 500,1,Answer()
exten => 500,2,Playback(demo-echotest)
; Let them know what's going on
exten => 500,3,Echo
; Do the echo test
exten => 500,4,Playback(demo-echodone)
; Let them know it's over
exten => 500,5,Hangup
exten => _.,1,Dial(SIP/${EXTEN}@wlg-gateway) ; match anything and
send to wlg-gateway
exten => _.,2,Hangup
[from-wlg-gateway]
; context for calls coming from wlg-gateway
exten => 4980007,1,Dial(SIP/2001&SIP/2002)
exten => _.,1,Congestion()
; everyone else gets congestion
..............................................................................................................................
sip.conf
........................................................................................................
[general]
context=default ; Default context for incoming calls
port=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
[2001]
type=friend ; both send and receive calls from this peer
host=dynamic ; this peer will register with us
username=2001
secret=j0nny
canreinvite=no ; don't send SIP re-invites (ie. terminate rtp stream)
nat=yes ; always assume peer is behind a NAT
context=phones ; send calls to 'phones' context
dtmfmode=rfc2833 ; set dtmf relay mode
allow=all ; allow all codecs
[2002]
type=friend
host=dynamic
username=2002
secret=whyfry
canreinvite=no
nat=yes
context=phones
dtmfmode=rfc2833
allow=all
[wlg-gateway]
type=friend
disallow=all
allow=ulaw
context=from-wlg-gateway
host=202.7.4.40
canreinvite=no
dtmfmode=rfc2833
allow=all
.....................................................................................................
inbound.php
..................................................................................................
#!/usr/bin/php
<?php
ob_implicit_flush(true);
set_time_limit(0);
echo("Hello, world!");
require_once "phpagi.php";
error_reporting(E_ALL);
echo("Hello, world!");
$dir_base = "/var/www/wizoz/";
echo $dir_base;
$dir_prompt = $dir_base."prompts";
$dir_wav = $dir_base."wav";
$rel_dir_mp3 = "mp3";
$dir_mp3 = $dir_base.$rel_dir_mp3;
$agi = new AGI();
echo("created");
$agi->answer();
$agi->exec_dial("SIP","2002");
$agi->stream_file($dir_prompt.'/welcome','123');
fflush($agi->out);
# welcome to yumphone.com
$agi->stream_file($dir_prompt.'/welcome','123');
fflush($agi->out);
echo("Hello, world!");
$result = $agi->get_variable("CALLERID(num)");
echo $result;
$phonenum = $result['data'];
if (strlen($phonenum) != '10')
{
$phonenum = substr($phonenum,-10);
}
$uid = $phonenum.time();
$agi->stream_file($dir_prompt.'/record','123');
fflush($agi->out);
# please record your message after the beep. press 0 at the end of the
message
$agi->record_file($dir_wav."/".$uid,'wav','0','60000',NULL,true,5);
# fname, format, escape, timeout, offset, beep, silence
$agi->stream_file($dir_prompt.'/messagesent','123');
fflush($agi->out);
# your message has been sent
$agi->stream_file($dir_prompt.'/thankyou','123');
fflush($agi->out);
# thank you
?>
..................................................................................................
Though I am new, but i am somewhat familiar, and am devoting a great deal of
time. Now you have all the files. I highlited the exec_dial function. This
inbound.php is the file i am executing on the command line on the server.
But I am not gettting the call at my end. May be the way i am doing it is
wrong. Please suggest me. Rest of the code works fine.
On 15 June 2010 18:15, Zeeshan Zakaria <zishanov at gmail.com> wrote:
> The reason I said it'll take you one week, is because you seem new to
> asterisk. It may take even more.
>
> Pasting a part of the code is not enough for anybody to be able to help
> you. You should paste the relevant parts of your sip.conf, extensions.conf
> and the agi script. To me it seems you are new to dial plans, and if this
is
> true, first you need to focus on understanding dial plans, and then jump to
> agi.
>
> Did the other two issue get resolved?
>
> Zeeshan A Zakaria
>
> --
> www.ilovetovoip.com
>
> On 2010-06-15 7:49 AM, "nikhil singhania" <niksinghania at
gmail.com> wrote:
>
> Hi Zeeshan,
>>
> Thanx for ur reply!!
>
> The reason for this question was that i am actually doing the 3rd part,
> which you said will take me 1 week to learn.
>
> I have modified a file inbound.php which uses function of
> phpagi.php....exec_dial.
> But since i am not able to get the call on softphone.
>
> Here is part of code:
> $agi = new AGI();
> $agi->answer();
> $agi->exec_dial("SIP","2001");
>
> when i execute the php file on the command line of server, nothing happens
> in my softphone. Since it's registered as i told you then when the file
is
> executed at server, my phone is supposed to ring , but its not ringing.
> Where I am going wrong??
>
>
>
>> Message: 19
>> Date: Tue, 15 Jun 2010 07:01:43 -0400
>> From: Zeeshan Zakaria <zishanov at gmail.com>
>> Subject: Re: [asterisk-users] can't seem to register, status
>> unmonitored
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> <asterisk-users at lists.digium.com>
>> Message-ID:
>> <AANLkTil6AAf21HcG4Jpf7sV9YzPJa7w-Yo8sT6PpfNkK at
mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> >
>> > 1. Do 'qualify=yes' in sip.conf for the extenstions for
which you want
>> to
>> > see the status.
>> >
>> >...
>> <sip:2001 at 172.26.48.208 <sip%3A2001 at 172.26.48.208> <
>> sip%3A2001 at 172.26.48.208 <sip%253A2001 at
172.26.48.208>>>;expires=3013
>>
>>
>> >
>> > 208 is ip of the asterisk server.
>> > on the server on doing 'sip show peers' , it shows the
user...
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>>
http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/79ebe9fb/attachment.htm
>>
>> ------------------------------
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> AstriCon 2010 - October 26-28 Washington, DC
>> Register Now: http://www.astricon.net/
>>
>>
>> >
>> > asterisk-users mailing list
>> > To UNSUBSCRIBE or update options visit:
>> > http://lists.digium.c...
>> End of asterisk-users Digest, Vol 71, Issue 33
>> **********************************************
>>
>
>
>
> --
>
> Nikhil Kumar
> summer intern:simmortel voice technologies
> rit2007033
> b.tech IT 6th sem
> IIIT Allahabad
> ...
>
>
--
Nikhil Kumar
summer intern:simmortel voice technologies
rit2007033
b.tech IT 6th sem
IIIT Allahabad
contact at 9793905858
email: rit2007033 at iiita.ac.in
niksinghania at gmail.com
http://profile.iiita.ac.in/RIT2007033/
--
Nikhil Kumar
summer intern:simmortel voice technologies
rit2007033
b.tech IT 6th sem
IIIT Allahabad
contact at 9793905858
email: rit2007033 at iiita.ac.in
niksinghania at gmail.com
http://profile.iiita.ac.in/RIT2007033/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100616/6106bf65/attachment.htm
nikhil singhania
2010-Jun-17 07:27 UTC
[asterisk-users] can't seem to register, status unmonitored
Thanx Zeeshan, I forgot to thank you , doing qualify=yes shows the status and its active. 1> Name/username Host Dyn Nat ACL Port Status wlg-gateway 202.7.4.40 5060 Unmonitored 2002/2002 (Unspecified) D N 0 Unmonitored 2001/2001 172.26.48.113 D N 5061 OK (1 ms) 3 sip peers [Monitored: 1 online, 0 offline Unmonitored: 1 online, 1 offline] 2>And yes i didn't know that about 'sip show registry'. 3>And I am still stuck with the 3rd problem. Can you just tell me in the above output on the asterisk server, if i have to call the user 2001 at 172.26.48.113, through a php script and not softphone. Because my sofphone can call it. This is very silly problem . Please rescue me. status is Ok and online. i posted the last files to the list also. On 16 June 2010 18:58, Zeeshan Zakaria <zishanov at gmail.com> wrote:> you should post this to the list, not to my personal email. > > Zeeshan A Zakaria > > -- > www.ilovetovoip.com > > On 2010-06-16 2:45 AM, "nikhil singhania" <niksinghania at gmail.com> wrote: > > Here is my extensions.conf: > [general] > static=yes ; default values for changes to this file > writeprotect=no ; by the Asterisk CLI > [globals] > ; variables go here > [default] > ; default context > [phones] > ; context for our phones > exten => 2001,1,Dial(SIP/2001) > exten => 2002,1,Dial(SIP/2002) > exten => 500,1,Answer() > exten => 500,2,Playback(demo-echotest) > > ; Let them know what's going on > exten => 500,3,Echo > > ; Do the echo test > exten => 500,4,Playback(demo-echodone) > > ; Let them know it's over > exten => 500,5,Hangup > exten => _.,1,Dial(SIP/${EXTEN}@wlg-gateway) ; match anything and > send to wlg-gateway > exten => _.,2,Hangup > [from-wlg-gateway] > ; context for calls coming from wlg-gateway > exten => 4980007,1,Dial(SIP/2001&SIP/2002) > exten => _.,1,Congestion() > > ; everyone else gets congestion > > > > > > .............................................................................................................................. > sip.conf > > ........................................................................................................ > [general] > context=default ; Default context for incoming calls > port=5060 ; UDP Port to bind to (SIP standard port is 5060) > bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) > srvlookup=yes ; Enable DNS SRV lookups on outbound calls > [2001] > type=friend ; both send and receive calls from this peer > host=dynamic ; this peer will register with us > username=2001 > secret=j0nny > canreinvite=no ; don't send SIP re-invites (ie. terminate rtp stream) > nat=yes ; always assume peer is behind a NAT > context=phones ; send calls to 'phones' context > dtmfmode=rfc2833 ; set dtmf relay mode > allow=all ; allow all codecs > [2002] > type=friend > host=dynamic > username=2002 > secret=whyfry > canreinvite=no > nat=yes > context=phones > dtmfmode=rfc2833 > allow=all > [wlg-gateway] > type=friend > disallow=all > allow=ulaw > context=from-wlg-gateway > host=202.7.4.40 > canreinvite=no > dtmfmode=rfc2833 > allow=all > > ..................................................................................................... > inbound.php > > .................................................................................................. > #!/usr/bin/php > > <?php > > ob_implicit_flush(true); > set_time_limit(0); > echo("Hello, world!"); > > require_once "phpagi.php"; > error_reporting(E_ALL); > echo("Hello, world!"); > > $dir_base = "/var/www/wizoz/"; > echo $dir_base; > $dir_prompt = $dir_base."prompts"; > $dir_wav = $dir_base."wav"; > $rel_dir_mp3 = "mp3"; > $dir_mp3 = $dir_base.$rel_dir_mp3; > $agi = new AGI(); > echo("created"); > $agi->answer(); > $agi->exec_dial("SIP","2002"); > $agi->stream_file($dir_prompt.'/welcome','123'); fflush($agi->out); > > $agi->stream_file($dir_prompt.'/welcome','123'); fflush($agi->out); > echo("Hello, world!"); > > > ?> > > .................................................................................................. > Though I am new, but i am somewhat familiar, and am devoting a great deal > of time. Now you have all the files. I highlited the exec_dial function. > This inbound.php is the file i am executing on the command line on the > server. But I am not gettting the call at my end. May be the way i am doing > it is wrong. Please suggest me. Rest of the code works fine. > > > > > > > On 15 June 2010 18:15, Zeeshan Zakaria <zishanov at gmail.com> wrote: > > > > The r... > > contact at 9793905858 > email: rit2007033 at iiita.ac.in > niksinghania at gmail.com > http://profile.iiit... > >-- Nikhil Kumar summer intern:simmortel voice technologies rit2007033 b.tech IT 6th sem IIIT Allahabad contact at 9793905858 email: rit2007033 at iiita.ac.in niksinghania at gmail.com http://profile.iiita.ac.in/RIT2007033/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100617/ee83e448/attachment-0001.htm