[SIP Beyond VoIP] python-sipsimple sip-register auto unregistered

Adrian Georgescu ag at ag-projects.com
Thu Jun 6 12:48:57 CEST 2019


I am not sure I understand your question. What do you try to achieve? Please give an example.

Adrian

> On 6 Jun 2019, at 04:57, Voipmanvn <voipmanvn at gmail.com> wrote:
> 
> Thank you  Adrian Georgescu
> I have tried and it works well.
> Farther I have tried to make funny callback in sip-audio-session.
> I set some option to pickup the call.
> 	options.auto_answer_interval = 0
>     	options.disable_sound = True
> And make test, it works too. I am wonder if you can help me some thing about callback for that answer?
> parser.add_option('--auto-answer', action='callback', callback=parse_handle_call_option, callback_args=('auto_answer_interval',), help='Interval after which to answer an incoming session (disabled by default). If the option is specified but the interval is not, it defaults to 0 (accept the session as soon as it starts ringing).', metavar='[INTERVAL]')
>     parser.add_option('--auto-hangup', action='callback', callback=parse_handle_call_option, callback_args=('auto_hangup_interval',), help='Interval after which to hang up an established session (disabled by default). If the option is specified but the interval is not, it defaults to 0 (hangup the session as soon as it connects).', metavar='[INTERVAL]')
> 
> 
> 
> Thank you in advance
> Cheer.
> ==============================
> -r 0
> 
> will keep the client registered until you press control D
> 
> > On 5 Jun 2019, at 12:18, Voipmanvn <voipmanvn at gmail.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>> wrote:
> >
> > Hello,
> >
> > I was tried to run sip-register with -h option. And seem that I have to press Ctr+D to unregistered. But I did not, and the script auto unregistered.
> >
> > That is content from command line.
> >
> > sip-register -h
> > Usage: sip-register [options]
> >
> > This script registers the contact address of the given SIP account to the SIP
> > registrar and refresh it while the program is running. When Ctrl+D is pressed
> > it will unregister.
> >
> > Options:
> >   -h, --help            show this help message and exit
> >   -a NAME, --account=NAME
> >                         The name of the account to use. If not supplied, the
> >                         default account will be used.
> >   -c CONFIG_DIRECTORY, --config-directory=CONFIG_DIRECTORY
> >                         The configuration directory to use. This overrides the
> >                         default location.
> >   -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
> >                         messages (disabled by default).
> >   -j, --trace-pjsip     Print PJSIP logging output (disabled by default).
> >   -n, --trace-notifications
> >                         Print all notifications (disabled by default).
> >   -r MAX_REGISTERS, --max-registers=MAX_REGISTERS
> >                         Max number of REGISTERs sent (default 1, set to 0 for
> >                         infinite).
> >   -b, --batch           Run the program in batch mode: reading input from the
> >                         console is disabled. This is particularly useful when
> >                         running this script in a non-interactive environment.
> >
> >
> > Please help.
> >
> >
> >
> >> On Jun 5, 2019, at 17:00, sipbeyondvoip-request at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <mailto:sipbeyondvoip-request at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>> wrote:
> >>
> >> Send SIPBeyondVoIP mailing list submissions to
> >> 	sipbeyondvoip at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <mailto:sipbeyondvoip at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>
> >>
> >> To subscribe or unsubscribe via the World Wide Web, visit
> >> 	https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >> or, via email, send a message with subject or body 'help' to
> >> 	sipbeyondvoip-request at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >>
> >> You can reach the person managing the list at
> >> 	sipbeyondvoip-owner at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >>
> >> When replying, please edit your Subject line so it is more specific
> >> than "Re: Contents of SIPBeyondVoIP digest..."
> >>
> >>
> >> Today's Topics:
> >>
> >>   1. python-sipsimple sip-register auto unregistered (Voipmanvn)
> >>
> >>
> >> ----------------------------------------------------------------------
> >>
> >> Message: 1
> >> Date: Wed, 5 Jun 2019 11:03:32 +0700
> >> From: Voipmanvn <voipmanvn at gmail.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>
> >> To: sipbeyondvoip at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >> Subject: [SIP Beyond VoIP] python-sipsimple sip-register auto
> >> 	unregistered
> >> Message-ID: <2B46476C-C55B-4BC7-8104-F9171138D330 at gmail.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>
> >> Content-Type: text/plain; charset="us-ascii"
> >>
> >> Hello,
> >>
> >> I am very new in this lib and trying to make some test. I hope i can get some idea, information from our team. thank you in advance.
> >>
> >> I add some account with:
> >>
> >> sip-settings -a add 1002 at x.x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <mailto:1002 at x.x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>> xxxxxx
> >> sip-settings -a default 1002 at x.x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <mailto:1002 at x.x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>
> >>
> >> Then, i run sip-register
> >>
> >> and it return me something like
> >>
> >>
> >> root at sipsimple <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>:~# sip-register
> >> Using account 1002 at x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <mailto:1002 at x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>.x
> >> 2019-06-05 03:48:57 Registered contact "sip:92745381 at x.x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>:34532" for sip:1002 at x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip> <sip:1002 at x.x.x <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>>.x at x.x.x.x:5060;transport=udp (expires in 3600 seconds).
> >> 2019-06-05 03:48:58 Registration ended.
> >>
> >> then, i see log registered and unregistered in  my asterisk box.
> >>
> >> this is some information about lib:
> >>
> >> python-sipsimple is already the newest version (3.4.2bionic).
> >> sipclients is already the newest version (3.4.0bionic).
> >>
> >> Please help.
> >>
> >> Thanks,
> >> Thanh Truong
> >> TDVSS- https://www.tdvss.com <https://www.tdvss.com/>
> >> 71/76 Str 6, Ward 15, GV, HCM, VN
> >> tel: + 84984480646
> >> skype: voipmanvn
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> -------------- next part --------------
> >> An HTML attachment was scrubbed...
> >> URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/84521fc0/attachment-0001.html <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/84521fc0/attachment-0001.html>>
> >>
> >> ------------------------------
> >>
> >> _______________________________________________
> >> SIPBeyondVoIP mailing list
> >> SIPBeyondVoIP at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >> https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> >>
> >>
> >> End of SIPBeyondVoIP Digest, Vol 107, Issue 1
> >> *********************************************
> >
> > _______________________________________________
> > SIPBeyondVoIP mailing list
> > SIPBeyondVoIP at lists.ag-projects.com <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> > https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/6e17e62b/attachment.html <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/6e17e62b/attachment.html>>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 235 bytes
> Desc: Message signed with OpenPGP
> URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/6e17e62b/attachment.sig <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190605/6e17e62b/attachment.sig>>
> 
> Previous message: [SIP Beyond VoIP] python-sipsimple sip-register auto	unregistered <https://lists.ag-projects.com/pipermail/sipbeyondvoip/2019-June/003364.html>
> Messages sorted by: [ date ] <https://lists.ag-projects.com/pipermail/sipbeyondvoip/2019-June/date.html#3365> [ thread ] <https://lists.ag-projects.com/pipermail/sipbeyondvoip/2019-June/thread.html#3365> [ subject ] <https://lists.ag-projects.com/pipermail/sipbeyondvoip/2019-June/subject.html#3365> [ author ] <https://lists.ag-projects.com/pipermail/sipbeyondvoip/2019-June/author.html#3365>
> More information about the SIPBeyondVoIP mailing list <https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> SIPBeyondVoIP mailing list
> SIPBeyondVoIP at lists.ag-projects.com
> https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190606/ee073121/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20190606/ee073121/attachment-0001.sig>


More information about the SIPBeyondVoIP mailing list