i’m struggling with this issue, not caused by asterisk, but i need a solution/workaround.
ASTERISK 1.6 (or 1.8, i can do an upgrade)
i’m registerign to a (FCKNG) gateway that does not accept two differen users registering from the same source [ip:port]
is there a way to set the source port and/or source ip at peer level?
(the idea is that i could add aliases to the eth interface and use them as source ips)
thanks in advice.
You should be able to accomplish that in Asterisk 12 with chan_pjsip, but you won’t be able to do it in any prior version or with chan_sip.
thank you for the hint!
i downloaded/compiled/installed everything (pjproject - asterisk-12.0.0)… OK!
i configured pjsip.conf as follows
transport=transport-udp ;configured as default
server_uri=sip:192.168.1.254:5062 ;server IP - dst POST
client_uri=sip:firstname.lastname@example.org:5061 ;asterisk IP - source PORT
in asterisk CLI i can see the registration from port 5061 to port 5062 but tcpdump says something different: destination port is 5062 but src is always 5060
i’ll try if the GATEWAY will accept such registrations…
res_pjsip_outbound_registration.c:401 schedule_retry: No response received from 'sip:192.168.1.254:5062' on registration attempt to 'sip:email@example.com:5061', retrying in '30'
[Jan 17 15:05:59] WARNING: res_pjsip_outbound_registration.c:401 schedule_retry: No response received from 'sip:192.168.1.254:5062' on registration attempt to 'sip:firstname.lastname@example.org:5061', retrying in '30'
15:13:12.717025 IP 192.168.1.221.5060 > 192.168.1.254.5062: SIP, length: 503
15:13:43.212236 IP 192.168.1.221.5060 > 192.168.1.254.5062: SIP, length: 503
15:13:43.713228 IP 192.168.1.221.5060 > 192.168.1.254.5062: SIP, length: 503
15:13:44.712862 IP 192.168.1.221.5060 > 192.168.1.254.5062: SIP, length: 503
15:13:46.713477 IP 192.168.1.221.5060 > 192.168.1.254.5062: SIP, length: 503
same story if i try to change the src IP
now let’s see if what the (FCKNG) gateway thinks about it
No, the gateway (aka Cisco Call Manager) does not like multiple registrations coming from the same IP address.
i have aliases on my eth0
is it possible to make
sip:user 1 register from eth0:1
sip:user 2 register from eth0:2
sip:user n register from eth0:n
If you have different peers and want different addresses for each, assuming your system has more than one address associated to it, then you’d create one transport for each address and associate the requisite transport with the endpoint you want.
thank you very much!
after configuring the following 3 transport sections i see packets coming from the different aliases of my asterisk box: GREAT!
now i’m confused about wich type of registration i need:
i need to simulate 3 different phones that register to a sip-server.
- is it correct to create 3 “type=registration” like the foolowing?
- how to manage incoming calls in extensions.conf (context/extension)?
- how to manage outgoing calls in extensions.conf (dial command)?