Interconnexting 2 asterisk via iax?

I am just a beginner of asterisk.

I need to interconnect 2 asterisk server via iax. How to do it?

I tried the examples for viop.org that did not work.

One of my work station has a real ip and the other one resides with a wireless provider.

As i am a new comer it will be very helpful if anyone sends the instructions in details.

Thanks in advance.

This forum doesn’t work that way. If you provide us with the debugging information and the configuration you tried, people may tell you what you did wrong, or what extra information you need to supply.

Follow the below link, which is based on sip trunking, but you can follow same with iax trunk
just you need to open port 4569 (iax port)
http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/connecting_two_asterisk.html

[quote=“striker24x7”]Follow the below link, which is based on sip trunking, but you can follow same with iax trunk
just you need to open port 4569 (iax port)
http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/connecting_two_asterisk.html[/quote]

I tried this system but it does not show registered, it just show unregistered and either request sent or time out from “iax2 show registry” command

and also if i set the context as admin it shows admin is already used error if restart the asterisk.

If you need configuration that I have applied then it’s below:

in my house asterisk:

iax.conf ------------------------

[general]

register => pia:password@[myremoteip]:7080

[pia]
type=friend
host=dynamic
secret=password
port=7080
context=admin

extensions.conf --------------

[general]
static=yes
writeprotect=no
clearglobalvars=no

[admin]

exten =>_1.,1,Dial(SIP/${EXTEN},)
exten =>_1.,n,Hangup()

exten =>_1.,1,Dial(IAX2/nilbd/${EXTEN}@admin)
exten =>_1.,1,Hangup()

in my remote asterisk:

iax.conf -----------------------

[general]
bindport=7080
bindaddr=0.0.0.0
bandwidth=low
trunkmtu=1240
autokill=yes
requirecalltoken=no
nochecksum=yes
trunktimestamps=no
trunkfreq=20
minregexpire=60
maxregexpire=180

register =>nil:password@pia:7080
;

[nil]
type=friend
host=dynamic
secret=password
port=7080
context=admin
peercontext=admin
nat=yes
;auth=md5
quality=yes
trunk=yes
;

extensions.conf ----------------

[general]

static=yes
writeprotect=no
clearglobalvars=no

[admin]

exten =>_1.,1,Dial(SIP/${EXTEN},)
exten =>_1.,n,Hangup()

exten =>_1.,1,Dial(IAX2/pia/${EXTEN}@admin)
exten =>_1.,1,Hangup()

*******My remote asterisk has a real ip which I did not provide, but my house asterisk has dynamic ip as I use wireless connextion for internet service there.

The registration status shows the remote asterisk as unregistered and in my house asterisk as requist sent/time out/rejected.

I am really helpless here. All the systems shown via searching seems to similar to me for the asterisk registration via iax. If you are able to help me, please do so.

You need to turn up logging until you see the registration request and its rejection. If you don’t see the request, you need to look at the other end to see if it is being sent to the correct address. If the address is correct, you have a network problem.

How do I turn up logging until registration request ans its rejection and what type of network problem it might be ???

Did my information set is right or wrong?

Enable full in logger.conf. Do:

core set verbose 5

Experiment with settings for

iax set debug…

If that still isn’t producing results do

core set debug 5

You should certainly be able to get something on the side that is sending the register. If the network is deleting it, you may never get anything on the receiving side.

[quote=“david55”]Enable full in logger.conf. Do:

core set verbose 5

Experiment with settings for

iax set debug…

If that still isn’t producing results do

core set debug 5

You should certainly be able to get something on the side that is sending the register. If the network is deleting it, you may never get anything on the receiving side.[/quote]

what experiment may I get from iax set debug …

tried everything you asked but still rejected in my home asterisk and unregistered in remote asterisk.

What type of network problem may occur ? how can I solve it? Please tell me …

It will tell you if you are sending the register, to where, whether it has arrived, why it was rejected, to where was the rejection sent, and if it arrived.

What should I write in terminal

If I write ‘iax set dubug’ it shows no such command

And in asterisk also this command do not work

What should I write, like ‘iax set debug 5’ something like it?

iax2 set debug on

