Hi everyone. I have not so much experience in working with Asterisk, but i am loving it. I need to make a simple task, but have some problems with it. It would be great if you could help me with advice and at least show me the right direction to go))) Main for me is understand the logic and your help would be very appreciated. So lets start -
Task - To receive calls from virtual mobile number than transfer it to asterisk server # 1 than to asterisk server # 2 and than on my sofphone. Somethink like this -
Virtual mobile number => sip provider => asterisk server # 1 => asterisk server # 2 => softphone.
After configuration i managed to receive calls on my asterisk server # 1 (if i connect a softphone there) but have problems with transfering to server # 2.
I have made 2 trunks on server # 1 ( 1 trunk of sip operator and 2 trunk to connect and register on server 2) and 1 trunk on server # 2 to connect to the first server.
Here is trunk configuration -
Server # 1
Trunk of sip operator -
Outgoing Settings
type=friend
username=02301 (my sip id, which is given by sip operator)
secret=****
insecure=invite
host=sipde.zadarma.com
fromuser=02301
fromdomain=sip.zadarma.com
canreinvite=no
dtmfmode=rfc2833
disallow=all
Incoming Settings
USER Context?: 02301
type=friend
username=02301
secret=******
insecure=invite
host=sipde.zadarma.com
fromuser=02301
fromdomain=sip.zadarma.com
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=alaw
Register string 02301:*******@sip.zadarma.com/02301
Trunk to connect to server # 2
type=friend
username=filialsip
secret=welcome1One
context=from-internal
host=dynamic
disallow=all
allow=speex,alaw,gsm
nat=yes
insecure=invite,port
canreinvite=no
Register string - officesip:welcome1One@109.120.165.116/filialsip
Server # 2
type=friend
username=officesip
secret=welcome1One
context=from-internal
host=dynamic
disallow=all
allow=speex,alaw,gsm
nat=yes
insecure=invite,port
canreinvite=no
Register string - filialsip:welcome1One@109.120.164.175/officesip
All trunks register and seems to be working ok.
As i understand my problem is in the outbound and inbound routes -
i tried differrent configuration and none of them is not working for me. As i understand these should work as -
server # 1
Inbound => trunk to connect to server # 2
Oubound => trunk of sip operator
Server # 2
Inbound => extension of my softphone
Outbound => trunk to connect to server # 1
As i need only to receive calls on my softphone i tried to delete outbound routes, but this also didnt help. I am also using amportal restart and sip reload commands after every configuration change. Maybe there is a problem with some dial plans, but i dont need to configure them as i need routing would be made for any call of any DID, etc.
Please, help me to uderstand the logic of this routing or at least give me some hint.
Hope, all of you would have a great day, and sorry for my bad English skills(((