John Coll
2004-Jan-02 15:57 UTC
[Asterisk-Users] Newbie - getting two local phones to communicate would be a good start :)
Hi
This is hard work :) I have read the Asterisk Handbook, BudgeTone User
Manual, Andy Powell's useful notes, Zac Sprackett's Asterisk Resource
Pages
and more.
I am not a linux newbie but am new to Asterisk. I have failed to find any
docs that explain how to get a very very simple, minimal, system up and I am
trying to get the following to work:
2 BudgePhone 102D connected on a LAN to a linux RH9 server running Asterisk
IP 10.0.1.198 - I just want to be able to dial from one phone and talk to
the other :) I have another phone connected to FWD sucesfully and the LAN is
NATed at the PC that is acting as the Asteriski server and firewall. But for
now its just two phones on a LAN - I'll conquer FWD and IAX later....
The extensions are 5702 and 5703. I can "dial" direct from one phone
to the
other (not using Asterisk) and the other one rings and answers fine with a
voice path.
When I dial "5703" from 5702 (thus via asterisk), 5703 rings. If I
take it
off hook it stops ringing but I can still hear ringing on 5702. After a few
seconds I get the "rapid-beep" tone on both phones. No voice.
I get this from asterisk CLI
*CLI>
*CLI>
-- Executing Macro("SIP/5702-a5be", "exten-aa|5703") in
new stack
-- Executing SetMusicOnHold("SIP/5702-a5be", "random")
in new stack
-- Executing Macro("SIP/5702-a5be", "dial|20|tr|5703")
in new stack
-- Executing AGI("SIP/5702-a5be", "dialparties.agi") in
new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Caller ID name is 'John workroom #1' number is
'5702'
-- dialparties.agi: Added extension 5703 to extension map
-- dialparties.agi: Extension 5703 cf is disabled
-- dialparties.agi: Extension 5703 do not disturb is disabled
-- dialparties.agi: DbSet CALLTRACE/5703 to 5702
dialparties.agi: About to execute Dial(SIP/5703|20|tr)
-- AGI Script Executing Application: (Dial) Options: (SIP/5703|20|tr)
-- Called 5703
-- SIP/5703-5fdc is ringing
-- SIP/5703-5fdc answered SIP/5702-a5be
-- Attempting native bridge of SIP/5702-a5be and SIP/5703-5fdc
WARNING[81926]: File chan_sip.c, Line 464 (retrans_pkt): Maximum retries
exceeded on call c9ab05e4-254e-b34f-7d6c-067b675fa15d@10.0.1.202 for seqno
36119 (Response)
== Spawn extension (macro-dial, s, 1) exited non-zero on
'SIP/5702-a5be'
in macro 'dial'
== Spawn extension (macro-exten-aa, s, 2) exited non-zero on
'SIP/5702-a5be' in macro 'exten-aa'
== Spawn extension (johnhome, s, 1) exited non-zero on 'SIP/5702-a5be'
*CLI>
*CLI>
I've turned on SIP debug but can not see any errors reported. This look like
the moment of failure:
Retransmitting #5 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.1.202
From: "John Coll 5702"
<sip:5702@10.0.1.198;user=phone>;tag=bfbd6f17-1d79-ed6b-1710-239de5724559
To: <sip:5703@10.0.1.198;user=phone>;tag=as3835ce1f
Call-ID: d3cb51f8-4d0a-8d70-bb8a-68986f1754bb@10.0.1.202
CSeq: 28108 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:5703@10.0.1.198>
Content-Type: application/sdp
Content-Length: 176
v=0
o=root 27210 27211 IN IP4 10.0.1.198
s=session
c=IN IP4 10.0.1.198
t=0 0
m=audio 18922 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
to 10.0.1.202:5060
WARNING[81926]: File chan_sip.c, Line 464 (retrans_pkt): Maximum retries
exceeded on call d3cb51f8-4d0a-8d70-bb8a-68986f1754bb@10.0.1.202 for seqno
28108 (Response)
The Grandstream phones are configured like this:
Login password xxx
MAC 00.0B.82.00.4B.57
IP 10.0.1.202
Subnet 255.255.255.0
Default router 10.0.1.198
DNS server #1 10.0.1.198
DNS Server #2 158.152.1.43
SIP Server: 10.0.1.198
Outbound Proxy:
SIP User ID: 5702
Authenticate ID: 5702
Authenticate Password: xxx (same if this is set to an empty string)
Name: John Coll 5703
Timezone GMT
SIP User ID is
phone number: yes
And sip.conf contains this
[general]
port = 5060
bindaddr = 0.0.0.0
externip = 10.0.1.198
[general]
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0 ; Address to bind to
externip = 10.0.1.198 ; Addres
[5702]
type=friend
host=dynamic
context=johnhome
reinvite=no
canreinvite=no
qualify=300
callerid="John workroom #1" <5702>
mailbox=5702
nat=no
[5703] is similar
extensions.conf is currently slightly modified verson of Zac Sprackett's
file http://sprackett.com/asterisk/ - its a bit long so I won't paste yet.
However I have had the same result with a much simpler extensions.conf -
some days ago.
Any help would really be appreciated as I am stuck and finding the process
hard because I can't seem to find a basic introduction aimed at getting me
up and running with the most basic of systems. Perhaps you can point me to a
BASIC and minimal set of configuration files for example for a SIP phone or
two on a NAT LAN with an X100P plugged into PSTN. I guess that is where most
people start - or should I start somewhere else?
I've been at this off and on for two weeks .... Linux admin and firewalls
seem trivial compared to this so I must be missing something pretty basic :)
thanks
john
rnc Info Lists
2004-Jan-02 16:25 UTC
[Asterisk-Users] Newbie - getting two local phones to communicate would be a good start :)
John wrote:> Hi > > This is hard work :) I have read the Asterisk Handbook, BudgeTone User > Manual, Andy Powell's useful notes, Zac Sprackett's Asterisk Resource > Pages > and more. > > I am not a linux newbie but am new to Asterisk. I have failed to find any > docs that explain how to get a very very simple, minimal, system up and I > am > trying to get the following to work: > > 2 BudgePhone 102D connected on a LAN to a linux RH9 server running > Asterisk > IP 10.0.1.198 - I just want to be able to dial from one phone and talk to > the other :) I have another phone connected to FWD sucesfully and the LAN > is > NATed at the PC that is acting as the Asteriski server and firewall. But > for > now its just two phones on a LAN - I'll conquer FWD and IAX later.... > > The extensions are 5702 and 5703. I can "dial" direct from one phone to > the > other (not using Asterisk) and the other one rings and answers fine with a > voice path. > > When I dial "5703" from 5702 (thus via asterisk), 5703 rings. If I take it > off hook it stops ringing but I can still hear ringing on 5702. After a > few > seconds I get the "rapid-beep" tone on both phones. No voice. > > I get this from asterisk CLI > > *CLI> > *CLI> > -- Executing Macro("SIP/5702-a5be", "exten-aa|5703") in new stack > -- Executing SetMusicOnHold("SIP/5702-a5be", "random") in new stack > -- Executing Macro("SIP/5702-a5be", "dial|20|tr|5703") in new stack > -- Executing AGI("SIP/5702-a5be", "dialparties.agi") in new stack > -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi > dialparties.agi: Caller ID name is 'John workroom #1' number is '5702' > -- dialparties.agi: Added extension 5703 to extension map > -- dialparties.agi: Extension 5703 cf is disabled > -- dialparties.agi: Extension 5703 do not disturb is disabled > -- dialparties.agi: DbSet CALLTRACE/5703 to 5702 > dialparties.agi: About to execute Dial(SIP/5703|20|tr) > -- AGI Script Executing Application: (Dial) Options: (SIP/5703|20|tr) > -- Called 5703 > -- SIP/5703-5fdc is ringing > -- SIP/5703-5fdc answered SIP/5702-a5be > -- Attempting native bridge of SIP/5702-a5be and SIP/5703-5fdc > WARNING[81926]: File chan_sip.c, Line 464 (retrans_pkt): Maximum retries > exceeded on call c9ab05e4-254e-b34f-7d6c-067b675fa15d@10.0.1.202 for seqno > 36119 (Response) > == Spawn extension (macro-dial, s, 1) exited non-zero on 'SIP/5702-a5be' > in macro 'dial' > == Spawn extension (macro-exten-aa, s, 2) exited non-zero on > 'SIP/5702-a5be' in macro 'exten-aa' > == Spawn extension (johnhome, s, 1) exited non-zero on 'SIP/5702-a5be' > > *CLI> > *CLI><CUT out the rest of the original email..rnc> John, What is the dialparties.agi? You didn't mention that in your description (or I missed it) I have used * with 2 GS phones with no problem. My suggestion is to go back to the simple extensions.conf file and try it again. Take out all of the fancy stuff until you get the basic phone working. If it still doesn't work then post all relevant parts of your extensions.conf and any changes you made in sip.conf along with the trace. My GS SIP.conf for one of the phones is: [2001] type=friend username=2001 secret=test2 host=dynamic context=local-extensions <--this will probably be different in your setup Extension.conf for ringing that phone is: exten => 2001,1,Dial(SIP/2001,20,Ttr) exten => 2001,2,Voicemail(u2001) exten => 2001,102,Voicemail(b2001) exten => 2001,103,Hangup They probably aren't perfect but they do work. Robert
Rich Adamson
2004-Jan-02 18:24 UTC
[Asterisk-Users] Newbie - getting two local phones to communicate would be a good start :)
> This is hard work :) I have read the Asterisk Handbook, BudgeTone User > Manual, Andy Powell's useful notes, Zac Sprackett's Asterisk Resource Pages > and more. > > I am not a linux newbie but am new to Asterisk. I have failed to find any > docs that explain how to get a very very simple, minimal, system up and I am > trying to get the following to work:<snip>> I've been at this off and on for two weeks .... Linux admin and firewalls > seem trivial compared to this so I must be missing something pretty basic :)Careful, that's the wrong thing to say on this list; but, the exact same thing has been reiterated at least several thousand times (minimum) in the last few months. The underlying problem truly is that even for those of us that have been professionally involved with telephony (for years), the initial learning curve for * is far steeper then the average implementor can begin to comprehend. Please folks, let's not start the _weekly_ read the code/docs war once again; for the experienced ones that really want to click on reply, "please don't"!!!! The bottom line is that unless you can read/comprehend code rather quickly, the technical documentation does not exist in any reasonable form. Lots of very good people are trying very very hard, but the fact is that far more technical doc exists only in the code then one would expect from such an excellent application. (The subject really has been covered in very negative terms many times, if one can find it. One of the better choices for newbie research really is http://www.voip-info.org/tiki-index.php , but even this is very much a 'work-in-progress'. That's a Good Thing!!! There is also a fair number of folks on the list that are trying to earn a living via * that won't take the time to respond to even the most basic questions for obvious reasons. Their signatures will become very apparent.) Not all of the documentation problem is really related to *; there really is a lot of interpretation/advancement/research going on with SIP vendors that frequently initiate postings related to problems/comments on the list. Once you get a basic * system working, you'll find significant issues with the SIP standards in terms of NAT and many many other items. That's not putting * down, its just the nature of non-commercial internet standards. I do believe that most implementors find the /usr/src/asterisk/README.* to be helpful, and some other directories that contain sample configs (of which the directory names are so unobvious I can't find them after a couple of beers. ;) You will find that not all SIP vendors interpret the exact same standards in the same way. For those of us that have tried, software/hardware SIP phones vary dramatically in terms of interoperability with * (and other telephony apps). Some get it reasonably right, and other vendors try to advance the standards with their own interpretations. And, a few are obviously basement operations with minimal informed staff. There really are only a few _aggressive_ responders that will abrasively tell you to read the docs, but what they really mean is read the code. If that's not appropriate, then simply delete their replies; they really won't mind even a little tiny bit. It's just the nature of this list. But, keep the faith, asterisk is really very good and stable once past that initial vary-steep learning curve. Rich
SW
2004-Jan-02 22:07 UTC
[Asterisk-Users] Newbie - getting two local phones to communicate would be a good start :)
Hi John,
If your effort is to make calls between two GS phones via *, here is what
you need.
You need all three devices in the same LAN, so set both phones and * to
10.0.1.98/24.
After that from your asterisk Linux box ping both phones. If that is
successful you know your layer 1,2 and 3 are ok. Disable all fire-walls,
iptables, ipchains in Linux box.
Now in * you need two files in /etc/asterisk
sip.conf and extensions.conf.
rename or delete both those existing files.
Here are the minimum you probably need in these two files.
sip.conf :
[general]
port=5060
allow=all
maxexpirey=180
defaultexpirey=160
[5702]
type=friend
username=5702
context=internal
dtmfmode=info
[5703]
type=friend
username=5703
context=internal
dtmfmode=info
And extensions.conf
[internal]
exten => _57XX,1,Dial(SIP/${EXTEN})
Save both files and issue command reload from * CLI.
Now you should be able to call from one phone to another.
while making calls enable sip debug and study the messages going in and out.
Also if you have ethereal fire that up and capture SIP packets. and see how
the SIP negotiation goes on. This will help you when you start moving to
fwd, IAXTEL etc. etc.
good luck.
SW
From: "John Coll" <john.coll@csoft.co.uk>
To: <asterisk-users@lists.digium.com>
Date: Fri, 2 Jan 2004 22:57:28 -0000
Subject: [Asterisk-Users] Newbie - getting two local phones to communicate
would be a good start :)
Reply-To: asterisk-users@lists.digium.com
Hi
This is hard work :) I have read the Asterisk Handbook, BudgeTone User
Manual, Andy Powell's useful notes, Zac Sprackett's Asterisk Resource
Pages
and more.
I am not a linux newbie but am new to Asterisk. I have failed to find any
docs that explain how to get a very very simple, minimal, system up and I am
trying to get the following to work:
2 BudgePhone 102D connected on a LAN to a linux RH9 server running Asterisk
IP 10.0.1.198 - I just want to be able to dial from one phone and talk to
the other :) I have another phone connected to FWD sucesfully and the LAN is
NATed at the PC that is acting as the Asteriski server and firewall. But for
now its just two phones on a LAN - I'll conquer FWD and IAX later....
The extensions are 5702 and 5703. I can "dial" direct from one phone
to the
other (not using Asterisk) and the other one rings and answers fine with a
voice path.
When I dial "5703" from 5702 (thus via asterisk), 5703 rings. If I
take it
off hook it stops ringing but I can still hear ringing on 5702. After a few
seconds I get the "rapid-beep" tone on both phones. No voice.
I get this from asterisk CLI
*CLI>
*CLI>
-- Executing Macro("SIP/5702-a5be", "exten-aa|5703") in
new stack
-- Executing SetMusicOnHold("SIP/5702-a5be", "random")
in new stack
-- Executing Macro("SIP/5702-a5be", "dial|20|tr|5703")
in new stack
-- Executing AGI("SIP/5702-a5be", "dialparties.agi") in
new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Caller ID name is 'John workroom #1' number is
'5702'
-- dialparties.agi: Added extension 5703 to extension map
-- dialparties.agi: Extension 5703 cf is disabled
-- dialparties.agi: Extension 5703 do not disturb is disabled
-- dialparties.agi: DbSet CALLTRACE/5703 to 5702
dialparties.agi: About to execute Dial(SIP/5703|20|tr)
-- AGI Script Executing Application: (Dial) Options: (SIP/5703|20|tr)
-- Called 5703
-- SIP/5703-5fdc is ringing
-- SIP/5703-5fdc answered SIP/5702-a5be
-- Attempting native bridge of SIP/5702-a5be and SIP/5703-5fdc
WARNING[81926]: File chan_sip.c, Line 464 (retrans_pkt): Maximum retries
exceeded on call c9ab05e4-254e-b34f-7d6c-067b675fa15d@10.0.1.202 for seqno
36119 (Response)
== Spawn extension (macro-dial, s, 1) exited non-zero on
'SIP/5702-a5be'
in macro 'dial'
== Spawn extension (macro-exten-aa, s, 2) exited non-zero on
'SIP/5702-a5be' in macro 'exten-aa'
== Spawn extension (johnhome, s, 1) exited non-zero on 'SIP/5702-a5be'
*CLI>
*CLI>
I've turned on SIP debug but can not see any errors reported. This look like
the moment of failure:
Retransmitting #5 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.1.202
From: "John Coll 5702"
<sip:5702@10.0.1.198;user=phone>;tag=bfbd6f17-1d79-ed6b-1710-239de5724559
To: <sip:5703@10.0.1.198;user=phone>;tag=as3835ce1f
Call-ID: d3cb51f8-4d0a-8d70-bb8a-68986f1754bb@10.0.1.202
CSeq: 28108 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:5703@10.0.1.198>
Content-Type: application/sdp
Content-Length: 176
v=0
o=root 27210 27211 IN IP4 10.0.1.198
s=session
c=IN IP4 10.0.1.198
t=0 0
m=audio 18922 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
to 10.0.1.202:5060
WARNING[81926]: File chan_sip.c, Line 464 (retrans_pkt): Maximum retries
exceeded on call d3cb51f8-4d0a-8d70-bb8a-68986f1754bb@10.0.1.202 for seqno
28108 (Response)
Balaji NJL
2004-Jan-03 11:37 UTC
[Asterisk-Users] Newbie - getting two local phones to communicate would be a good start :)
Add this to ur sip.conf ..that would help u. disallow=all allow=ulaw allow=alaw allow=ilbc allow=gsm -B> And sip.conf contains this > > [general] > port = 5060 > bindaddr = 0.0.0.0 > externip = 10.0.1.198 > > [general] > port = 5060 ; Port to bind to > bindaddr = 0.0.0.0 ; Address to bind to > externip = 10.0.1.198 ; Addres > > [5702] > type=friend > host=dynamic > context=johnhome > reinvite=no > canreinvite=no > qualify=300 > callerid="John workroom #1" <5702> > mailbox=5702 > nat=no > > [5703] is similar > > > > extensions.conf is currently slightly modifiedverson of Zac Sprackett's> file http://sprackett.com/asterisk/ - its a bit longso I won't paste yet.> However I have had the same result with a muchsimpler extensions.conf -> some days ago. > > Any help would really be appreciated as I am stuckand finding the process> hard because I can't seem to find a basicintroduction aimed at getting me> up and running with the most basic of systems.Perhaps you can point me to a> BASIC and minimal set of configuration files forexample for a SIP phone or> two on a NAT LAN with an X100P plugged into PSTN. Iguess that is where most> people start - or should I start somewhere else? > > I've been at this off and on for two weeks ....Linux admin and firewalls> seem trivial compared to this so I must be missingsomething pretty basic :)> > thanks > > john > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/