Iax softphones to sip uri?


#1

I’m currently testing a mix of SIP and IAX softphones here. (X-Lite and idefisk and jackeniax) with the latest asterisk svn.

I notice that when using a iax client, i am unable to make sip uri style calls. When using xlite (SIP only) these calls go through fine. Asterisk simply spits out:

Mar 6 22:51:24 NOTICE[14901]: chan_iax2.c:7053 socket_process: Rejected connect attempt from 10.0.0.254, who was trying to reach 'sip:9586111@mutual.bcwireless.net'

Is this something I can overcome with asterisk, or should I just insist that everybody use SIP based softphones instead of IAX ones.


#2

I had the same need.

The only way I found was to replace ‘@’ by ‘’ (for example) in my IAX softphone, and make the replacement '’ by ‘@’ by asterisk before calling sip number.

Now, I can call foo@bar.tld by calling foo_bar.tld.
A little dirty but works.

If it can help you…

Sorry for my bad english.


#3

I must be doing something wrong then. The problem your talking about (handling the @ symbol), I was able to overcome with a little bit of extensions.conf magic. Here is how I handle those strings (instead of using an underscore)

First, rename the context that your extensions live in from [from-internal] to [from-internal-nouri] and create a new [from-internal] with something like the following.

[from-internal] ; preamble context to translate sip:something@something.com addresses (asterisk hates @ in addys) exten => _.,1,Set(ORIGINATION=lan) exten => _.,2,NoOp(Call from house extension ${CALLERID(num)} for ${EXTEN}@${SIPDOMAIN}) exten => _.,3,GotoIf($[${LEN(${SIPDOMAIN})} = 0]?10) exten => _.,4,GotoIf($[${SIPDOMAIN} = ${MYDOMAIN}]?10) exten => _.,5,GotoIf($[${SIPDOMAIN} = ${MYFQDN}]?10) exten => _.,6,GotoIf($[${SIPDOMAIN} = ${MYFQDN}:5060]?10) exten => _.,7,NoOp(@${SIPDOMAIN} is remote, forwarding...) exten => _.,8,Macro(uridial,${EXTEN},${SIPDOMAIN}) exten => _.,9,HangUp() exten => _.,10,Goto(from-internal-nouri,${EXTEN},1) exten => h,1,HangUp()

As you can see, a few variables are checked, the most important being SIPDOMAIN which asterisk autocreates, and MYDOMAIN and MYFQDN which I’ve set in [globals]. If the SIPDOMAIN variable exists, and its not known to us - the info is passed onto a dialer macro aware of the sipdomain, otherwise the call simply switches contexts to from-internal-noturi.

The first line you can probably remove as i use that variable in my dialing AGI script.

In any case, I’m still experiencing the original problem. SIP phones (hard and soft) can dial SIP uri’s without problems. IAX2 Softphones cannot dial SIP uri’s.