I am having trouble configuring a sip account. Can anybody help me giving the sip.conf account code for the client who has multiple ip address to originate from.??
This might be very simple but as I am the beginner on asterisk, I don’t know how to do that… It would really be appreciative if somebody help me since it has already been more than a week, I am having a headache with this problem…
Problem detail:
My friend wants to connect his home from my asterisk server but he has 3 ip addresses in his office… I just don’t know how can I configure the account for him… He use sip phone… There is random ip change in his computer…(he has three ips)… How can I put all those IP address in one sip account…??
Thanks in advance!!
Use host=dynamic.
However if the addresses change with each request, he will need to fix his computer.
Thanks mr. david
Thanks for you quick reply…Still I could not arrange it… below is my sip account code for him… please check if there is something wrong with this configuration… sorry for my innocence, I am just the beginner… and can you please code me the correct coding… Please sir that would really be appreciative
[goldentel]
type=friend
fromuser=goldentel
secret=goldentel123
host=37.58.78.204
port=5065
nat=yes
qualify=yes
disallow=all
allow=g729
allow=g723
context=internal
canreinvite=yes
[goldentel1]
type=friend
fromuser=goldentel1
secret=goldentel123
host=37.58.78.206
port=5065
nat=yes
qualify=yes
disallow=all
allow=g729
allow=g723
context=internal
canreinvite=yes
[goldentel2]
type=friend
fromuser=goldentel2
secret=goldentel123
host=37.58.78.205
port=5065
nat=yes
qualify=yes
disallow=all
allow=g729
allow=g723
context=internal
canreinvite=yes
Change type=friend to type=peer (security)
Delete fromuser, unless you really want to disable caller Id on his phone.
I hope that isn’t the real password!
If you need nat=yes, you need to describe the situation in more detail. nat=yes is a workaround for clients with broken NAT support which are behind NAT. It is not something that you set if you are behind NAT.
Replace the host= line by host= dynamic, and configure his device to register with you. I would expect phones to be set to register, anyway.
Delete canreinvite (obsolete name) and set directmedia to no, for the moment (an unnecessary complication if you really have any NAT involvement. It may be OK, but get everything else working first.)
Delete the other two entries.
Hello there…
Thank you for co-operating with me to solve my problem… I found about the actual problem and the problem was on the Ip address… I have a server behind the router whose private ip address is 192.168.x.x… I need to outbound the calls from the ip address 78.202.31.2… but the sip peer with the ip 78.202.31.2 is not being able to enter my * box thus when I type “sip show peers” to view the online peer, I see status “UNREACHABLE”… I am not being able to work around this problem …
Please help…
My router assigned ip address is: 192.168.1.100
My public ip address is: 49.244.230.30
Sip peer connects me using my public ip address…
The problem is that where can I address my router assigned ip address so that router sends all the sip request to my * box… I have already forwarded the ports to my *box, still no success… really frustrated…!! 
My sip.conf for that particular account(revised according to your tutorial):
[goldentel]
type=peer
username=goldentel
secret=gtelephone
host=dynamic
port=5064
nat=yes
qualify=yes
disallow=all
allow=gsm
allow=g723
dtmfmode=rfc2833
context=internal
directmedia=no
You need NAT settings in the general part of sip.conf. You need localnet and some and one of stunaddr, externip or externhost.