Asterisk as a SIP Client to another SIP svr


#1

I have a asterisk server & i wanna register it as a client to one of my ISP’s sip server, & pass calls between them both directions. I have read “www.voip-info.org/wiki-Asterisk+config+sip.conf” regarding this matter, but it’s not very much clear to me.

I have include the following line in my SIP.conf so that i’ll be able to be called…i guess.
register => 2345:password@mysipprovider.com/1234.

And in my extensions.conf i have include the followings,

[from-mysipprovider]
exten => 1234,1,Answer ;
exten => 1234,2,Dial(SIP/111,25,Ttr) ; incoming calls are redirected to SIP telephone with number 111
exten => 1234,3,Hangup

So i believe that when you dial 1234 at Server side the call will be forwarded to Sip phne named “111”, which is a registered sip phone in my side…am i right?

In order to this to be work what would be the settings of the other side(server side)? when he press 1234 i guess it should be dial my side…how do i configure this in server side? is it the normal way that we make a sip client & make it dial when you press 1234 in extensions.conf?

Up to now only my_side_Asterisk <= ISP’s Sip svr calls possible… i think.

In order to make call to the server side from my side…according to the voip-info.org document, it says as follows…

The server definition for outgoing calls looks like this:

[mysipprovider-out]
type=peer
secret=password
username=2345
host=sipserver.mysipprovider.com
fromuser=2345
fromdomain=fwd.pulver.com
nat=yes
context=from-mysipprovider ; this section will be defined in extensions.conf

In extensions.conf you’d then use a statement like this:

exten => _9.,1,Dial(SIP/${EXTEN:1}@mysipprovider-out,30,r)

Is the above part should be included in my asterisk server or the server side sip server? As i understand it is in my side asterisk, so that i will be able to call the server side by dialing 9 and some sip phone number of the server… Am I right…?

So what would be the server side’s configuration in order to work this.
Please mention me both sides configurations seperately… so that i could understand… because i’m bit confused regarding the matter…

Thanks.


#2

could someone please help…??