Answer the question
In order to leave comments, you need to log in
How to correctly receive and forward incoming messages to asterisk?
The situation is this:
There is MVTS, it has an extension for the end user and a gateway as which the asterisk clings.
the asterisk clings to the registration string. register => aster-test:[email protected]ю1ю1ю1/105
on the aster via chan_mobile, a mobile is connected via bluetooth, calls should go to it.
They leave, but the problem is this:
mvts calls what is specified as an extension for receiving calls (/105 or default s if not specified)
How do I get the number that the call comes to?
It will not be possible to know in advance the IP address of an asterisk, it is necessary that it be able to register on mvts from anywhere.
[aster-rbp2]
host=1ю1ю1ю1
username=aster-test
secret=Zz123456
fromuser=aster-test
fromdomain=1ю1ю1ю1
type=friend
disallow=all
allow=alaw, ulaw, g729
nat=force_rport
directmedia=nonat
insecure=port,invite
dtmfmode=rfc2833
context=test
canreinvite=no
14:26:23.341574 IP (tos 0x0, ttl 48, id 5578, offset 0, flags [DF], proto UDP (17), length 928)
1ю1ю1ю1.5062 > 192.168.113.164.5060: SIP, length: 900
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 1ю1ю1ю1:5062;rport;branch=z9hG4bK-2585086472-3859874834-570438052-4163064601
From: <sip:[email protected]ю1ю1ю1:5062;user=phone>;tag=302467592-3859874834-570438052-4163064601
To: <sip:[email protected]:5060;user=phone>
Call-ID: [email protected]ю1ю1ю1
CSeq: 1 INVITE
Contact: <sip:[email protected]ю1ю1ю1:5062;user=phone>
Content-Type: application/sdp
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, REFER, REGISTER, UPDATE
Max-Forwards: 70
User-Agent: TS-v4.5.1-16aW
Cisco-Guid: 139019392-302256614-2754674722-424879096
Content-Length: 254
v=0
o=- 1462371920 1462371920 IN IP4 5.189.194.108
s=-
c=IN IP4 5.189.194.108
t=0 0
m=audio 4054 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=silenceSupp:off - - - -
Answer the question
In order to leave comments, you need to log in
options:
1. you need to twist on MVTS
2.
[test]
exten => s,1,Set(DN=${SIP_HEADER(TO):5})
same => n,Set(TO=${CUT(DN,@,1)})
same => n,NoOp(Dialed to: ${TO})
then use ${TO} anywhere
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question