same result.
can you help me to find out and solve the network problem that you said may occur??? Please…

What type network error may occur and how to solve it? Please Help me.

To request paid consultancy, please use the Biz and Jobs forum.

no one else with unpaid help?

As I newcomer I want to establish asterisk, if paid solution needed how can I find the beauty of the system?

If nobody is helping it’s because every time you are asked to provide basic information, you fail to do so. If you have iax loaded (check by typing “module show like iax” at the console) then you can turn on debugging. You can increase verbosity by " core set verbose 6" etc. If you can’t manage that, it’s unlikely we can help you.

setting core set verboce 5
core set debug 5

          iax2 reload

home terminal >>>>>>>>>>>
Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00002ms SCall: 04517 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[001] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00002ms SCall: 04517 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[002] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00002ms SCall: 04517 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[003] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00002ms SCall: 04517 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

remote server>>>>>>>>>>>>>>>>

[Aug 26 06:53:22] NOTICE[1251]: chan_iax2.c:13535 set_config: Ignoring bindport on reload
[Aug 26 06:53:22] NOTICE[1251]: chan_iax2.c:13596 set_config: Ignoring bindaddr on reload
[Aug 26 06:53:22] ERROR[1251]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo(“pia”, “(null)”, …): Name or service not known
[Aug 26 06:53:22] WARNING[1251]: acl.c:833 resolve_first: Unable to lookup ‘pia’

still status unregistered

setting core set verbose 6
home asterisk>>>>>>>>>>>>>>>
Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00015ms SCall: 01261 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[001] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00015ms SCall: 01261 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[002] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00015ms SCall: 01261 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

Tx-Frame Retry[003] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00015ms SCall: 01261 DCall: 00000 [...:4569]
USERNAME : pia
REFRESH : 60

remote asterisk >>>>>>>>>>>>>>.

nothings shows

Can you help me now …???

or do I need to increase the verbose level to 7 or more???

Firstly fix the obvious error:

[Aug 26 06:53:22] ERROR[1251]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("pia", "(null)", ...): Name or service not known [Aug 26 06:53:22] WARNING[1251]: acl.c:833 resolve_first: Unable to lookup 'pia'

Next, I think you have the users on the wrong register lines.

Also, I suspect there may be a bug with the handling of non-standard port numbers in the register processing - I doubt many people try to do that. The other possibility is that you are using so old a version that it doesn’t support port number overrides.

However, as you know both static addresses, there is really no point in using register.

The address in square brackets looks very odd, as though you had given the same IP address to both machines, although it might be a result of failing to resolve pia - the system is some how falling back to its own address. It should use the port number you supplied, which is why I think there may be a bug.

You haven’t said which version of Asterisk so I don’t know if it worth pursuing the failure to recognize the port number.

I would suggest getting it working with standard port numbers and with static addresses.

[quote=“david55”]Firstly fix the obvious error:

[Aug 26 06:53:22] ERROR[1251]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("pia", "(null)", ...): Name or service not known [Aug 26 06:53:22] WARNING[1251]: acl.c:833 resolve_first: Unable to lookup 'pia'

Next, I think you have the users on the wrong register lines.

Also, I suspect there may be a bug with the handling of non-standard port numbers in the register processing - I doubt many people try to do that. The other possibility is that you are using so old a version that it doesn’t support port number overrides.

However, as you know both static addresses, there is really no point in using register.

The address in square brackets looks very odd, as though you had given the same IP address to both machines, although it might be a result of failing to resolve pia - the system is some how falling back to its own address. It should use the port number you supplied, which is why I think there may be a bug.

You haven’t said which version of Asterisk so I don’t know if it worth pursuing the failure to recognize the port number.

I would suggest getting it working with standard port numbers and with static addresses.[/quote]

Sorry for not mentioning the asterisk version, asterisk-11.

and I can not use static address at both end. as my remote asterisk has a static ip but my home asterisk resides within a wireless provider and it provides different ip each time. their may be some more information that would be helpful. the system in my home, has a static local ip like 192.168.1.111 from my router but the wireless modem get different ip each time.

I do not get what you are saying by users on the wrong register lines. and which port number can be use for this system. Can you explain in details, Please.