[asterisk-users] can't seem to register, status unmonitored
nikhil singhania
niksinghania at gmail.com
Thu Jun 17 02:27:53 CDT 2010
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
More information about the asterisk-users
mailing list