Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've read every forum on here, asterisk.org and google about this matter and still can't get it right. Here are the the SIP details. SIP Domain sip.provider.com:5060 Outbound Proxy sip10.provider.com:5090 User Name 1386269xxxx Password 123456789 Authorization ID 123456789 (Auth ID and Password are the same)

As i said i tried to google it but all the tutorials show example without different host names and auth id. I do not know how to describe it in sip.conf. Also have to use this sip trunk to inbound and outbound calling both. And these tutorials are saying type=peer. So i am puzzled because i think it shoud be type=friend. Please help.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here's what I would set in sip.conf

register => username:password@sip10.provider.com

[myprovidername]
host=sip10.provider.com
outboundproxy=sip10.provider.com:5090
type=friend
fromuser=username
defaultuser=username
secret=password
context=myproviderinbound
  1. Regarding "register =>" I don't know if your sip provider requires it, but... My guess is that it will. So add this line, that's how your sip provider will call you (so it knows your IP)

Now, you should be able to call now, originate a call from the command line:

asterisk*CLI> channel originate SIP/myprovidername/8005551212 application playback demo-congrats

To receive a call, now add a context in extensions.conf with the name from your sip.conf and answer the call, like:

[myproviderinbound]
exten => _X.,1,Answer()
same =>      n,Playback(demo-congrats)
same =>      n,Hangup()

When you're done, make sure to reload sip.conf & extensions.conf by issuing:

asterisk*CLI> sip reload
asterisk*CLI> dialplan reload
share|improve this answer
    
Thnx for the reply, and i am really very sry that i am reverting today only. Was out of town for last some days and also had lost a hope to an answer here. Thnx again. I will try this really quick tomorrow and get back to you with the final result. Really appretiate that thnx. Also the settings i mentioned in question are the one i got from my sip provider and they are meant to be used in X-lite type of softphones. Just a quick question.. Can these setting be really used in Asterisk as i do not have any other details apart form the one mentioned above, like no reg string & nothing else as well –  Harsh May 12 '13 at 14:12
    
Also in the sip.conf as you mentioned above.. Will it be host=sip.provider.com or host=sip10.provider.com –  Harsh May 12 '13 at 14:15
    
My guess is that it will wind up being host=sip10.provider.com –  dougBTV May 13 '13 at 12:58
    
Awesome that is working now and getting registered. Thnx for this really. You have saved my soul. I was trying to get this thing registered from last two months now and no one was helping me. Although it's getting registerd now but when i dial that number from my mobile it says "this number is not in service", but i can see the call coming in Asterisk CLI mode. Thnx for this. I think i have to work on my FreePBX incoming and outgoing routes that i will try to find out even harder now. –  Harsh May 13 '13 at 23:38
    
Do you have any idea why is it saying that? Even if no still thnx thnx thnx –  Harsh May 13 '13 at 23:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.