kleis-asterisk-dev@tiscali.it
2006-Feb-23 02:53 UTC
[Asterisk-Users] register => 2345:password@sip_proxy doesn't care about port
Hi, to register my Asterisk with a SIP provider I use the following syntax, as shown in the default sip.conf: register => 2345:password@sip_proxy where [sip_proxy] type=peer context=from-messagenet host=sip.messagenet.it port=5061 <------------- please note this one!!! 5061 is provider's port I have to register to. This also would work for me: register => 2345:password@sip.messagenet.it:5061 but I need the other syntax 'cause I *have* to specify a different context for incoming calls rather than the default one in sip.conf. Well, "sip show registry" shows: Host Username Refresh State sip_proxy:5060 ******* 105 Registered ------------^^^^ As you can see, Asterisk didn't care about port value 5061. However, "sip show peer sip_proxy" shows: ToHost : sip.messagenet.it Addr->IP : 212.97.59.76 Port 5061 -------------------------------------^^^^ What is wrong, please? Should I report this behaviour as a bug? Maybe a feature request? Cheers, Alex Tiscali ADSL 4 Mega Flat Naviga senza limiti con l'unica Adsl a 4 Mega di velocit? a soli 19,95 ? al mese! Attivala subito e hai GRATIS 2 MESI e l'ATTIVAZIONE. http://abbonati.tiscali.it/banner/middlepagetracking.html%3Fc%3Dwebmailadsl%26a%3Dwebmail%26z%3Dwebmail%26t%3D14%26r%3Dhttp%3A//abbonati.tiscali.it/adsl/sa/4flat_tc/
Bruno De Luca
2006-Feb-23 04:15 UTC
[Asterisk-Users] register => 2345:password@sip_proxy doesn't care about port
file sip.conf:
register => user[:secret[:authuser]]@host[:port][/extension]
example:
register => 5311111:catnav@sip.messagenet.it:5061/1234
file extensions.conf
exten => extension,1,1,Dial(number)
exten => extension,1,2,HangUp
example:
exten => 1234,1,1,Dial(SIP/1)
exten => 1234,1,2,HangUp
to call
file sip.conf:
[**NAME**]
type=peer
secret=**PSW**
username=**USER**
port=**PORT**
host=**HOST**
fromuser=**USER**
fromdomain=**DOMAIN**
nat=yes
* ESEMPIO:
[messagenet-out]
type=peer
secret=pwd
username=nmb
port=5061
host=sip.messagenet.it
fromuser=nmb
fromdomain=sip.messagenet.it
nat=yes
file extensions.conf
exten => extension,1,Dial(number,30,r)
* ESEMPIO:
exten => _9.,1,Dial(SIP/${EXTEN:1}@messagenet-out,30,r)
kleis-asterisk-dev@tiscali.it wrote:> Hi,
>
> to register my Asterisk with a SIP provider I use the following
> syntax, as shown in the default sip.conf:
>
> register => 2345:password@sip_proxy
>
> where
>
> [sip_proxy]
> type=peer
> context=from-messagenet
> host=sip.messagenet.it
> port=5061 <------------- please note this one!!!
>
> 5061 is provider's port I have to register to.
> This also would work for me:
>
> register => 2345:password@sip.messagenet.it:5061
>
> but I need the other syntax 'cause I *have* to specify a different
> context for incoming calls rather than the default one in sip.conf.
>
> Well, "sip show registry" shows:
> Host Username Refresh State
> sip_proxy:5060 ******* 105 Registered
> ------------^^^^
>
> As you can see, Asterisk didn't care about port value 5061.
>
> However, "sip show peer sip_proxy" shows:
> ToHost : sip.messagenet.it
> Addr->IP : 212.97.59.76 Port 5061
> -------------------------------------^^^^
>
> What is wrong, please?
> Should I report this behaviour as a bug? Maybe a feature request?
>
> Cheers,
> Alex
>
>
>
>
> Tiscali ADSL 4 Mega Flat
> Naviga senza limiti con l'unica Adsl a 4 Mega di velocit? a soli 19,95
? al mese!
> Attivala subito e hai GRATIS 2 MESI e l'ATTIVAZIONE.
>
http://abbonati.tiscali.it/banner/middlepagetracking.html%3Fc%3Dwebmailadsl%26a%3Dwebmail%26z%3Dwebmail%26t%3D14%26r%3Dhttp%3A//abbonati.tiscali.it/adsl/sa/4flat_tc/
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
Alex
2006-Feb-23 05:44 UTC
[Asterisk-Users] register => 2345:password@sip_proxy doesn't care about port
Hi,> example:> register => 5311111:catnav@sip.messagenet.it:5061/1234 Unfortunately this doesn't really fit my needs. "/1234" means 1234@default, where default is the context specified in the general section of sip.conf: [general] context=default ; Default context for incoming calls Since I have several sip_proxy, I need different incoming contexts. I mean I want to send calls from sip_proxy _ONE to context "from-proxy_ONE" and calls from sip_proxy_TWO to context "from-proxy_TWO". So I need to use: register => 2345:password@sip_proxy_ONE register => 6789:password@sip_proxy_TWO where [sip_proxy_ONE] type=peer context=from-proxy_ONE <---------- this is important for me!! host=sip.proxy_ONE.com port=5061 [sip_proxy_TWO] type=peer context=from-proxy_TWO <---------- this is important for me!! host=sip.proxy_TWO.com port=9000 This way, port is never used. Thanks, Alex