[asterisk-users] the lenght of the uri affects on dialplan?

Matthew J. Roth mroth at imminc.com
Mon Aug 27 14:12:56 CDT 2012


Rafael Visser wrote:

> I replaced for the following sip.conf
>
> [general] 
> context=default ; Default context for incoming calls 
> allowguest=no ; Allow or reject guest calls -sin password- (default is yes) 
> allowoverlap=no ; Disable overlap dialing support. (Default is yes) 
> udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) 
> tcpenable=yes ; Enable server for incoming TCP connections (default is no) 
> tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) 
> srvlookup=yes ; Enable DNS SRV lookups on outbound calls 
> relaxdtmf=yes 
> dtmfmode=inband 
> ;rfc2833compensate=yes 
>
> [sip.ericsson] 
> ;cambios allowguest hosts 
> allowguest=no ; Allow or reject guest calls -sin password- (default is yes) 
> type=friend 
> calllimit=200 
> fromuser=ivr1 
> dtmfmode=inband 
> username=administrador 
> context=incoming-sip-ericsson 
> host=10.146.9.70 
> host=ericsson 
> host=MSSASU1.MYDOMAIN.COM.PY 
> port=5060 
> disallow=all 
> allow=alaw 
> allow=gsm 
> allow=ulaw 
> qualify=yes 
> insecure=no
>
>
> Debug with long hostname (B is considered as an '*') 
> ================================ 
> <--- SIP read from TCP:10.146.9.70:6240 ---> 
> ...
> No matching peer for '971200152' from '10.146.9.70:6240' 
>
> Short hostname on switch 
> =============== 
> <--- SIP read from UDP:10.146.9.70:5060 ---> 
> ...
> Found peer 'sip.ericsson' for '971200152' from 10.146.9.70:5060 


The device sending SIP is using a different protocol (TCP vs. UDP) and
port (6240 vs. 5060) in your two examples.  You have Asterisk
configured to listen for UDP and TCP connections, so the protocol
isn't the problem.

However, the first example fails to find a matching peer because the
"sip.ericsson" SIP entity is defined with "port=5060" and
"insecure=no".  Try changing the insecure option to "insecure=port".
This should resolve your problem by allowing the peer to be matched
by IP address regardless of the port number.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer



More information about the asterisk-users mailing list